Missing Aligned.sortedbyCoord.out.bam file after using STAR

121 views Asked by At

I am new to RNA-Sequencing and I am having trouble with my alignment. I am using STAR and I seem to be missing one of the output files I believe I need for the next step. I can not find my Aligned.sortedbyCoord.out.bam file.

Here is the command I am using:

STAR --runThreadN 6 --genomeDir %s --readFilesIn %s %s --readFilesCommand gunzip -c --outFileNamePrefix %s --outSAMtype BAM SortedByCoordinate BAM_SortedByCoordinate–outStd BAM_SortedByCoordinate –quantMode TranscriptomeSAM GeneCounts
2

There are 2 answers

0
Chloe Ulsh On

I have had a similar problem with STAR before. If you remove the --outStd flag, the sortedbycoordinate and the transcriptome files will be separate. Otherwise, at least in my case, you end up with only the transcriptome files. Best of luck!

0
ATpoint On

As indicated in the manual of STAR, --outStd sends the output to stdout which by default is the screen, so it is lost. You need to remove this flag, or capture stdout to a file, for example:

STAR (...) > out.bam

Unrelated to this, since you're new it might be a good idea to not use any of the STAR sorting options and just output unsorted BAM files as this takes a lot of memory. You can always use the more efficient samtools sort later if sorted files are needed which often is not even the case.