Cutadapt - trimming adaptor and primer sequences

Hi friends,

Thanks for your support in advance, I have 18S amplicon paired end data as forward and reverse reads in fastq.gz format. I am trying to trim the primers/overhang regions using cutadapt but always getting an error that no such file or directory found.

My commands are following:

nohup cat ngs18s/libnames.txt | while read line; do cutadapt -g GTGACCTATGAACTCAGGAGTCGAGGTAGTGACAAGAAATAACAATA -G CTGAGACTTGCACATCGCAGCTCTTCGATCCCCTAACTTTC -o Trim-test2/$line"_R1_trim.fastq.gz" -p Trim-test2/$line"_R2_trim.fastq.gz" ngs18s/$line"_R1.fastq.gz" ngs18s/$line"_R2.fastq.gz"; done > out-v2.txt 2>out-v2.err &

And error file has long list of this error:

Processing paired-end reads on 1 core ...
ERROR: [Errno 2] No such file or directory: 'ngs18s/Fwd_01-Rev_04_R2\r_R1.fastq.gz'
This is cutadapt 4.6 with Python 3.8.15

All files are in the folder ngs18s and libnames.txt file is also in the same folder.

Please advise about the issue. Thanks

Abdul

Hello and welcome to the :qiime2: forum,

Looks like this is error just a typo in your $line variable, if you look at this:

You have a forward slash, then a backslash before your file, and the error is telling you the program can't find the file you've told it to look for using the direction you've given it.

all the best,

Vic

4 Likes

Thanks a lot Vic, appreciate your prompt help.

Regards

Abdul

1 Like

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