Mercurial > repos > artbio > mircounts
diff mircounts.py @ 13:b045c30fb768 draft
"planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/mircounts commit af48e9f6df2717ffd3731a974be1ec36e4eff779"
author | artbio |
---|---|
date | Fri, 18 Oct 2019 19:18:50 -0400 |
parents | 2a08a6eb471c |
children |
line wrap: on
line diff
--- a/mircounts.py Sat May 12 09:06:24 2018 -0400 +++ b/mircounts.py Fri Oct 18 19:18:50 2019 -0400 @@ -43,8 +43,8 @@ """ coverage = dict() for ref_name, ref_len in zip(bamfile.references, bamfile.lengths): - coverage[ref_name] = bamfile.count_coverage(reference=ref_name, - start=0, end=ref_len, + coverage[ref_name] = bamfile.count_coverage(contig=ref_name, + start=0, stop=ref_len, quality_threshold=quality) """ Add the 4 coverage values """ coverage[ref_name] = [sum(x) for x in @@ -68,9 +68,9 @@ mir_start = int(gff_fields[3]) mir_end = int(gff_fields[4]) # GFF is 1-based, pysam is 0-based. - counts[mir_name] = bamfile.count(reference=premir_name, + counts[mir_name] = bamfile.count(contig=premir_name, start=mir_start-1, - end=mir_end-1) + stop=mir_end-1) return counts