I am trying out MEGAN Ultimate Edition with the command line mode.
I have created from multiple samples a megan file with metadata.
/Applications/MEGAN-UE/tools/compute-comparison -i ../data/diamond-alignment-archives-meganized -o ../data/comparison.megan --normalize true --metaDataFile ../data/metadata.tsv.txt --ignoreUnassignedReads false --verbose
When opening the megan file in the MEGAN UE GUI, the metadata is shown in the SampleViewer.
But, when I open and show the SampleViewer with commands in commandline mode, the SampleViewer is empty.
Also there are bugs in the SampleViewer component, because coloring by an attribute with 3 distinct values results in samples colored only by 2 instead of 3 colors.
My metadata file is simple a tab separated values file. The header has a column “#SampleID”, some column headers have a ‘’ in the text. The text contains letters, numbers, ‘-’, '’, ‘(’, ‘)’ and ’ '. e.g.
#SampleID Sample Col_3 Col4 Sample-A01_1 A01 aaaa B dddd (p t) Sample-A02_1 A02 aaaa B e (rrrrr cccc) Sample-A03_1 A03 xxxx Z dddd (p t) Sample-A04_1 A04 xxxx Z e (rrrrr cccc) Sample-A05_1 A05 aaaa Z dddd (p t) Sample-A06_1 A06 aaaa Z e (rrrrr cccc)
Simple commands ‘megan-cmd.txt’ I run to show the sample viewer:
new document; open file='/Users/user/data/comparison.megan' show window=samplesViewer;
I run the ‘megan-cmd.txt’ megan command with:
/Applications/MEGAN-UE/MEGAN.app/Contents/MacOS/JavaApplicationStub -g -E < ./megan-cmd.txt
The log output does not show an error, but just a warning about some “embedded input file” not found.
Version MEGAN Ultimate Edition (version 6.24.11, built 1 Dec 2022) Author(s) Daniel H. Huson Copyright (C) 2022 Daniel H. Huson. This program comes with ABSOLUTELY NO WARRANTY. Java version: 126.96.36.199 License Type: Trial Name: xxxx Executing: version; MEGAN Opening startup files Open startup files: Loading ncbi.map Loading ncbi.map: 2,396,736 Loading ncbi.tre Loading ncbi.tre: 2,396,740 updating viewer MEGAN> Command: new document; Executing: new document; Executing: ; MEGAN> Command: open file='/Users/user/data/.megan' Executing: open file='/Users/user/data/comparison.megan'; Warning: Merged file: embbedded input files not found Info: Opened file 'comparison.megan' with 6,464,328 reads Executing: update; updating viewer MEGAN> Command: show window=samplesViewer; Executing: show window=samplesViewer;
As you can see, not even the list of samples are shown to the left on the SampleViewer.
It is also strange, that if I click on import metadata, all txt files are sometimes disabled for selection, so I cannot chose them. But sometimes I can, when I use the GUI after restarting MEGAN.
When I want to color samples by an attribute in the GUI directly (not commandline), the coloring is also done incorrectly. If there are 3 distinct values for an attribute, MEGAN uses only 2 colors.