OutOfMemoryError: GC overhead limit exceeded

Dear All,
I am very new to MEGAN. I have metagenomics shotgun data. After quality filtering, I started with DIAMOND workflow.
I downloaded env_nr database and run makedb in DIAMOND followed by :
diamond blastx -d nr -q GRC17.fa -o --da GRC17.daa
Then in MEGAN I executed the following command:
./daa2rma -i ~/Desktop/data/grc/diamond-master/GRC17.daa -o GRC17.rma -g2t gi2tax.bin
I got the following error message
Version MEGAN Community Edition (version 6.13.5, built 7 Jan 2019)
Copyright © 2018 Daniel H. Huson. This program comes with ABSOLUTELY NO WARRANTY.
Loading ncbi.map: 2,031,704
Loading ncbi.tre: 2,031,708
Opening file: gi2tax.bin
In DAA file: /home/grc/Desktop/data/grc/diamond-master/GRC17.daa
Output file: GRC17.rma
Classifications: Taxonomy
Parsing file: /home/grc/Desktop/data/grc/diamond-master/GRC17.daa
10% 20% 30% 40% 50% 60% 70% 80% 90% 100% (4623.0s)
Total reads: 4,746,551
Alignments: 37,768,334
100% (0.0s)
Binning reads: Initializing…
Initializing binning…
Using ‘Naive LCA’ algorithm for binning: Taxonomy
Binning reads…
Binning reads: Analyzing alignments
Exception in thread “main” java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.lang.String.substring(String.java:1969)
at megan.parsers.sam.Diff.decode(Diff.java:125)
at megan.parsers.sam.Diff.getReference(Diff.java:46)
at megan.parsers.sam.SAMMatch.computeAlignmentPair(SAMMatch.java:978)
at megan.parsers.sam.SAMMatch.computeAlignment(SAMMatch.java:860)
at megan.parsers.sam.SAMMatch.getBlastXAlignment(SAMMatch.java:576)
at megan.parsers.sam.SAMMatch.getBlastAlignmentText(SAMMatch.java:356)
at megan.rma6.MatchBlockRMA6.getText(MatchBlockRMA6.java:227)
at megan.rma6.MatchBlockRMA6.getPercentIdentity(MatchBlockRMA6.java:152)
at megan.algorithms.ActiveMatches.compute(ActiveMatches.java:50)
at megan.algorithms.DataProcessor.apply(DataProcessor.java:235)
at megan.core.Document.processReadHits(Document.java:538)
at megan.rma6.RMA6FromBlastCreator.parseFiles(RMA6FromBlastCreator.java:298)
at megan.tools.DAA2RMA6.createRMA6FileFromDAA(DAA2RMA6.java:340)
at megan.tools.DAA2RMA6.run(DAA2RMA6.java:303)
at megan.tools.DAA2RMA6.main(DAA2RMA6.java:64)

When I checked the other posts, It represents the memory error. My RAM is 128 GB
How do I edit MEGAN.vmoptions file? I have attached my MEGAN.vmoptions fil. Kindly help meMEGAN.vmoptions (253 Bytes)

Hi,

the line with -Xmx2000M sets the maximum amount of RAM MEGAN is allowed to use in your .vmoptions file. Please increase it. M is for MB, and G is for GB. e.g. -Xmx50G will allow MEGAN to use 50 GB of RAM.

Hi
Thank you for your reply. I got the rma file. When I import the rma file in MEGAN6, I did not any taxonomic classification. Where I have gone wrong?
I have attached my rma file for your reference

Hi,

The webserver probably rejected the rma file because of its size. Can you please rather post the command you used to produce the rma file?

Thanks.

I followed the following steps:

  1. Mapped with human genome to remove contamination using bowtie
  2. Retrived the unmapped paired-end reads and merged as single file
  3. In diamond for makedb, I used env_nr database (ftp://ftp.ncbi.nlm.nih.gov/blast/db/FASTA/env_nr.gz)
  4. diamond blastx -d env_nr -q GRC17.fa -o --da GRC17.daa
  5. daa2rma -i ~/Desktop/data/grc/diamond-master/GRC17.daa -o GRC17.rma -g2t gi2tax.bin

The problem is in the daa2rma command. You need to -a2t instead of -g2t as nr uses accessions instead of gi numbers. And you need the accession mapping file, available in http://ab.inf.uni-tuebingen.de/data/software/megan6/download/prot_acc2tax-Nov2018X1.abin.zip instead of gi2tax.bin

You can also use daa-meganizer instead of daa2rma, which will append classifications to the existing daa file, instead of creating an rma file.

Best,
Caner