naobservatory / mgs-pipeline

MIT License
3 stars 1 forks source link

Get rRNA fraction with fast ribocounts() #25

Closed lennijusten closed 11 months ago

lennijusten commented 11 months ago

Added a ribocounts() function that selects up to subset_size reads from each applicable AdapterRemoval2 output, runs RiboDetector on the subset, and calculates a weighted average rRNA fraction for the entire sample.

I checked the output of fast ribocounts() for Bohl 2022 and it closely matches the previous results for the fraction of rRNA reads calculated across all the reads in the sample.

Sample ID fast ribocounts actual (old ribocounts)
SRR13167435 0.156 0.147
SRR13167436 0.178 0.177
SRR13167437 0.115 0.115
SRR13167438 0.148 0.148
SRR13167439 0.110 0.110
SRR13167440 0.0917 0.0920
SRR13167441 0.130 0.130
SRR13167442 0.0690 0.0690
SRR13167443 0.135 0.135
SRR13176755 0.218 0.220