add optional QC check to filter_lastal_bam #961
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds an optional QC check to taxon_filter.py::filter_lastal_bam() to raise a
QCError()
if the sample name (bam file basename) begins with any number of negative control prefixes and lastal has identified reads to keep after filtering, where the number of reads is above a thresold of a minimum acceptable read count. This can be enabled via--errorOnReadsInNegControl
. The readcount threshold can be set via--negativeControlReadsThreshold
and the negative control prefixes can be set via--negControlPrefixes
with defaults of "neg, water, NTC". The check has been added to the corresponding WDL file as well (off by default). A newerrors.py
file has been added to store error classes that may be useful across files.If we end up liking this feature, the QC functionality can be abstracted into a separate class to inspect bam files and be included in various places in the codebase, along with an argparse base object that configures arguments for the QC checker.