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??
for i in /path/to/file/*_R1_001.fastq;
do
SAMPLE=$(echo ${i} | sed "s/_R1_\001\.fastq//")
echo ${SAMPLE}_R1_001.fastq ${SAMPLE}_R2_001.fastq
cutadapt -a FWDPrimer...RCREVPrimer -A REVPrimer...RCFWPrimer \
--discard-untrimmed -o Path/to/file/${SAMPLE}_R1_001.fastq \
-p Path/to/file/${SAMPLE}_R2_001.fastq
${SAMPLE}_R1_001.fastq
${SAMPLE}_R2_001.fastq
done