[SOLVED] Add 'summarised count' option to rma2info

Context

I recently came across the rma2info tool that comes with MEGAN6, and after writing a wrapper script that merges multiple outputs from rma2info into a single table, I find it useful for generating taxon/OTU tables from RMA6 files generated by MALT (as currently MEGAN Server is broken for us, I can’t download 100 RMA6 files to my personal machine :grimacing:).

Problem

The only limitation at the moment is that when filtering to a particular taxonomic rank, such as genus, the numbers reported are only for LCA placed counts at that particular node. Therefore everything below a given genus node (e.g. at species) is not included (however this is something I’m more interested in).

Request

Given the summarised option is avaliable in the MEGAN6 codebase, and as far as I can see from the terminal messages, that is what rma2info is using: would it possible to add an option to rma2info so that it outputs summarised counts?

What is the issue with MeganServer? I’d be keen to fix that…

I have added an option --sum to rma2info and daa2info that tells the program to use summarized counts when listing “class to count”.

I have done some simple checks and I think that the code performs correctly, but please ensure yourself that it works as intended on your data and let me know of any problems.

I will upload a new release today (V6_21_7)

Awesome thank you very much! I will test it and report back here.

Regarding MeganServer, I’ll make a new issue for it. I was still trying to see yesterday if it was a java update issue or backend configuration change because it worked in the past, but I couldn’t find any more logging info to help identify the cause - I’ll make a new issue for that later today.

I have uploaded the new release…

MeganServer should write exceptions etc to the console, so try to capture that. Just want to double-check: you have been using megan-server that is shipped with MEGAN, not the old, discontinued program that we released a number of years ago (separate from MEGAN) and that was provided as a separate download?

Thank you! I’ll check it this afternoon.

Aha… that could actually definitely be the case given the creation date of the megan server files are from 2015… (but good code, that it was still working for at least 5 years ;))

I will try the shipped-with-MEGAN first before reporting anything else. That’s a good catch thanks!

@Daniel I can confirm both that the summarised option in rma2info works exactly as I wanted (has the same values as a table manually exported by MEGAN), and the bundled megan-server also works. So I’m a happy bunny - thanks again!

For reference, this is bash wrapper script around rma2info I made for making tables from multiple rma6 files: https://github.com/jfy133/rma-tabuliser