decontam-identify : error while running Decontam in R (return code 1)

Hi there,

I am trying to use the decontam-identify method to find potential contaminants in ITS data, produced from Illumina sequencing.

I processed all of my data in Qiime2-2023.5, using an Ubuntu distribution via WSL. I had paired-end, demultiplexed reads which I imported, used the cutadapt plugin to remove primers and then de-noised using the DADA2 pipeline. I then assigned taxonomy using the feature-classifier plugin (naive bayes classifier trained on UNITE 99 developers ref seqs).

I'm planning on using all 3 methods (prevalence, frequency and combined), comparing what ASVs each identify as potential contamination, and then deciding which scores to use to filter out contamination.

I have tried to use decontam-identify with my feature table output from dada2 denoising, using the following code:

qiime quality-control decontam-identify --i-table table2.qza --m-metadata-file Metadata.tsv --p-method 'combined' --p-freq-concentration-column DNA-Conc --p-prev-control-column Sample-Type --p-prev-control-indicator "Control" --o-decontam-scores decontam-scores-comb-method.qza --verbose

but am receiving an error message:

Plugin error from quality-control:

An error was encountered while running Decontam in R (return code 1), please inspect stdout and stderr to learn more.

I will attach the debug info in a .txt file!
decontam-identify debug info.txt (3.6 KB)

I've had a bit of a read around but can't figure out what may be causing this - am a bit of a novice with QIIME and only slightly more advanced with R, but I thought it may be to do with the version of R on my PC?
I wasn't sure if I have to download the decontam package on R before running this command? I tried to do this
install.packages ("decontam")
but it returned
Warning in install.packages :
package ‘decontam’ is not available for this version of R
(which is R v4.3.1)

Any help would be great!

Hello @charlotte1,

Don't worry about installing anything, everything is bundled in your qiime environment.

It seems like something is going wrong with the concentration values that are being passed in. If you're comfortable doing so, you could share your metadata and I could take a look to see if something looks off.

Hi Colin,

Ok, no worries - thanks for explaining that!

Metadata attached here:
Metadata.tsv (17.1 KB)


Hello @charlotte1,

I don't see anything obvious in your metadata that would cause this. If you also share your feature table I can try to reproduce the problem.

No worries,
Attaching here
table2.qza (521.9 KB)

Thanks for your help!

Hello @charlotte1,

The first thing you need to change is your Sample-Type and DNA-Conc columns to not have hyphens, so e.g. SampleType and DNAConc. Dumb, I know--I'll bring this bug to the attention of the developers, but this is a quick workaround. (Remember to change them in the command too).

This will fix the error you're seeing now. But you're going to see another error saying that your concentration values must be positive. This is because you have 0s in your concentration values. These will have to be changed. See a discussion here about this topic.

Let me know if this helps you to get things working.

1 Like

Hi Colin,

Thanks for your help - I've been able to get it working!

I'm now just wondering how to view the output - I've followed the decontam-score-viz documentation to create a histogram of the scores. But not sure how to use the feature data artifact to view the actual table containing the score for each ASV/view which ASVs the algorithm has identified as likely contamination?

Thanks again!

Hello @charlotte1,

qiime tools export is what you want, e.g.:

qiime tools export --input-path decontam-scores-comb-method.qza --output-path stats

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.