Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
jodyphelan committed Oct 17, 2024
1 parent 7d8bc7e commit 7d5ca01
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pathogenprofiler/bam.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,10 @@ def calculate_bamstats(self):
if row[0]!="SN": continue
if row[1]=='raw total sequences:': self.total_reads = int(row[2])
if row[1]=='reads mapped:': self.mapped_reads = int(row[2])
self.pct_reads_mapped = round(self.mapped_reads/self.total_reads*100,2)
if self.total_reads==0:
self.pct_reads_mapped = 0
else:
self.pct_reads_mapped = round(self.mapped_reads/self.total_reads*100,2)
os.remove(temp_file)

def get_missing_genomic_positions(self, bed_file:str, cutoff: int=10) -> List[GenomePositionDepth]:
Expand Down

0 comments on commit 7d5ca01

Please sign in to comment.