-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hi Rich,
Fyi, I work with Michael and Tanya.
I have run into a few bugs in 9.2 when filtering contaminated reads ("-PostFilt True").
- I think Michael has raised this but "-PostFilt" was not available on the command line.
- The dictionary filtering in lines 127 and 133 in
app/src/parse_bam.pyI think cancel each other out producing an empty read list, and then an empty bam.
dat = {k: v for k, v in dat.items() if len(v) > ## here
self.minimum_n_filter}
with open(self.fnames["delreads"], "w") as f:
[f.write(f"{v[0][1]}\n") for v in dat.values()
if len(v) <= self.minimum_n_filter] ## and here
The samtools command filters to keep all reads in the read list, so I believe removing the final if statement above solves this.
- Once the above is bypassed, castanet seems to stop. I think this is because of the error handling in line 136 in the same script as the samtools command does not produce the expected
healthy_msg.
out = shell(
f"samtools view -@ {self.p['NThreads']} -b -N {self.fnames['delreads']} {self.fnames['bam']} > {self.fnames['bamfilt']}", is_test=True)
error_handler_cli(out, self.fnames['bamfilt'], "samtools") ## run stops here
Everything ran once I'd adjusted for the above. Let me know if you need any more info.
Many thanks,
Annie
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels