Hello everyone, newbie question here. I have 9 paired-end RNA-seq fastq files. I have done some qc with FastQC. My reads are of good quality as everything has the green check mark except the adapters. I have some questions, to clip the adapters or not to, and is it possible to write the trimmomatic script to only clip adapters, i.e no trimming? Also, where I am going wrong in the script below? When I run it, it runs foe 1 second and gives a "completed" exit code.
Many thanks
for R1 in *R1*
do
R2=${R1//R1_001_.fastq.gz/R2_001_.fastq.gz}
R1paired=${R1//.fastq.gz/_paired.fastq.gz}
R1unpaired=${R1//.fastq.gz/_unpaired.fastq.gz}
R2paired=${R2//.fastq.gz/_paired.fastq.gz}
R2unpaired=${R2//.fastq.gz/_unpaired.fastq.gz}
echo "java -jar /c1/apps/trimmomatic/Trimmomatic-0.33/trimmomatic-0.33.jar PE
-phred33 -trimlog Trimmed.txt $R1 $R2 $R1paired $R1unpaired $R2paired $R2unpaired
ILLUMINACLIP:/c1/apps/trimmomatic/Trimmomatic-0.33/adapters/TruSeq3-PE.fa:2:30:10"
>> trimmomatic.cmds
done
Thank you h.mon. I'll take a look at the links.
Hi h.mon, Could you please take a look at my script and tell me where I am wrong?
module load trimmomatic
This is the error message I get the error message below:
Thank you
Are you editing the error message? The command line shows the input fastq names are
Control-1_R1_001.fastq.gz Control-1_R1_00.fastq.gz
, but the error message says:Again, I see two errors in your loop:
1) you are globing both R1 and R2 filenames with
for f1 in *.fastq.gz
, you want something like:2) your manipulation of the value of
$f1
here is wrong, hence you are passing the non-existing fileControl-1_R1_00.fastq.gz
, instead of the correctControl-1_R2_001.fastq.gz
. You have to modifyf2=${f1%%1.fastq.gz}".fastq.gz"
to:Thank you! Yes, I see where my errors are coming from now. Also, I did attempt to de-identify the sample by editing the name in the output file.Again, thanks a lt, you have been a ton if help.