This is a QIIME 2 plugin. For details on QIIME 2, see https://qiime2.org.
qiime2 / q2-quality-filter Goto Github PK
View Code? Open in Web Editor NEWQuality filtering for QIIME2
License: BSD 3-Clause "New" or "Revised" License
Quality filtering for QIIME2
License: BSD 3-Clause "New" or "Revised" License
This is a QIIME 2 plugin. For details on QIIME 2, see https://qiime2.org.
Could you add columns for total output reads and fraction of input reads filtered (or retained, either way).
It would also be useful to have a row at the top of the table including the sum of all of the other rows (so that it's easy to know what the total input/output reads were).
I ran
qiime quality-filter q-score --i-demux artifacts/samples.qza --output-dir quality-filtered.qza
samples.qza has two paired end samples
the quality-filtered.qza file has 2 files only
S1_R1.fastq
S2_R1.fastq
I expected four files.
How can I solve this problem
Improvement Description
It would be useful to replicate the functionality of qiime1's filter_fasta.py
— e.g., see this forum post.
Comments
I am not sure whether this would be at home in q2-quality-filter
, demux
, or some other plugin that has yet to be created (q2-filter-everything-under-the-sun
).
Whichever plugin would be appropriate (and perhaps this is an argument for making a new plugin, or for combining with the two demultiplexing plugins into a single fastq/fasta handling plugin), I could imagine other fasta/fastq functions that could accompany this, e.g., trimming, subsampling.
References
filter_fasta.py
— e.g., see this forum post
I think going with a minimum-quality
default of 19 makes sense here, as this data is intended to go directly into deblur and that's what's used in the deblur paper. I don't see a real reason to match the QIIME 1 default of 3 here, I think it's too low. Is there another motivation to keep it at 3?
q2-feature-table has examples of these, and we're filling them in for the other plugins now.
It'd be nice to have something more descriptive than this - for example q-score
(since it's q-score
based filtering)? That's just an alternative that comes to mind.
Improvement Description
split_libraries_fastq.py
provided a --rev_comp
flag, that would let you reverse complement the sequences before they were written out.
After talking with @wasade, we both agree that such functionality might not be appropriate for q2-quality-filter
, but we couldn't really figure out where this would fit better, so also opening this issue hoping this can get relocated to the proper repo.
Are you planning on expanding the unit tests before release? They look pretty sparse right now, for example I don't think there are any test cases that include filtering reads which are too short after truncation (sorry if I'm missing that).
These plugins are similar in purpose and confusingly similar names. But should discuss with Bok lab as they are the authors of one.
The QualityFilterStatsFmt
-> Metadata
transformer doesn't work if the sample IDs can all be interpreted as numeric. The pandas.read_csv
call doesn't appear to always read the sample IDs as strings. With the new Metadata object, IDs are required to be strings, causing an error message when the transformer is invoked.
Do we expect that the results of the quality filtering will be identical when the same parameters are used? If so, have the results been compared between this plugin and QIIME 1's split_libraries_fastq.py
?
We could then pass this to qiime metadata tabulate
and drop the visualize_stats
visualizer.
For example:
qiime quality-filter q-score --i-demux demux.qza --o-filtered-sequences demux-filtered.qza --o-filter-stats demux-filter-stats.qza
qiime metadata tabulate --m-input-file demux-filter-stats.qza --o-visualization demux-filter-stats.qzv
qiime tools view demux-filter-stats.qzv
This is supported now, and we're going to add to all of the actions for the next release. You can see an example of this here.
Should use the new citation API in qiime2/qiime2#387
Addition Description
Filtering reads/barcodes based on average barcode Q scores is a simple method to eliminate Illumina index "cross-talk".
Current Behavior
Currently nothing in the q2-family allows filtering based on barcode quality, as far as I know.
Proposed Behavior
Filter barcodes based on average barcode Q score. Drop reads [and barcodes] paired with the bad barcode reads.
Would need both single and paired versions.
Need to report filtering summary (# reads in, # reads out, % removed — could report removals on a per-barcode basis. anything else?). Should output a filter stats visualization or print to stdout?
Comments
@ebolyen has suggested that cutadapt would be a good tool for this. However, we both agreed that this plugin would be the best home, as (a) it is a bioinformatic protocol more than a tool and relevant to the goals of this plugin and (b) it is rather similar in spirit to the q-score*
methods currently available in this plugin, but examines barcodes instead of reads.
Comments
It is possible these methods are already IO-bound, but in case they aren't, it would be easy to parallelize.
References
Came up on the forum.
Improvement Description
q_score_joined
was deprecated in the 2020.5 cycle. It should be removed in the 2020.8 cycle.
Some of the parameters are abbreviated and others aren't:
--p-minimum-quality INTEGER [default: 3]
--p-quality-window INTEGER [default: 3]
--p-min-length-fraction FLOAT [default: 0.75]
--p-maximum-ambiguous INTEGER [default: 0]
Could you change minimum
to min
and maximum
to max
?
As well as anything else that isn't needed for testing.
On MANIFEST read, if the sample IDs are numeric, pandas will attempt to interpret the field as though they are numeric. This is problematic in the event of trailing zeros (e.g., 0012300
-> 123
).
The specific line resulting in the cast is here. Testing whether simply forcing dtype=str
is sufficient.
This would be an additional input type to q-score
- reverse reads would just be ignored and not included in the output, so the output would always be SampleData[SequencesWithQuality]
. We don't need to perform quality control on the reverse reads (at least not at this stage) since the assumption is that if that is wanted, the user would have joined their reads first and would instead be using q-score-joined
.
This is the same idea that we have in place for dada2 denoise-single
, where if you provide paired end reads it only pays attention to the forward reads.
This would make sense to add to the basic
method. We can leave it out for the time-being, until we have method-specific citations, or add it as a plugin-level citation since it's the only filter that is currently implemented in this plugin.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.