I am aligning RNA-seq data using STAR and will need in later steps to use sorted BAM files. I was wondering what people suggest to use for BAM sorting? The options that I have considerer/used include:
STAR --outSAMtype BAM SortedByCoordinate- but this crashes because of memory (we only have 128GB of RAM our server). That is when I'm merging lanes and have paired-end reads using STAR
STAR --ReadFilesIn read1_lane1_r1,fq,read1_lane2_r1 read1_lane1_r2,read1_lane2_r2This is fixable by limiting RAM
- simply output unsorted BAM files from STAR (which I am doing now) and use
samtools sort -b -o outSorted.bam inFromSTAR.bam
- Are there any other suggestions for the best practice to get sorted BAM files?
Are there performance differences between STAR and samtools for example? If anyone knows. And Is sorting algorithms the same similar between different tools?