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
replace
; trimmomatic PE
with; echo trimmomatic PE
and show us what happenswhat exactly is not working? do you get any errors/warnings/ ... ?
this is what i got
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.
i got this: ls: cannot access '*R1_001.fq.gz': No such file or directory
that's your problem.....
sorry but i am new to bioinformatics, any suggestion to solve it, as i located where i execute command :(
yes i work on linux-bash environment, yes they located where i execute the command