Trimmomatic on Fastq file
1
0
Entering edit mode
3.9 years ago
mhwaida258 • 0

I have 4 sample of fastaq file each one has two read , i want to use a loop on trimmomatic over them but i face problem with the code: my files are

BD143_TGACCA_L006_R1_001.pe.fq.gz
BD143_TGACCA_L006_R2_001.pe.fq.gz
BD143_TGACCA_L005_R1_001.pe.fq.gz
BD143_TGACCA_L005_R2_001.pe.fq.gz
BD174_CAGATC_L005_R1_001.pe.fq.gz
BD174_CAGATC_L005_R2_001.pe.fq.gz
BD225_TAGCTT_L007_R1_001.pe.fq.gz
BD225_TAGCTT_L007_R2_001.pe.fq.gz

I try to use this command line but it doesn't work any help please ?

for file in *R1_001.fq.gz; do base=$(basename ${file} _R1_001.fq.gz); trimmomatic PE -threads 1 -phred33 -trimlog trimLogFile -summary statsSummaryFile ${file} ${base}_R2_001.fq.gz ${base}_R1_001.trim.fq.gz ${base}_R1_001un.fq.gz ${base}_R2_001.trim.fq.gz ${base}_R2_001un.trim.fq.gz ILLUMINACLIP:$adap/TruSeq3-PE-2.fa:2:30:10:1 SLIDINGWINDOW:4:15 MINLEN:30 ; done
RNA-Seq software error • 1.1k views
ADD COMMENT
1
Entering edit mode

replace ; trimmomatic PE with ; echo trimmomatic PE and show us what happens

ADD REPLY
0
Entering edit mode

what exactly is not working? do you get any errors/warnings/ ... ?

ADD REPLY
0
Entering edit mode

this is what i got

trimmomatic PE -threads 1 -phred33 -trimlog trimLogFile -summary statsSummaryFile *R1_001.fq.gz *R1_001.fq.gz_R2_001.fq.gz *R1_001.fq.gz_R1_001.trim.fq.gz *R1_001.fq.gz_R1_001un.fq.gz *R1_001.fq.gz_R2_001.trim.fq.gz *R1_001.fq.gz_R2_001un.trim.fq.gz ILLUMINACLIP:/home/hwaida/miniconda3/envs/ngs1/share/trimmomatic-0.39-1/adapters/TruSeq3-PE-2.fa:2:30:10:1 SLIDINGWINDOW:4:15 MINLEN:30
ADD REPLY
0
Entering edit mode

well, that's pretty clear what is happening :-)

replace the first part with for file in $( ls *R1_001.fq.gz ) ;

it is a bit strange though the * is not expanded in your command line. You are working in a linux-bash environment, correct? and the files are located where you execute this command? (== they are thus not located in a different folder?)

I suspect the latter as this would result in the behaviour you posted above.

ADD REPLY
0
Entering edit mode

i got this: ls: cannot access '*R1_001.fq.gz': No such file or directory

ADD REPLY
0
Entering edit mode

that's your problem.....

ADD REPLY
0
Entering edit mode

sorry but i am new to bioinformatics, any suggestion to solve it, as i located where i execute command :(

ADD REPLY
0
Entering edit mode

yes i work on linux-bash environment, yes they located where i execute the command

ADD REPLY
0
Entering edit mode
3.9 years ago
GenoMax 147k

One problem is your file names have _R1_001.pe.fq.gz where as you are using _R1_001.fq.gz in your basename command. So change that (in all relevant locations in your command) and try again.

ADD COMMENT

Login before adding your answer.

Traffic: 1415 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6