I'm new to RNAseq data analysis and want to generate BAM files from 204 fastq files. So, I wrote a very basic for loop to run the same command for all my fastq files. However, since STAR saves every BAM file with the same name, I'm having an overwriting problem. Here is the code that I run:
for ((i=102; i<=305; i++)); do ./STAR --readFilesIn fastq/E08/SRR2930$i.fastq --outSAMunmapped Within --outSAMtype BAM SortedByCoordinate --outSAMmultNmax 1 --genomeDir STARindex --twopassMode Basic --runThreadN 12; done
--outFileNamePrefix option as well, but could not solve the issue. I'd be glad if you could help me with this.