Joining paired end reads and removing primers

Hi I am very new to metabarcoding and Qiime2. I have just received demultiplexed illumina paired end reads and I need to join them and remove the primers. Do I need to join them first and then remove the primers or visa versa? Or does the order not matter? What is the best way to do this using Qiime2? I have read about the cutadapt plugin but I am unsure as to whether that is just to cut adapters or can be used for primers too.

Thanks
Anya

Hi @avtober, welcome to :qiime2:

The cutadapt plugin can be used for both.

Technically the order does not matter... but this should be done prior to denoising. I prefer to trim my primers prior to merging using the the cutadapt trim-paired option along with the following flags: --p-discard-untrimmed --p-match-read-wildcards --p-match-adapter-wildcards

Check out the Tutorials for more in formation. Particularly, the QIIME 2 Overview.

-Good luck!
-Mike

Hi Mike, thank you for your advise I will give it a go!

Hi again, I just tried with the following script:

module load qiime2/2020.11

qiime cutadapt trim-paired
–i-demultiplexed-sequences demux-paired-end.qza
SampleData[PairedEndSequencesWithQuality]
–p-front-f GCACCCGCTGAAYTTAAG
–p-front-r CACGCACTGTTTACTCTC
–p-discard-untrimmed
–p-match-read-wildcards
–p-match-adapter-wildcards
–o-trimmed-sequences trimmed-paired-end.qza

It did not work and I got the following error message:

There was a problem with the command:
(1/1) Missing option ‘–o-trimmed-sequences’. ("–output-dir" may also be
used)
/var/spool/slurmd/job15824/slurm_script: line 18: SampleData[PairedEndSequencesWithQuality]: command not found
/var/spool/slurmd/job15824/slurm_script: line 19: --p-front-f: command not found
/var/spool/slurmd/job15824/slurm_script: line 22: --p-match-read-wildcards: command not found
/var/spool/slurmd/job15824/slurm_script: line 23: --p-match-adapter-wildcards: command not found
/var/spool/slurmd/job15824/slurm_script: line 24: --o-trimmed-sequences: command not found

Do you know what is wrong with my script? Thanks A

Hi @avtober,
It is hard to tell from this ...

... if you actually entered in the command in this way? Did you add the \ at the end of each line? This is required if you want to execute your command over several lines... otherwise this should all be on one line. Also, I'm not sure why SampleData[PairedEndSequencesWithQuality] is in the command. This is likely the culprit causing the command to fail. Check out this older cutadapt tutorial.

Just to sanity-check, can you make sure the following works:

module load qiime2/2020.11
qiime --help

-Mike

Thank you Mike,

Yes the / was missing from a few lines and I removed the second line too and it is working now.

Best, A

1 Like

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