Hi,
I have 30 samples, each was sequenced in 3 flow cells in all 8 lanes. So I have three directories: FC1, FC2, and FC3. Inside FC1, there are 30 sub-directories: Sample_1, Sample_2,...,Sample_30. Inside Sample_1, e.g., there are 8 files for forward and 8 files for reverse (pair-end). All are .gz files.
I wrote a shell script to concatenate all the fastq reads from the same sample so that each sample has two fastq files: Sample_1_R1.fastq and Sample_2_R2.fastq (reverse).
for i in `seq 1 30`
do
gzip -dc Sample_${i}/*_R1_*fastq.gz >>Sample_${i}/Sample_${i}_R1.fastq ## forward
done
There are bugs but I can't figure out. Wonder what did I do wrong? Or someone here can show me a btter way to do this?
thanks
John
I have 30 samples, each was sequenced in 3 flow cells in all 8 lanes. So I have three directories: FC1, FC2, and FC3. Inside FC1, there are 30 sub-directories: Sample_1, Sample_2,...,Sample_30. Inside Sample_1, e.g., there are 8 files for forward and 8 files for reverse (pair-end). All are .gz files.
I wrote a shell script to concatenate all the fastq reads from the same sample so that each sample has two fastq files: Sample_1_R1.fastq and Sample_2_R2.fastq (reverse).
for i in `seq 1 30`
do
gzip -dc Sample_${i}/*_R1_*fastq.gz >>Sample_${i}/Sample_${i}_R1.fastq ## forward
done
There are bugs but I can't figure out. Wonder what did I do wrong? Or someone here can show me a btter way to do this?
thanks
John
Comment