I'm trying to run dada2 and receive this error:
Plugin error from dada2:
No reads passed the filter. trunc_len (250) may be longer than read lengths, or other arguments (such as max_ee or trunc_q) may be preventing reads from passing the filter.
Debug info has been saved to /tmp/qiime2-q2cli-err-p2zkejr5.log
I adjusted the max_ee and trunc_q parameters so they were very high and nothing would be filtered out and then received this error:
Plugin error from dada2:
An error was encountered while running DADA2 in R (return code 1), please inspect stdout and stderr to learn more.
Debug info has been saved to /tmp/qiime2-q2cli-err-phifaciq.log
If it's helpful, here is a screenshot our data summary:
I've seen similar posts with this error and we've tried what was suggested. Also, please let me know if I can provide other information!
1 Like
Hi @katinker,
It sounds like you’ve set your truncating length at 250, and none of your reads that are passing the initial filtering process are that long. Therefore you have no reads to ultimately be denoising. Given the relatively poor quality of your reads (from the quality plot) you should be looking to truncate your reads much earlier. I would start maybe at around the 160 bp position and truncate more (i.e at 150, 140) if you are still not able to retain a decent number of denoised reads. You can leave the other default settings for now and re-adjust them as needed later. Give that a try and let us know how it goes!
1 Like
Thanks for your suggestion–I realize my data isn’t optimal, but I’ve tried a few different settings and I’m still getting no reads passing the filter, even when I set the filter parameters so high where nothing should be filtered out. I’d like to figure out why that is and/or if I’m misunderstanding something about how this step works.
If it’s helpful I tried truncating at the lengths of 50, 100, and 150 using the default settings. I also tried truncating at the same length with the --p-max-ee 250 and --p-trunc-q 250; I arbitrarily set them at that value so they would be so high that nothing would be filtered out. If you look at my quality plot, there the quality is comparably high between ~40-60 sequence base so I also went ahead and tried truncating at a length of 55 with --p-trim-left 40 first with default --p-max-ee and --p-trunc-q settings and then both increased to 250. In any case, no reads passed the filter at any time.
Do you have any suggestions on what might be happening? Again, I realize that I would ideally have higher quality data. However, based on the output I pasted in my original post I have sequences that are a length of 251nt that generally have a quality score of greater than 10. Therefore I would expect I would at least get some sequences back in any of the scenarios I described above.
2 Likes
Hi @katinker,
Sorry about the delay in response here. Long weekend up in , been away from the computer most of it.
So when you set everything to default and the truncating parameter to 50, 100, or 150 bp you get 0 reads passing?
Setting the --p-trunc-q 250
will have the opposite effect of what you are expecting.
--p-trunc-q INTEGER Reads are truncated at the first instance of a
quality score less than or equal to this value. If
the resulting read is then shorter than `trunc-len`,
it is discarded. [default: 2]
Meaning that all of your reads will be truncated at the very first position because any number will be below 250, thus will be filtered out. It also doesn't really make sense to set it that high since q-scores here will have a max of 40 anyways, so no surprise that no reads passed in those runs. Those parameters are not your issues here, there is something else causing all of your reads to be filtered out.
In this case if you trimmed 40 from the 5' and truncated at the 55 position from the 3', that means your reads were only 15 bp in length and DADA2 has a minimum length retention of 20 bp reads by default so again it is no surprise all of those reads were also discarded.
A couple of suggestions:
Have you removed your primers/adapters from these sequences? Those tend to cause some problems with dada2, especially if they were degenerate primers. Make sure this is done and try my initial trim/trunc suggestion with default settings.
Try setting your trim parameter to 30 and your truncating value at say 130, with maxee to 6 to start. This is just to give us an idea where the issue is coming from. If nothing is still passing then we may have a bit more serious issue.
There's also the possibility that your reads have ambiguous N
nucleotide in them which will cause dada2 to discard that whole read. Have a look through some of your raw reads to see if that may be the case.
Let's try those first and go from there.
Wow, my initial response made no sense! Apologies–I only saw the top half of your response.
I really appreciate your detailed response as to why those sequences were previously filtered out. It makes things a lot more clear!
The primers and adapters should be removed from these sequences. I reran with --p-trim-left 30, --p-trunc-len 130, --p-max-ee 6, and --p-trunc-q at the default value. This worked! I still need to go through the data and think about this, but would appreciate any of your initial thoughts. We work with of challenging environmental samples, which means we often have low quality runs. I haven’t had to trim this much before, though.
2 Likes
Hi @katinker,
Glad something worked out! This initial run was just a quick test to see if there was another underlying issue here or not. You can try relaxing those truncating lengths and see if you are able to retain enough reads to work. Maybe try pushing it up to 160 then 190. My guess you will begin to start losing a lot of reads again.
Good! But certainly worth double-checking if you're not sure.
Without actually seeing the data it's hard for me to guess where the problem is coming from, but my gut feeling is that you have problematic sequences at the beginning of your reads on the 5' (low quality + ambiguous N nts) which causes the reads to be all discarded. When we trimmed 30 bp there I think we bypass that issue so you may be able to retain longer reads by relaxing truncate value, though you will certainly see less reads/sample the longer the reads become.