STAR output
0
0
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!

STAR • 1.4k views
ADD COMMENT
1
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

Yes, the code above is a loop, and the job I submit to the server is completed but I only see one bam file.

ADD REPLY
1
Entering edit mode

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 before STAR 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.

ADD REPLY
0
Entering edit mode
STAR --runThreadN 8 --runMode alignReads --genomeDir  /vcu_gpfs2/home/doanc2/hg38/hg38_index --readFilesIn /vcu_gpfs2/home/doanc2/sratoolkit.3.0.0-centos_linux64/bin/fastq/SRR14168768.fastq --outFileNamePrefix /vcu_gpfs2/home/doanc2//vcu_gpfs2/home/doanc2/sratoolkit.3.0.0-centos_linux64/bin/fastq/SRR14168768.fastq --outSAMtype BAM Unsorted  
    STAR version: 2.7.10a   compiled: 2022-07-07T13:00:01-0400 fenn08:/vcu_gpfs2/global/src/cgchildr/STAR/STAR-2.7.10a/source
Aug 18 23:23:48 ..... started STAR run  
Aug 18 23:23:48 ..... loading genome  
Aug 18 23:24:06 ..... started mapping  
Aug 18 23:25:58 ..... finished mapping  
Aug 18 23:25:59 ..... finished successfully  
    STAR --runThreadN 8 --runMode alignReads --genomeDir /vcu_gpfs2/home/doanc2/hg38/hg38_index --readFilesIn /vcu_gpfs2/home/doanc2/sratoolkit.3.0.0-centos_linux64/bin/fastq/SRR14168771.fastq --outFileNamePrefix /vcu_gpfs2/home/doanc2//vcu_gpfs2/home/doanc2/sratoolkit.3.0.0-centos_linux64/bin/fastq/SRR14168771.fastq --outSAMtype BAM Unsorted  
    STAR version: 2.7.10a   compiled: 2022-07-07T13:00:01-0400 fenn08:/vcu_gpfs2/global/src/cgchildr/STAR/STAR-2.7.10a/source
Aug 18 23:25:59 ..... started STAR run  
Aug 18 23:25:59 ..... loading genome  
Aug 18 23:26:16 ..... started mapping  
Aug 18 23:27:53 ..... finished mapping  
Aug 18 23:27:54 ..... finished successfully
    STAR --runThreadN 8 --runMode alignReads --genomeDir /vcu_gpfs2/home/doanc2/hg38/hg38_index --readFilesIn /vcu_gpfs2/home/doanc2/sratoolkit.3.0.0-centos_linux64/bin/fastq/SRR14168772.fastq --outFileNamePrefix /vcu_gpfs2/home/doanc2//vcu_gpfs2/home/doanc2/sratoolkit.3.0.0-centos_linux64/bin/fastq/SRR14168772.fastq --outSAMtype BAM Unsorted  
    STAR version: 2.7.10a   compiled: 2022-07-07T13:00:01-0400 fenn08:/vcu_gpfs2/global/src/cgchildr/STAR/STAR-2.7.10a/source
Aug 18 23:27:54 ..... started STAR run  
Aug 18 23:27:54 ..... loading genome  
Aug 18 23:28:12 ..... started mapping  
Aug 18 23:29:50 ..... finished mapping  
Aug 18 23:29:51 ..... finished successfully  
    STAR --runThreadN 8 --runMode alignReads --genomeDir /vcu_gpfs2/home/doanc2/hg38/hg38_index --readFilesIn /vcu_gpfs2/home/doanc2/sratoolkit.3.0.0-centos_linux64/bin/fastq/SRR14168775.fastq --outFileNamePrefix /vcu_gpfs2/home/doanc2//vcu_gpfs2/home/doanc2/sratoolkit.3.0.0-centos_linux64/bin/fastq/SRR14168775.fastq --outSAMtype BAM Unsorted  
    STAR version: 2.7.10a   compiled: 2022-07-07T13:00:01-0400 fenn08:/vcu_gpfs2/global/src/cgchildr/STAR/STAR-2.7.10a/source
Aug 18 23:29:51 ..... started STAR run    
Aug 18 23:29:51 ..... loading genome  
Aug 18 23:30:09 ..... started mapping  
Aug 18 23:31:40 ..... finished mapping  
Aug 18 23:31:41 ..... finished successfully  
    STAR --runThreadN 8 --runMode alignReads --genomeDir /vcu_gpfs2/home/doanc2/hg38/hg38_index --readFilesIn /vcu_gpfs2/home/doanc2/sratoolkit.3.0.0-centos_linux64/bin/fastq/SRR14168776.fastq --outFileNamePrefix /vcu_gpfs2/home/doanc2//vcu_gpfs2/home/doanc2/sratoolkit.3.0.0-centos_linux64/bin/fastq/SRR14168776.fastq --outSAMtype BAM Unsorted  
    STAR version: 2.7.10a   compiled: 2022-07-07T13:00:01-0400 fenn08:/vcu_gpfs2/global/src/cgchildr/STAR/STAR-2.7.10a/source
Aug 18 23:31:41 ..... started STAR run  
Aug 18 23:31:41 ..... loading genome  
Aug 18 23:31:59 ..... started mapping  
Aug 18 23:33:44 ..... finished mapping  
Aug 18 23:33:45 ..... finished successfully  
    STAR --runThreadN 8 --runMode alignReads --genomeDir /vcu_gpfs2/home/doanc2/hg38/hg38_index --readFilesIn /vcu_gpfs2/home/doanc2/sratoolkit.3.0.0-centos_linux64/bin/fastq/SRR14168779.fastq --outFileNamePrefix /vcu_gpfs2/home/doanc2//vcu_gpfs2/home/doanc2/sratoolkit.3.0.0-centos_linux64/bin/fastq/SRR14168779.fastq --outSAMtype BAM Unsorted  
    STAR version: 2.7.10a   compiled: 2022-07-07T13:00:01-0400 fenn08:/vcu_gpfs2/global/src/cgchildr/STAR/STAR-2.7.10a/source
Aug 18 23:33:46 ..... started STAR run  
Aug 18 23:33:46 ..... loading genome  
Aug 18 23:34:04 ..... started mapping  
Aug 18 23:35:25 ..... finished mapping  
Aug 18 23:35:26 ..... finished successfully  
    STAR --runThreadN 8 --runMode alignReads --genomeDir /vcu_gpfs2/home/doanc2/hg38/hg38_index --readFilesIn /vcu_gpfs2/home/doanc2/sratoolkit.3.0.0-centos_linux64/bin/fastq/SRR14168780.fastq --outFileNamePrefix /vcu_gpfs2/home/doanc2//vcu_gpfs2/home/doanc2/sratoolkit.3.0.0-centos_linux64/bin/fastq/SRR14168780.fastq --outSAMtype BAM Unsorted  
    STAR version: 2.7.10a   compiled: 2022-07-07T13:00:01-0400 fenn08:/vcu_gpfs2/global/src/cgchildr/STAR/STAR-2.7.10a/source
Aug 18 23:35:26 ..... started STAR run  
Aug 18 23:35:26 ..... loading genome  
Aug 18 23:35:44 ..... started mapping  
Aug 18 23:37:11 ..... finished mapping  
Aug 18 23:37:12 ..... finished successfully  
    STAR --runThreadN 8 --runMode alignReads --genomeDir /vcu_gpfs2/home/doanc2/hg38/hg38_index --readFilesIn /vcu_gpfs2/home/doanc2/sratoolkit.3.0.0-centos_linux64/bin/fastq/SRR14168783.fastq --outFileNamePrefix /vcu_gpfs2/home/doanc2//vcu_gpfs2/home/doanc2/sratoolkit.3.0.0-centos_linux64/bin/fastq/SRR14168783.fastq --outSAMtype BAM Unsorted  
    STAR version: 2.7.10a   compiled: 2022-07-07T13:00:01-0400  fenn08:/vcu_gpfs2/global/src/cgchildr/STAR/STAR-2.7.10a/source
Aug 18 23:37:12 ..... started STAR run  
Aug 18 23:37:12 ..... loading genome  
Aug 18 23:37:30 ..... started mapping  
Aug 18 23:38:35 ..... finished mapping  
Aug 18 23:38:36 ..... finished successfully

Does it look correct? It is hard to copy here and keep the same format.

ADD REPLY
1
Entering edit mode

/vcu_gpfs2/home/doanc2//vcu_gpfs2/home/doanc2/sratoolkit.3.0.0-centos_linux64/bin/fastq/SRR14168783.fastq

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.

ADD REPLY
0
Entering edit mode

Thank you so much! I saw the issue.

ADD REPLY
1
Entering edit mode

Were you able to correct it or do you need some help?

ADD REPLY
0
Entering edit mode

Yes, I fixed it. The server is a little bit different than the standard command line.

ADD REPLY

Login before adding your answer.

Traffic: 1427 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6