Doing this can dramatically increase memory requirements for STAR. If you run into this do post-processing with samtools as suggested by lieven.sterck .
Hi everyone,
I am new in rna-seq analysis and my PI asked me to run STAR alignment for one dataset with default parameters. But while I am doing this, he wanted me to get the output files in bam format and sorted by coordinate format. So I was wondering in STAR with which parameter I can get this output?
Thanks in advance
1 answer
You want to use --outSAMtype BAM SortedByCoordinate option.
See this tutorial for more info: https://hbctraining.github.io/Intro-to-rnaseq-hpc-O2/lessons/03_alignment.html
yes when I tried to run it I ran into some issues. But I am using HPC so memory is not issue for me right now. Thanks anyway
Just saying your are using HPC does not guarantee that you will not have problems. HPC is generally shared resource and your jobs may be competing with others. How much memory are you allocating for STAR and what is the genome size you are using. STAR will need 30G of RAM for plain alignments with human genome and more if you have large data files that you want to get sorted BAM from.
Log in to answer this question.
sounds like a course exercise? ;-)
in any case you can pipe the output of STAR (or post-process) to samtools, which in its turn can do the sorting and BAM output (though STAR might be able to output BAM as well)
it also will pay off to browse through the manual/doc of STAR to see which parameter settings you might need.