Hi guys,
I was having a try to run Nextseq data set with Spades. I have 4 fr reads and 4 re reads of each bacterial strains. To run assembly I wrote simple shell script, but the problem coming to take input by Spades. Can anyone help me out to find my error in this script.
for R1 in *R1*.fastq.gz
do
echo $R1
R2=`echo $R1 | sed 's/_R1_/_R2_/'`
bname=`echo $R1 | sed 's/_R1_.\+//'`
echo $R2
python spades.py --pe1-1 $R1 \--pe1-2 $R2 --pe1-1 $R1 \--pe1-2 $R2 --pe1-1 $R1 \--pe1-2 $R2 --pe1-1 $R1 \--pe1-2 $R2 -o $bname
done
== Error == file /home/jc/bio-tool/SPAdes-3.1.0-Linux/bin/1-31-18019401_S1_L003_R2_001.fastq.gz was specified at least twice
Your are specifying the very same read set 4-times. Please change
to
Hi Piet,
It would take first two file as a input. Not all 4 fr reads and 4 rev reads. Is it not? Or else I am missing something?
You can run your script in debugging mode if you want to see what it really does. Store your script in a file named
myfirstloop.sh
and run it with options-v
(verbose) and-x
(expand commands):