Thanks, I must have given up on this and forgotten about this thread, because i accidentally posted a similar question when I tried again some time later and ran into another problem: How to use scripts with MEGAN5 in commandLineMode. Turns out that after some time, I stumbled upon the same helpful SeqAnswers thread as you (but it would have been faster if I had noticed your reply first).
I like to use MEGAN5 for analyzing bins sorted from assembled metagenomes.
I since I have Blast results (against nr) in tabular format, I usually just use the "Import from BLAST"-option from the "File" Menu and specify a GI-mapping file to get obtain the taxonomy info for the blast results. (Similar I would use SEED- and KEGG- mapping files to obtain functional info).
Since I have a large number of bins that I want to analyze, it is getting rather tedious to click through the menus by hand.
Therefore I want to use the command-line interface of MEGAN5 to automize those tasks.
Loading the gi mapping file seems pretty straightforward:
load taxGIFile=/usr/local/share/db/MEGAN5_mapping/gi_taxid_prot.bin
Importing the Blast-File is also pretty straightforward:
import blastFile=blastp_nr.out.tab fastaFile=bin_79_allmarkers.faa meganFile=delmetest.rma
When I run the two above commands, first the mapping file is successfully imported, and then the BLAST-file is imported. However the taxon names are not being mapped, resulting in 100% unassigned reads.
Probably I have to use the mapping=<mapperConfiguration> argument when importing the blast file, but I have no idea what to give as actual argument. I can't find any info on how to set the "mapperConfiguration". I've tried simply passing mapping=YES as argument, but that didn't help.
Does anyone have experience on using MEGAN5 though the command-line interface?
1 answer
Ok, I figured it out with thanks to http://seqanswers.com/forums/showthread.php?t=43535
The mapping command one needs to force MEGAN to use the previously imported GI mapping file is mapping='Taxonomy:BUILT_IN=true,Taxonomy:GI_MAP=true' in the import blastFile line
If only the MEGAN command line were properly documented and included even some basic examples, it would save everyone an awful lot of time.
Log in to answer this question.
Did you ever work this out? I have exactly the same problem. I see people using
mapping='Taxonomy:BUILT_IN=true'; but it doesn't work for me.