Cutadapt script

Hi everybody! I’m Giulia form Univeristy of Padua and I used to analzye my 16 S data with qiime2. In this week I tried to re-analyze my data and I have one problem when I run this command

qiime cutadapt trim-paired --i-demultiplexed-sequences demux-paired-end_I20.qza --p-front-f TCCTACGGGAGGCAGCAGT --p-front-r GGACTACCAGGGTATCTAATCCTGTT --o-trimmed-sequences cutadapt_demux_I20.qza

I think the script is correct but i tried to run it on my old dataset (and this command worked) but in this moment it doesen’t work neither in my old dataser nor in my newer and this is the error from the script
Plugin error from cutadapt:

Command ‘[‘cutadapt’, ‘–cores’, ‘1’, ‘–error-rate’, ‘0.1’, ‘–times’, ‘1’, ‘–overlap’, ‘3’, ‘-o’, ‘/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-lfgobhr_/448408F434001_S114_L001_R1_001.fastq.gz’, ‘-p’, ‘/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-lfgobhr_/448408F434001_S114_L001_R2_001.fastq.gz’, ‘–front’, ‘TCCTACGGGAGGCAGCAGT’, ‘-G’, ‘GGACTACCAGGGTATCTAATCCTGTT’, ‘/tmp/qiime2-archive-wdfciwkf/62a7f6b7-7b99-4ffd-b2d9-c8028fe632a9/data/448408F434001_S114_L001_R1_001.fastq.gz’, ‘/tmp/qiime2-archive-wdfciwkf/62a7f6b7-7b99-4ffd-b2d9-c8028fe632a9/data/448408F434001_S114_L001_R2_001.fastq.gz’]’ returned non-zero exit status 1.

Debug info has been saved to /tmp/qiime2-q2cli-err-oq2vi4q5.log

Someone can help me please?
Thank you!
Giuli

Hi @giulia.dallarovere! Please re-run with the --verbose flag, and paste the complete results here. Also, what version of QIIME 2 are you using?

Hi Matthew, sorry form my late reply. I’m using qiime2-2019.10 and I tried to re-run with --verbose and I obtain this result

(qiime2-2019.1) [lcarraro@p05-64gb E18]$ qiime cutadapt trim-paired --i-demultiplexed-sequences demux-paired-end_E18.qza --p-front-f TCCTACGGGAGGCAGCAGT --p-front-r GGACTACCAGGGTATCTAATCCTGTT --o-trimmed-sequences cutadapt_demux_E18.qza --verbose

Running external command line application. This may print messages to stdout and/or stderr.
The commands to be run are below. These commands cannot be manually re-run as they will depend on temporary files that no longer exist.

Command: cutadapt --cores 1 --error-rate 0.1 --times 1 --overlap 3 -o /tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-2drh5ekh/218191F208616_S1_L001_R1_001.fastq.gz -p /tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-2drh5ekh/218191F208616_S1_L001_R2_001.fastq.gz --front TCCTACGGGAGGCAGCAGT -G GGACTACCAGGGTATCTAATCCTGTT /tmp/qiime2-archive-eutor2cs/dc173c21-0ae9-496a-a8e8-d2e091488c1d/data/218191F208616_S1_L001_R1_001.fastq.gz /tmp/qiime2-archive-eutor2cs/dc173c21-0ae9-496a-a8e8-d2e091488c1d/data/218191F208616_S1_L001_R2_001.fastq.gz

Traceback (most recent call last):
  File "/opt/anaconda3/bin/cutadapt", line 7, in <module>
    from cutadapt.__main__ import main
ModuleNotFoundError: No module named 'cutadapt'
Traceback (most recent call last):
  File "/opt/anaconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2cli/commands.py", line 274, in __call__
    results = action(**arguments)
  File "</opt/anaconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/decorator.py:decorator-gen-448>", line 2, in trim_paired
  File "/opt/anaconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py", line 231, in bound_callable
    output_types, provenance)
  File "/opt/anaconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/qiime2/sdk/action.py", line 365, in _callable_executor_
    output_views = self._callable(**view_args)
  File "/opt/anaconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_cutadapt/_trim.py", line 174, in trim_paired
    run_commands(cmds)
  File "/opt/anaconda3/envs/qiime2-2019.1/lib/python3.6/site-packages/q2_cutadapt/_trim.py", line 30, in run_commands
    subprocess.run(cmd, check=True)
  File "/opt/anaconda3/envs/qiime2-2019.1/lib/python3.6/subprocess.py", line 418, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['cutadapt', '--cores', '1', '--error-rate', '0.1', '--times', '1', '--overlap', '3', '-o', '/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-2drh5ekh/218191F208616_S1_L001_R1_001.fastq.gz', '-p', '/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-2drh5ekh/218191F208616_S1_L001_R2_001.fastq.gz', '--front', 'TCCTACGGGAGGCAGCAGT', '-G', 'GGACTACCAGGGTATCTAATCCTGTT', '/tmp/qiime2-archive-eutor2cs/dc173c21-0ae9-496a-a8e8-d2e091488c1d/data/218191F208616_S1_L001_R1_001.fastq.gz', '/tmp/qiime2-archive-eutor2cs/dc173c21-0ae9-496a-a8e8-d2e091488c1d/data/218191F208616_S1_L001_R2_001.fastq.gz']' returned non-zero exit status 1.

Plugin error from cutadapt:

  Command '['cutadapt', '--cores', '1', '--error-rate', '0.1', '--times', '1', '--overlap', '3', '-o', '/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-2drh5ekh/218191F208616_S1_L001_R1_001.fastq.gz', '-p', '/tmp/q2-CasavaOneEightSingleLanePerSampleDirFmt-2drh5ekh/218191F208616_S1_L001_R2_001.fastq.gz', '--front', 'TCCTACGGGAGGCAGCAGT', '-G', 'GGACTACCAGGGTATCTAATCCTGTT', '/tmp/qiime2-archive-eutor2cs/dc173c21-0ae9-496a-a8e8-d2e091488c1d/data/218191F208616_S1_L001_R1_001.fastq.gz', '/tmp/qiime2-archive-eutor2cs/dc173c21-0ae9-496a-a8e8-d2e091488c1d/data/218191F208616_S1_L001_R2_001.fastq.gz']' returned non-zero exit status 1.

See above for debug info.

Hi @giulia.dallarovere!

Here is the interesting part of the error message:

The implication is that somehow your QIIME 2 conda environment is missing cutadapt, or, your overall computation environment is configured in a way that overrides the programs installed in your QIIME 2 conda environment.

Please run env and paste the results here - thanks! :t_rex:

Thank you Matthew again for your reply, I run env where I tried to work on and this is what I obtain

MODULEPATH=/usr/share/Modules/modulefiles:/etc/modulefiles
CONDA_BACKUP_OBJDUMP=/opt/anaconda3/envs/qiime2-2020.2/bin/x86_64-conda_cos6-linux-gnu-objdump
LOADEDMODULES=
CONDA_BACKUP__CONDA_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata_x86_64_conda_cos6_linux_gnu
HISTCONTROL=ignoredups
_CE_M=
CONDA_BACKUP_ELFEDIT=/opt/anaconda3/envs/qiime2-2020.2/bin/x86_64-conda_cos6-linux-gnu-elfedit
CONDA_BACKUP_GCC_AR=/opt/anaconda3/envs/qiime2-2020.2/bin/x86_64-conda_cos6-linux-gnu-gcc-ar
HOME=/home/lcarraro
SHLVL=2
FASTSTRUCTURE=/opt/faststructure/structure.py
CONDA_BACKUP_NM=/opt/anaconda3/envs/qiime2-2020.2/bin/x86_64-conda_cos6-linux-gnu-nm
CONDA_BACKUP_DEBUG_CFLAGS=-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /opt/anaconda3/envs/qiime2-2020.2/include
CONDA_BACKUP_GCC=/opt/anaconda3/envs/qiime2-2020.2/bin/x86_64-conda_cos6-linux-gnu-gcc
LOGNAME=lcarraro
CONDA_PYTHON_EXE=/opt/anaconda3/bin/python
WINDOW=0
CONDA_BACKUP_CMAKE_PREFIX_PATH=/opt/anaconda3/envs/qiime2-2020.2:/opt/anaconda3/envs/qiime2-2020.2/x86_64-conda_cos6-linux-gnu/sysroot/usr
CONDA_BACKUP_GCC_RANLIB=/opt/anaconda3/envs/qiime2-2020.2/bin/x86_64-conda_cos6-linux-gnu-gcc-ranlib
SSH_CONNECTION=5.102.14.2 45146 10.0.97.70 22
CONDA_BACKUP_DEBUG_FORTRANFLAGS=-fopenmp -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/anaconda3/envs/qiime2-2020.2/include
MODULESHOME=/usr/share/Modules
JAVA_HOME_CONDA_BACKUP=
CONDA_BACKUP_CC=/opt/anaconda3/envs/qiime2-2020.2/bin/x86_64-conda_cos6-linux-gnu-cc
LESSOPEN=||/usr/bin/lesspipe.sh %s
CONDA_DEFAULT_ENV=qiime2-2019.1
CONDA_BACKUP_FC=/opt/anaconda3/envs/qiime2-2020.2/bin/x86_64-conda_cos6-linux-gnu-gfortran
CONDA_BACKUP_STRINGS=/opt/anaconda3/envs/qiime2-2020.2/bin/x86_64-conda_cos6-linux-gnu-strings
CONDA_BACKUP_LD_GOLD=/opt/anaconda3/envs/qiime2-2020.2/bin/x86_64-conda_cos6-linux-gnu-ld.gold
XDG_RUNTIME_DIR=/run/user/1004
JAVA_LD_LIBRARY_PATH_BACKUP=
CONDA_BACKUP_READELF=/opt/anaconda3/envs/qiime2-2020.2/bin/x86_64-conda_cos6-linux-gnu-readelf
CONDA_BACKUP_ADDR2LINE=/opt/anaconda3/envs/qiime2-2020.2/bin/x86_64-conda_cos6-linux-gnu-addr2line
CONDA_BACKUP_CPP=/opt/anaconda3/envs/qiime2-2020.2/bin/x86_64-conda_cos6-linux-gnu-cpp
R_LIBS_USER=/opt/anaconda3/envs/qiime2-2019.1/lib/R/library/
CONDA_BACKUP_CFLAGS=-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /opt/anaconda3/envs/qiime2-2020.2/include
CONDA_BACKUP_CPPFLAGS=-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /opt/anaconda3/envs/qiime2-2020.2/include
BASH_FUNC_module()=() {  eval `/usr/bin/modulecmd bash $*`
}
_=/usr/bin/env

I already told you that I'm working on qiime2-2019.2 but I tried to run the the cudapat script also using qiime2-2020.2 and doesn't work anymore.
Thank you!
Giulia

Hi @giulia.dallarovere. I’m not too sure what is wrong, but I have a strong suspicion that something is misconfigured with your computation environment. When you activate your QIIME 2 2020.2 environment, can you run conda list and share the results here? Thanks!

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