alexdobin / STAR

RNA-seq aligner
MIT License
1.86k stars 506 forks source link

Deterministic choice of primary alignment #1391

Open ankebusch opened 3 years ago

ankebusch commented 3 years ago

Hi Alex,

As stated in the STAR manual, when setting --outMultimapperOrder to Random, ordering of multi-mapping alignments of each read and the choice of the primary alignment will vary from run to run (in case multiple cores are used). It would be great, if the random ordering of multi-mapping reads could be deterministic also when multiple cores are used. Do you plan to implement this in the future or are there any technical limitations which may prevent that?

Thanks you! Anke.

alexdobin commented 3 years ago

Hi Anke,

unfortunately, this is not easy in the current implementation, where each thread has its own random stream. As a workaround, you can re-randomize all alignments for the same reads when processing the BAM file.

Cheers Alex

ankebusch commented 3 years ago

Thanks for the fast reply and the suggestion, Alex. I will play a bit with my BAM files and compare runtimes of re-randomizing after mapping with multiple cores vs. deterministic random mapping on just one core.