dincarnato / RNAFramework

RNA structure probing and post-transcriptional modifications mapping high-throughput data analysis
http://www.rnaframework.com
GNU General Public License v3.0
35 stars 11 forks source link

Merge mutation map (MM) files? #16

Closed nickforino closed 3 years ago

nickforino commented 3 years ago

Hi Danny,

Is merging of mm files a planned feature?

I'm in a scenario where I plan to use DRACO on a large target that I've tiled across when making my library, which is making the way I use mask files during counting a bit complicated.

Usually, I map reads from each 'tile' of my target, run rf-count on for bam for each tile with its appropriate mask file, then merge the final RC files together. However, since mm files are generated at the counting step, I appear to be forced into merging bam files prior to counting. This introduces the following issue: some alignment positions in the merged bam will have a mixture of wildtype sequence (due to primer binding in one 'tile') and bona fide mutational signal (from an overlapping 'tile).

If I was able to merge mm files, I could count each of my bams seperately with their appropriate mask, then merge everything together for DRACO. Any advice you have would be greatly appreciated, and let me know if you need any clarification with my question.

Best, Nick

dincarnato commented 3 years ago

Hi Nick,

This is something we did not originally plan. Also, at present, the mask file is only affecting the RC file, but not the MM file. I should look into this, and get back to you.

Best, Danny

nickforino commented 3 years ago

Thanks for the quick reply, Danny. Sounds good, thank you for looking into this.

Best, Nick

dincarnato commented 3 years ago

Hi Nick,

I have now updated rf-count to apply the mask also to the MM files. Furthermore, please find attached a small script that will allow you to combine MM files from different rf-count runs. Usage is very simple:

./combine_mm ...

The scripts expects to find in the same folder as the MM files also an index file with the same filename, but the .mmi extension (this is automatically generated by rf-count at runtime). You will only need to edit the script and replace in the "use lib" instruction, the path to the "lib" folder of the RNA Framework install on your system.

Hope this helps! Best,

Danny

combine_mm.zip

nickforino commented 3 years ago

Hi Danny,

The script works like a charm, this enables me to do DRACO experiments now. Thank you for your amazing support, Danny!

Cheers, Nick