How to perform corrected Cell Barcode/UMI calling with an externally sorted BAM?
0
0
Entering edit mode
8 days ago
mk ▴ 300

I require Cell Barcode / UMI calling but am unable to sort BAMs within STARsolo due to a limited system RAM. When I set limitBAMsortRAM==<ammount of RAM on my system>, STAR throws the following error:

EXITING because of fatal ERROR: not enough memory for BAM sorting: 
SOLUTION: re-run STAR with at least --limitBAMsortRAM 273246110398

Proposed solution:

  1. Run STARsolo with
  2. run samtools sort with my hard memory limits as follows:
    samtools sort -m ${BAMSORTRAM} -@ ${BAMSORTNTHREADS} -o "${base}_STARsolo/${base}_Aligned.sortedByCoord.out.bam" "${base}_STARsolo/${base}_Aligned.out.bam"
    

So how do I re-run STARsolo just to call Barcodes/UMIS on:

  1. the original alignment (which produced the unsorted BAM subsequently aligned with samtools above) and the subsequently sorted BAM
  2. the sorted BAM from samtools (command shown above)
bam alignment starsolo star • 324 views
ADD COMMENT
0
Entering edit mode

If you can't make starsolo work with hardware you have then perhaps look into alevin-fry instead: https://combine-lab.github.io/alevin-fry-tutorials/2023/simpleaf-piscem/

ADD REPLY
0
Entering edit mode

Try setting a high number for outBAMsortingBinsN.

Also, use the latest version of STAR.

Finally, your FASTQ files might have already been pre-sorted, so you can try shuffling the reads in your FASTQ files.

STARsolo shouldn’t take almost 300 gb of memory to sort a BAM file… I’m fairly certain that doing some or all of the above will fix it.

ADD REPLY

Login before adding your answer.

Traffic: 1491 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