[med-svn] [Git][med-team/tiddit][upstream] New upstream version 3.6.1+dfsg
Andreas Tille (@tille)
gitlab at salsa.debian.org
Wed Nov 8 20:33:11 GMT 2023
Andreas Tille pushed to branch upstream at Debian Med / tiddit
Commits:
de66d7f7 by Andreas Tille at 2023-11-08T21:28:41+01:00
New upstream version 3.6.1+dfsg
- - - - -
3 changed files:
- setup.py
- tiddit/__main__.py
- tiddit/tiddit_variant.pyx
Changes:
=====================================
setup.py
=====================================
@@ -20,7 +20,7 @@ else:
setup(
name = 'tiddit',
- version = '3.6.0',
+ version = '3.6.1',
url = "https://github.com/SciLifeLab/TIDDIT",
=====================================
tiddit/__main__.py
=====================================
@@ -17,7 +17,7 @@ import tiddit.tiddit_variant as tiddit_variant
import tiddit.tiddit_contig_analysis as tiddit_contig_analysis
def main():
- version="3.6.0"
+ version="3.6.1"
parser = argparse.ArgumentParser("""tiddit-{}""".format(version),add_help=False)
parser.add_argument("--sv" , help="call structural variation", required=False, action="store_true")
parser.add_argument("--cov" , help="generate a coverage bed file", required=False, action="store_true")
=====================================
tiddit/tiddit_variant.pyx
=====================================
@@ -7,6 +7,22 @@ from joblib import Parallel, delayed
from pysam import AlignmentFile, AlignedSegment
+
+def percentile(a, q):
+ size = len(a)
+ percentiles=[]
+
+ sorted_a=sorted(a)
+
+ for v in q:
+ if not size:
+ percentiles.append(0)
+ else:
+ percentiles.append( sorted_a[ int(math.ceil((size * v) / 100.0)) - 1 ] )
+
+ return(percentiles)
+
+
def scoring(scoring_dict,percentiles):
score=[0]
if scoring_dict["n_contigs"]:
@@ -543,7 +559,8 @@ def main(str bam_file_name,dict sv_clusters,args,dict library,int min_mapq,sampl
p=[1,5,10,20,30,40,50,60,70,75,80,85,90,95,97.5,99]
- percentiles={"FA":numpy.percentile(ratios["fragments_A"],p),"FB":numpy.percentile(ratios["fragments_B"],p),"RA":numpy.percentile(ratios["reads_A"],p),"RB":numpy.percentile(ratios["reads_B"],p)}
+
+ percentiles={"FA":percentile(ratios["fragments_A"],p),"FB":percentile(ratios["fragments_B"],p),"RA":percentile(ratios["reads_A"],p),"RB":percentile(ratios["reads_B"],p)}
for v in variants_list:
for variant in v:
View it on GitLab: https://salsa.debian.org/med-team/tiddit/-/commit/de66d7f752c74b462a13af56a0b5c59093b12372
--
View it on GitLab: https://salsa.debian.org/med-team/tiddit/-/commit/de66d7f752c74b462a13af56a0b5c59093b12372
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20231108/2a904777/attachment-0001.htm>
More information about the debian-med-commit
mailing list