Skip to content

Commit

Permalink
fix: stats work when starting with bam
Browse files Browse the repository at this point in the history
  • Loading branch information
js2264 committed Feb 19, 2024
1 parent e258750 commit 2f2145a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hicstuff/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ def get_pipeline_stats(log_file):
log_lines = [line.rstrip() for line in file]

# 1. Number of sequenced pairs from fastqs
fastq_pairs = [s for s in log_lines if re.search("reads found in each fastq file.", s)][0]
fastq_pairs = [s for s in log_lines if re.search("reads found in each", s)][0]
fastq_pairs = re.sub(".*INFO :: ", "", fastq_pairs)
fastq_pairs = re.sub(" reads found in each fastq file.*", "", fastq_pairs)
fastq_pairs = re.sub(" reads found in each.*", "", fastq_pairs)
fastq_pairs = int(float(fastq_pairs))

# 2. Number (% of total) of (un)mapped reads
Expand Down

0 comments on commit 2f2145a

Please sign in to comment.