Hello,

I need help using the ***CommandLine mode*** of MEGAN5.

I want to process a large set of Blast_comparisons using MEGAN5 under Linux. I use Megan5 routinely and am happy with it, but for my large number of samples I don't want to repeatedly click on the import options every time manually. 
Instead, I want to use the commandline options of MEGAN to automize this.

However I am having great trouble figuring out exactly how to do this.
My data is in tabular BLAST format with GI numbers as sequence-IDs.
I do not need to import/embed the actual sequences in my MEGAN-file.
I use the mapping files provided by the MEGAN developers to map the GI numbers in my Blast-data to Taxon-information

I tried this set of commands in a scriptfile ('MEGAN_COMMANDS.txt') for simply importing my blast_data into MEGAN5:

    load taxGIFile='/usr/local/share/db/MEGAN5_mapping/gi_taxid_nucl.bin'
    set taxUseGIMap=true
    import blastFile='/home/me/MYBLAST.tab.out' meganFile='/home/me/MYBLAST.tab.out.rma' maxMatches=100 minScore=1.0 maxExpected=0.01 topPercent=10.0 minSupport=1 minComplexity=0.0 useSeed=false useCOG=false useKegg=false usePfam=false paired=false useIdentityFilter=false textStoragePolicy=Embed blastFormat=BlastTAB mapping='Taxonomy:BUILT_IN=true,Taxonomy:GI_MAP=true,SEED:GI_MAP=false,KEGG:GI_MAP=false'

I tried supplying these commands to MEGAN5 like this:

    MEGAN -g -v -E < MEGAN_COMMANDS.txt

And like this:

    MEGAN -v -c MEGAN_COMMANDS.txt

But in both cases MEGAN just opens a blank screen and then just hangs (I have to abort it using the "kill" command in a new shell).
If I import the data by clicking manually it imports the data correctly in a matter of only a few seconds

What am I doing wrong here?

Finding [this thread][1] on SeqAnswers finally helped me find the problem!
In fact my problem was rather more simpler (and stupid) than in the mentioned thread:
Each command line in the command-file ("MEGAN_COMMANDS.txt" in my case) has to end with a semicolon. After appending semicolons to each line it worked!

Now I can finally automize my MEGAN analyses (GUI's may be nice sometimes, but just not practical for repetitive tasks)


  [1]: http://seqanswers.com/forums/showthread.php?t=43535