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