Hi, when using taxonomy2function (-mro) with the MEGAN Ultimate version 6.24.15 the job is cancelled and I get java error: Too many open files
I have a total of 44 .daa files in the directory that I run taxonomy2function:
taxonomy2function -i *.daa -o taxonomy2function.txt -a Taxonomy -b KEGG -af path -bf path -l counts -s tab -au true -bu false -sh true -ps semi-colon -mro
The error comes when analyzing the third file at step:
Processing: Second classification
10% 20% 30% 40% 50% 60% 70% 80% 90% Caught:
java.io.FileNotFoundException: sample3.daa (Too many open files)
I took a look at this, but it is not obvious what the problem is. As a work around, run the program multiple times, using a smaller number of files per run.
I can do that and that is a good workaround, it is also faster (i.e. one file per job).
Is there an easy way to then merge all the output files (as the taxonomy2function already does this)?
The tools/compute-comparison program can take multiple files and create a comparison file for them.
As I understand the compute-comparison tool only works with daa or rma files.
After running taxonomy2function I will get one .txt per sample. These txt files need to be merged to one joint table. Taxonomy2 function does this already when l being run as one command on multiple samples, but now gives the java error.
The function to join the tables was added in version 21.16: Taxonomy2function suggestions - #2 by Daniel
But i am not sure how this is done if i run each sample separately using taxonomy2 function.
Sorry, you are right. Compute-comparison is not the tool that you want.
I will take another look at the code to try and figure out why the “Too many open files” error occurs.
I ran the program on 50 files with no problems on my laptop. So, I’m wondering whether you ran program on a server that was also busy with other jobs?
After I remove -mro from my command line it works. So the Java error “Too many open files” definitely has something to do with -mro.