Skip to content

Commit

Permalink
updated to include total pairs
Browse files Browse the repository at this point in the history
  • Loading branch information
wbrazelton committed Sep 19, 2022
1 parent f772c4f commit 796e681
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions count-mapped-fragments.py
Expand Up @@ -2,6 +2,8 @@


"""
v2: modified to report the total number of pairs, whether mapped or not
original:
counts number of "mapped read pairs" = "mapped fragments"
this is NOT the same thing as number of "mapped paired reads" = "mapped reads"
uses the bowtie2 log file where "mapped read pairs" = "were paired" - "pairs aligned 0 times concordantly or discordantly"
Expand Down Expand Up @@ -47,6 +49,7 @@
else: pass
try:
mapped_pairs = pairs - not_mapped
print mapped_pairs,
print filename
#print mapped_pairs,
output=str(filename) + ',' + str(pairs)
print output
except: pass

0 comments on commit 796e681

Please sign in to comment.