Command not found using q2-cutadapt

Hi thermokarst I am trying to use “trim-paired” to remove 5-end primers from my reads before proceding With further analysis in q2. My dataset is imported into an artefact “paired-end-demux.qza”, but when I try to run cutadapt With the following code:

qiime cutadapt trim-paired --i-demultiplexed-sequences path/paired-end-demux.qza --p-cores 1 \
–p-front-f $adapter_f --p-front-r $adapter_r --p-error-rate $er_cutadapt --p-overlap 3 --o-trimmed-sequences path/paired-end-demux-trimmed.qza
qiime demux summarize --i-data path/paired-end-demux-trimmed.qza --o-visualization path/paired-end-demux-trimmed.qzv

i get the folloving error: --p-front-f: command not found
Also I would like to know if it is possible to feed the adapter or adapters to q2 cutadapt like this: “–p-front-f file:path.fasta” since cutadapt default behaviour is to list adapters With name in fasta header in the result summary. Do q2 cutadapt support this?

Also tried the following start of the same code:
qiime cutadapt trim-paired --i-demultiplexed-sequences path/paired-end-demux.qza SampleData[PairedEndSequencesWithQuality]

But here I got a Message saying: “Got unexpected extra arguments”.

A bit stuck here, please advice!!

Hi @Roger_Meisal,

That’s really strange, you’ve got the backslash in your command \, so it shouldn’t be trying to execute the next line a command on its own, rather it should be appended onto the last line.

Could you provide a screenshot where this happens?

Unfortunately, I don’t think the plugin supports this for trimming. Although the demux method does use this behavior via the metadata file for the barcodes. The same thing could probably be done for trimming.

I’m not quite sure where your command starts and ends here, but that error doesn’t make sense, since it should be telling you about of the missing options.

A formatting trick you can use on the forum to create a code-block is to wrap your text in three backticks:

this text will be rendered as a code-block

I finally figured this one out. It was a silly extra space after the .
my code is now working and the “file:path.fasta” Method to feed the adapters to qiime worked too.
the “–verbose” output now uses the name and sequence of the adapters.

Maybe the qiime team should implement some visualization on the adapter removal process?

1 Like

Hey @Roger_Meisal!

Oh! That is surprising, glad you’ve got what you need.

That’s actually on our list!

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