My aim is to create a bash loop over my fastq files that are in a directory like so: https://ibb.co/cMvx7a whereby, paired read files are organised in the form:
1
1
2
2
3
3
etc..
I don't know a way of dealing with these paired files within the cutadapt loop Something along these lines is what I'm looking for:
for file in folder
do
cutadapt -a ADAPTER_FWD -A ADAPTER_REV -o out.1.fastq -p out.2.fastq reads.1.fastq reads.2.fastq
done
but I want to do pairs together from the folder and I don't know how.
Thanks in advance.
Hi all. I am trying to generate a loop to use Cutadapt on multiple paired-end read files from Mi-Seq.
I am using the below script that has been sourced and modified from previous posts. I am using the following script below. I keep running into the error: IOError: [Errno 2] No such file or directory:
It is calling the file names, but once it initiates it comes back with IOError:[Errno 2] No such file or directory:
Any idea why this is happening??
@ brijohn In addition, to h.mon points above, you also need to both fastqs in cutadapt command line. Currently, they are supplied as independent arguments to shell. Loop will fail with permission denied error. Try this and let me know:
Path/to/file/${SAMPLE}_R1_001.fastq
translates intoPath/to/file//path/to/file/someFile_R1_001.fastq
The
echo
is there just for debugging purposes, it has no functional value.