MEGAN 6.10.3 and 6.9.x: blast2rma with LastMAF fails

Hi Daniel,

Thanks for all your work, sorry to have to report a bug again.

I have finally tried the blast2rma tool with sorted LastMAF data, but get the below error both with 6.10.3 and 6.9.3. I also tried an non-gzipped file. (I haven’t tried with other file suffixes.)

The exact same file imports fine from the GUI.

/Daniel

xvfb-run --auto-servernum --server-num=1 \
  /usr/local/megan/tools/blast2rma --in dada2.cleaned.merged.bimeras.refseq_rna.maf.sorted.gz \
  --out dada2.cleaned.merged.bimeras.refseq_rna.rma6 \
  --format LastMAF \
  --blastMode BlastN \
  --lcaAlgorithm weighted --acc2taxa megan/nucl_acc2tax.abin
Version   MEGAN Community Edition (version 6.10.3, built 9 Nov 2017)
Copyright (C) 2017 Daniel H. Huson. This program comes with ABSOLUTELY NO WARRANTY.
Loading ncbi.map: 1,601,128
Loading ncbi.tre: 1,601,131
Opening file: megan/nucl_acc2tax.abin
Processing LastMAF file: dada2.cleaned.merged.bimeras.refseq_rna.maf.sorted.gz
Output file:  dada2.cleaned.merged.bimeras.refseq_rna.rma6
Classifications: Taxonomy
Parsing file: dada2.cleaned.merged.bimeras.refseq_rna.maf.sorted.gz
Caught:
java.io.IOException: File not a LAST file in MAF format: dada2.cleaned.merged.bimeras.refseq_rna.maf.sorted.gz
        at megan.parsers.blast.LastMAF2SAMIterator.<init>(LastMAF2SAMIterator.java:59)
        at megan.parsers.blast.IteratorManager.getIterator(IteratorManager.java:58)
        at megan.rma6.RMA6FromBlastCreator.parseFiles(RMA6FromBlastCreator.java:155)
        at megan.tools.BLAST2RMA6.createRMA6FileFromBLAST(BLAST2RMA6.java:346)
        at megan.tools.BLAST2RMA6.run(BLAST2RMA6.java:303)
        at megan.tools.BLAST2RMA6.main(BLAST2RMA6.java:62)

Did you use sort megan/tools/sort-last-maf to sort?
Could you send me the first 1000 lines of such a file
Thanks
daniel

Yes, I sorted the file with this make recipe:

%.refseq_rna.maf.sorted.gz: %.refseq_rna.maf.gz %.fna.gz
$(MEGAN_INSTALL_DIR)/tools/sort-last-maf --input $< --readsFile $(word 2,$^) --output $@

Attached.

sequences.refseq_rna.mafsorted (220.8 KB)

/Daniel

The file exports nicely, but MEGAN doesn’t like the file suffix, should be .maf, not .mafsorted

Also, look into using maf2daa, this will create a DAA file which is smaller and more versatile than an RMA file

Thank you.

I was surprised to see that the maf2daa does not take a --blastMode flag – is it only for protein sequences? Does it matter? (My data is blastn.)

/Daniel

sorry, yes, at present we only support BLASTX files in MAF format. I will look into BLASTN support

Datenschutzerklärung