I'm writing a shell script for alignment.
Where sample ID stored in SampleID.txt
, for this I use a example SRR534526
, fastq file names are SRR534526_1.fastq.gz
SRR534526_2.fastq.gz
My command:
while read -r line;
do name=$line;
# Rum alignment using STAR, this gives SAM file
/software/STAR/STAR_2.3.1z12/STAR --genomeDir ~/Homo_sapiens_assembly19_STAR/ --readFilesIn $name_1.fastq.gz $name_2.fastq.gz --readFilesCommand zcat --runThreadN 20 --outFileNamePrefix $name
cd ..
done < 'SampleID.txt'
Error report: gzip: .fastq.gz: No such file or directory
Apparently, the problem is $name_1.fastq.gz
is not recognized as SRR534526_1.fastq.gz
Could anyone help? Thanks.
Thanks, seams working!