Skip to content

Commit eb7440b

Browse files
author
Peter Combs
committed
MakeSummaryTable gets read files from bam header
This is way better than trying to guess it based on the constantly changing formats the sequencing center gives the data in. There's a bit of a risk still present in that it doesn't count all the reads, so if there are multiple "leftovers" files (for instance, if adjacent slices are computationally merged), then it won't deal with them properly.
1 parent e2be771 commit eb7440b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

MakeSummaryTable.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,10 @@ def get_stagenum(name, series, dir):
149149
else:
150150
skip = sf.mapped < args.strip_low_reads
151151
if args.strip_low_map_rate and args.has_params and not skip:
152-
rfs = sorted(glob(path.join('sequence',
153-
'*{}*'.format(params.ix[old_dirname]['Index']),
154-
'*_R1_*.fastq.gz'))
155-
)
152+
rfs = [entry for entry in
153+
sf.header['PG'][0]['CL'].split()
154+
if entry.endswith('.gz') or entry.endswith('.fastq')][0]
155+
rfs = sorted(rfs.split(','))
156156
total_reads = 4e6 * (len(rfs) - 1)
157157
for i, line in enumerate(gzip.open(rfs[-1])):
158158
pass

0 commit comments

Comments
 (0)