Hi, I am trying to run Unicycler for hybrid assembly using the following command. However, I have more than 40 samples. I am looking to run Unicycler in a "for loop". Please suggest a bash or python script to run it.
unicycler -1 sample1_R1.fastq.gz -2 sample1_R2.fastq.gz -l sample1_ont.fastq.gz --verbosity 2 -o sample1_hybrid_assembly
unicycler -1 sample2_R1.fastq.gz -2 sample2_R2.fastq.gz -l sample2_ont.fastq.gz --verbosity 2 -o sample2_hybrid_assembly
unicycler -1 sample3_R1.fastq.gz -2 sample3_R2.fastq.gz -l sample3_ont.fastq.gz --verbosity 2 -o sample3_hybrid_assembly
.
.
I tried following code: But I am uncertain it is correct.
for f in *.fastq.gz*
do
unicycler -1 $f -2 ${f/R1/R2} -l $f -o ${f/_R1*/\/Assembly}
done
Thank you,
Thank you for the suggestion!