I'm building a pipeline to process large-ish datasets pulled from the SRA database. I am using fondue to pull the data based on an SRA query. I found that fastp has an option for automatically detecting and removing adapters from the data. In a typical analysis, I would know the adapter sequence and view quality plot to determine where to trim. If I am understanding fastp correctly, this can remove the adapters and trim based on quality automatically. Many of the SRA entries do not reliably include the primer sequences and it would be time consuming to manually evaluate quality plots for every dataset I pull.
The problem I have run into is that not all the fastp features like "--detect_adapter_for_pe" are implemented in the qiime version, so I am having to export the fondue output from qza to fastq.gz, run fastp, and then import the reads back into qiime format for further manipulation with deblur and feature classifiers..
I have also used qiime dada2 in the past, but I have read that it can be slow on larger datasets, and does not have the same automatic adapter removal as fastp.
I wanted to check that I am using these tools correctly and if there is a way to accomplish this process all within qiime?
Hi @amp ,
Thanks for using q2-fondue and q2-fastp! q2-fastp in particular is very new so we would love to get feedback on what additional features to add. I have opened a new feature request to expose the --detect_adapter_for_pe parameter.
The good news: the quality filtering parameters that you describe appear to be exposed already, if I understand correctly it looks like this is done with the cut_* parameters in fastp, and all 3 are exposed in q2-fastp. Of course, this can also be done with dada2 or with q2-quality-filter (which has similar sliding window quality trimming as fastp), but both of these are likely to be slower.
detect_adapter_for_pe is not yet exposed, but maybe these workarounds will get you moving in the meantime?
maybe this is not even necessary in your pipeline — it looks like the adapter detection implemented in fastp is for standard Illumina adapter sequences (which should not be too frequent, depending on your target marker gene), not the primer sequences, which would still need to be trimmed explicitly by using the adapter_sequence parameters (which are exposed)
as adapter_sequence and adapter_sequence_r2 are exposed, you can pass explicit adapter sequences (including for Illumina adapters if these are an issue in your data)
if 1-2 are not options, then you could check out q2-cutadapt as a possible solution.
If there are other features that would be useful in q2-fastp, please let us know!
Hi, @amp. Thank you for your suggestion. I have now exposed the --detect_adapter_for_pe parameter (see PR 17). These changes will later be integrated into the next release.
It is also possible to test out the latest update locally:
Activate your Moshpit Conda environment (you may use the current release)
Clone the repository: git clone https://github.com/bokulich-lab/q2-fastp.git
Move into its root directory: cd q2-fastp
Install the Python package: make dev
Rebuild rachis/Qiime 2's plugin cache: mosh dev refresh-cache
Let me know if you have further questions or run into any errors.