Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add optional QC check to filter_lastal_bam #961

Merged
merged 3 commits into from
Jun 7, 2019

Conversation

tomkinsc
Copy link
Member

@tomkinsc tomkinsc commented Jun 6, 2019

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 new errors.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.

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 new errors.py class has been added to store error classes that may be useful across files.
@tomkinsc tomkinsc requested a review from dpark01 June 6, 2019 21:05
@tomkinsc tomkinsc changed the title add optional QC check to parser_filter_lastal_bam add optional QC check to filter_lastal_bam Jun 6, 2019
Copy link
Member

@dpark01 dpark01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like a good & conservative way to add a new experimental feature we can play with.

Do we need to add the new errors.py to any of the scripts or files that list off all the top level py files (travis/coveralls/rtd scripts)? Maybe not...

@tomkinsc
Copy link
Member Author

tomkinsc commented Jun 7, 2019

Not sure we need to add errors.py to the travis/coveralls/rtd scripts just yet; maybe once there's more functionality there than renamed base classes?

@tomkinsc tomkinsc merged commit 228c08e into master Jun 7, 2019
@tomkinsc tomkinsc deleted the ct-lastal-filter-qc-check branch June 7, 2019 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants