Entering edit mode
2.3 years ago
Chris
▴
340
I run this code:
for file in /home/doanc2/sratoolkit.3.0.0-centos_linux64/bin/fastq/*.fastq; do
STAR --runThreadN 8 \
--runMode alignReads \
--genomeDir /home/doanc2/hg38/hg38_index \
--readFilesIn ${file} \
--outFileNamePrefix /home/doanc2/${file} \
--outSAMtype BAM Unsorted; done
There are 8 fastq files but I have only one bam file output. Would you please explain why? Thank you so much!
If these are paired end files then you need to do something like this: alignment with STAR for loop multiples files
Your loop may still be running since it will take a while to complete each job.
Yes, the code above is a loop, and the job I submit to the server is completed but I only see one bam file.
I see. If the loop completes but only makes one BAM file then there must be an issue with the command lines being generated.
Add an
echo
command beforeSTAR
in your loop. This will simply print all the command lines to screen. Take a look at the command lines to make sure they look correct.Does it look correct? It is hard to copy here and keep the same format.
Because you are not stripping off the directory path from your fastq file entries you are getting these weird names for output prefix. I doubt there are actual files in
/vcu_gpfs2/home/doanc2//vcu_gpfs2/home/doanc2/sratoolkit.3.0.0-centos_linux64/bin/fastq/
since the jobs seem to be completing in less than one minute.Thank you so much! I saw the issue.
Were you able to correct it or do you need some help?
Yes, I fixed it. The server is a little bit different than the standard command line.