smithlabcode / ribotricer

A tool for accurately detecting actively translating ORFs from Ribo-seq data
http://doi.org/djv4
GNU General Public License v3.0
28 stars 8 forks source link

Question about handling of non-unique alignments #159

Closed mosi223 closed 2 months ago

mosi223 commented 2 months ago

Dear Ribotricer developers,

According to the documentation, it is recommended to include outFilterMultimapNmax 1 parameter in STAR alignment to exclude non-unique alignments and reduce noise for downstream analyses.

In case of default outFilterMultimapNmax 10 setting, how does Ribotricer handle non-unique alignments? Are they included in ORF detection? Does Ribotricer differentiate between primary and secondary alignment flags when dealing with multi-mapped reads?

Thank you very much!

saketkc commented 2 months ago

Thanks for your question. We only use uniquely mapping reads (https://github.com/smithlabcode/ribotricer/blob/7a7d8e2a95a55466f5d2fad3219533583532b804/ribotricer/bam.py#L78C22-L78C42). The recommendation of switching on outFilterMultmapNmax to 1 is to ensure the downstream tasks are quicker (no multimapping -> smaller bam). but we perform filtering inside anyway.

Hope it helps!

mosi223 commented 2 months ago

Great! Thank you very much for the speedy answer!