Exporting readName_to_taxonName .txt file quite very slow

Hi everyone.

I have a .megan file containing approx. 2.6 million reads that I read in MEGAN.
Currenlty, I am exporting the readName_to_taxonName (.txt) file but the speed at which the file is being downloaded is very slow.
Are there any tips of how to make this process faster.

Thank you.

Hi @StevenKG,

It’s best to use the command-line tool (present in the MEGAN installation directory):

MEGAN/tools/daa2info -i file.daa -o out.txt -r2c Taxonomy -n true -p true

Key options

  • -i, --in — input .daa file (required)

  • -o, --out — output file (can be stdout or .gz)

  • -r2c, --read2class — list read→class assignments for one or more classifications

    • Valid: EC, EGGNOG, GTDB, INTERPRO2GO, KEGG, SEED, Taxonomy
  • -n, --names — report class names instead of IDs (true/false)

  • -p, --paths — include full classification paths

You can add more flags as needed—see the full help:

MEGAN/tools/daa2info -h

Examples

  • Taxonomy + SEED in one go:
MEGAN/tools/daa2info -i file.daa -o out.txt -r2c Taxonomy SEED -n true -p true
  • Write to gzip:
MEGAN/tools/daa2info -i file.daa -o out.txt.gz -r2c GTDB -n true -p true

If you’re on Windows, let me know, and also how much RAM you’ve allocated to MEGAN—large DAA files may need more memory.

Best regards,
Anupam

Thank you very much, Anupam, for your valuable reply.

It really helped me a lot.

Kind regards,
Steven

1 Like

Hi Anupam.

How can this be done when I am having a “.megan” file? Obtained after merging meganized DAA files.

Thank you.

Hi @StevenKG,

The .megan file is a summary file — it contains counts, sample information, metadata, etc. These files are meant to be small in size. If you want to reads or extract the actual read name to taxonomy, you’ll need to work with the alignment files — in your case, the DAA file — after Meganization.

Best,
Anupam