Using malt-build with .db mapping files


I’m running a metabarocoding analysis and am trying to build a reference index with with malt-build (0.41) using the megan-nucl-Jul2020.db mapping file, but I get a java.lang.NullPointerException and thus the index is not correctly built (all taxonomy assignments are reported as No hits in Megan). The same happens with an older megan-map-Oct2019.db, but not with the nucl_acc2tax-Jul2019.abin. So I guess it has something to do with transforming to SQLite database and malt-build not reading the mapping .db files.

Going through other reports/crashes on the Megan CE pages I found a similar report from January this year, regarding Aadder-build java.lang.NullPointerException with the new .db file, where it was pointed out that aadder-build (at that time) still required .abin mapping files. I think this was sorted in the next Megan release for aadder-build.

Probably this is a similar issue. Next to using the nucl_acc2tax-Jul2019.abin, which is a bit outdated, can we expect a new version of malt that will be compatibly with .db files.

Going through old posts on the website I found a workaround but it requires quite a lot of memory. I downloaded the mapping file from ncbi ( and prepared a text acc2tax mapping file from it with this command:
gunzip nucl_gb.accession2taxid.gz|cut -f1,3 |gzip >

As I had access to a suitable server with sufficient memory I was able to build the index. However, I am still not 100% sure this is a correct path?


Hi David, I am looking into the problems with MALT and the use of a mapping database. I should be able to upload a fix very soon.


Thank you!


I have uploaded a new release, please try it out

Hi Daniel, I just saw this thread.

I went to check what changes have been made, but I saw in the release notes that now the older versions e.g. v0.4.1 and v0.4.0 are now missing. Is this correct (as in v0.5 was based on the older v0.3) or is this a mistake?

I also checked Github ( but this doesn’t appear to have the latest release.

I have tried the new release and run it locally on my laptop. It worked perfectly.

Malt-build had no problems with creating a reference index using the .db mapping files (I tested it on a rather big reference dataset with many man metazoan taxa from several phyla). I have used the created reference index to assign taxonomies to a smaller sample with Malt-run and the output was what I was expecting.

Thank you for your quick reply and for fixing the issue!

All best,