I’m working with the MEGAN command line mode.
I want to know how to combine multiple .rma6 files created by blast2rma script.
When I simplly concatenate .rma6 files (using bash cat command) it doesn’t work because .rma6 files contain binary.
rma files can’t be concatenated. You can open two or more .rma files and then use menu items of the Sample Viewer to combined into a “total biome” file that represents the union of all the files
open file=~/filenameA
open file=~/filenameB
open file=~/filenameC
show window=samplesViewer
but it cause Error like this,
Command: show window=samplesViewer
Executing: show window=samplesViewer;
null
Command usage: show window=samplesViewer; - Opens the Samples Viewer
Error: Command failed: null
I have looked into this. I am sorry to say that there is no easy way to fix this problem (for complicated internal reasons that have to do with the fact that the sample viewer uses JavaFX, while the rest of the program uses Swing and the command line mode runs in Swing but would have to wait for the JavaFX window to open, which in turn requires some initialization in Swing…)
What were you hoping to do with the SamplesViewer in command line mode?
I want to use Samples Viewer as seeing total biome instead of concatenating several rma files (which were originally from a sample and divided).
(Like open several rma files -> compare mode -> samples viewer -> total biome -> save as megan file)
Why I am using command line mode is I want to create an rma file by just executing a job script.
(The job script includes these process: divide a fasta file -> alignment tool (parallel execution) -> blast2rma (parallel execution) -> megan command line mode using commandFile option (this megan process is what I described above))
To address this, I have just written a command-line tool for extracting the total, core or rare biome from a comparison file and will upload it later this week (both CE and UE)
For UE, I have also written a command-line comparison tool that will create a comparison file from a list of RMA, meganized DAA and megan files.
Caught:
java.awt.HeadlessException
at sun.awt.HeadlessToolkit.createCustomCursor(HeadlessToolkit.java:251)
at jloda.util.Cursors.A(Unknown Source)
at jloda.util.Cursors.getOpenHand(Unknown Source)
at jloda.graphview.GraphView.resetCursor(Unknown Source)
at jloda.graphview.GraphView.(Unknown Source)
at jloda.graphview.GraphView.(Unknown Source)
at jloda.phylo.PhyloTreeView.(Unknown Source)
at jloda.phylo.PhyloTreeView.(Unknown Source)
at megan.viewer.J.(Unknown Source)
at megan.viewer.G.(Unknown Source)
at megan.viewer.A.(Unknown Source)
at megan.core.G.A(Unknown Source)
at megan.core.G.g(Unknown Source)
at megan.core.G.Ų(Unknown Source)
at megan6u.tools.ComputeComparison.run(Unknown Source)
at megan6u.tools.ComputeComparison.main(Unknown Source)
Caught:
java.lang.NullPointerException
at megan6u.tools.ComputeComparison.run(Unknown Source)
at megan6u.tools.ComputeComparison.main(Unknown Source)
The problem is that this version of the program tries to open a window during processing.
For this to work, you will have to use the linux xvfb-run command (as described fro MEGAN in other posts).
Caught:
java.awt.HeadlessException
at sun.awt.HeadlessToolkit.createCustomCursor(HeadlessToolkit.java:251)
at jloda.util.Cursors.A(Unknown Source)
at jloda.util.Cursors.getOpenHand(Unknown Source)
at jloda.graphview.GraphView.resetCursor(Unknown Source)
at jloda.graphview.GraphView.(Unknown Source)
at jloda.graphview.GraphView.(Unknown Source)
at jloda.phylo.PhyloTreeView.(Unknown Source)
at jloda.phylo.PhyloTreeView.(Unknown Source)
at megan.viewer.J.(Unknown Source)
at megan.viewer.G.(Unknown Source)
at megan.viewer.A.(Unknown Source)
at megan.core.G.A(Unknown Source)
at megan.core.G.g(Unknown Source)
at megan6u.tools.ComputeComparison.run(Unknown Source)
at megan6u.tools.ComputeComparison.main(Unknown Source)
Caught:
java.lang.NullPointerException
at megan6u.tools.ComputeComparison.run(Unknown Source)
at megan6u.tools.ComputeComparison.main(Unknown Source)
Hello there, I’m also trying, without success, to use the compute-comparison tool, and I’m getting the same problem here, both with or without the xvfb-run command:
[lztassi@service0 tools]$ /home/lztassi/usr/bin/xvfb-run --auto-servernum --server-num=1
./compute-comparison -i /home/lztassi/global/testdb/1.INF.daa /home/lztassi/global/testdb/2.INF.daa
Version MEGAN Ultimate Edition (version 6.16.4, built 24 Jun 2019)
Copyright (C) 2019 Daniel H. Huson. This program comes with ABSOLUTELY NO WARRANTY.
Caught:
java.awt.HeadlessException
at java.desktop/sun.awt.HeadlessToolkit.createCustomCursor(HeadlessToolkit.java:159)
at jloda/jloda.swing.util.Cursors.init(Cursors.java:119)
at jloda/jloda.swing.util.Cursors.getOpenHand(Cursors.java:41)
at jloda/jloda.swing.graphview.GraphView.resetCursor(GraphView.java:3190)
at jloda/jloda.swing.graphview.GraphView.(GraphView.java:226)
at jloda/jloda.swing.graphview.GraphView.(GraphView.java:145)
at jloda/jloda.swing.graphview.PhyloTreeView.(PhyloTreeView.java:76)
at jloda/jloda.swing.graphview.PhyloTreeView.(PhyloTreeView.java:52)
at megan/megan.viewer.ViewerBase.(ViewerBase.java:91)
at megan/megan.viewer.ClassificationViewer.(ClassificationViewer.java:112)
at megan/megan.viewer.MainViewer.(MainViewer.java:72)
at megan/megan.core.Director.newProject(Director.java:673)
at megan/megan.core.Director.newProject(Director.java:656)
at megan/megan.tools.ComputeComparison.run(ComputeComparison.java:94)
at megan/megan.tools.ComputeComparison.main(ComputeComparison.java:55)
at megan6u/megan6u.tools.ComputeComparison.main(Unknown Source)
Caught:
java.lang.NullPointerException
at megan/megan.tools.ComputeComparison.run(ComputeComparison.java:95)
at megan/megan.tools.ComputeComparison.main(ComputeComparison.java:55)
at megan6u/megan6u.tools.ComputeComparison.main(Unknown Source)
/home/lztassi/usr/bin/xvfb-run: line 186: kill: (5376) - No such process
I just tried this on a linux server (running 16.04.1-Ubuntu) and it ran through. However, I was using version MEGAN 6.17.0 (both community edition and ultimate edition), so please try using that version. If the problem persists