Compare 100+ samples using command-line



I’m using the following command to generate a comparison file from two RMA6 MEGAN files (I’m using the MEGAN 6 Ultimate Edition’s command-line in a mac):

$ /Applications/MEGAN_Ultimate-Edition/ -g -E < CompareSamples.txt

where CompareSamples.txt contains the following commands:

compare mode=RELATIVE meganfile=’/path/to/file1.rma6’ ‘/path/to/file2.rma6’;
save file=’/path/to/comparing-two-files.megan’

Now, my question is whether there’s a more elegant/optimum way to specify a large number of file names in the “compare” command, specifically in the “meganfile=…” parameter. I have 115 samples that I would like to compare. I could add all 115 sample names individually to my CompareSamples.txt file but I’m wondering if there’s a more optimum way to pass all sample names to my command file? Perhaps something like reading a list from a file or opening all RMA6 files in a specific directory. Not sure if MEGAN command line supports this kind of interactions?

Any thoughts or suggestions would be much appreciated!

Thank you very much :smiley:

Compare two RMA datasets using the command-line - Internal error: document already used

in the next update you will be able to specify one or more directories which will recursively traversed


Excellent! thanks a lot for this Daniel :slight_smile: Looking forward to the next update :wink: