Too many open files on exporting reads


#1

When we try to export the reads for all Bacteria (taxon id 2) in command line mode, we get the message: “too many open files”. I think MEGAN is trying to open a file for each of 6190 subnodes, when my maximum number of open files (ulimit -n) is 5000. The message is not fatal, and there is still output, but I guess it is incomplete.
What do you suggest? Could MEGAN be updated to close files as it traverses the sub-tree? Grateful for any suggestions.

MEGAN> Command: open file='/home/data/mmeg_sarisa/Transcriptomics/bioinf_analysis_March/meganize/LIB31209_LDI28071_RS-C-BS-2M_PRO1741_S35.meg.daa';update;
Executing: open file='/home/data/mmeg_sarisa/Transcriptomics/bioinf_analysis_March/meganize/LIB31209_LDI28071_RS-C-BS-2M_PRO1741_S35.meg.daa';update;
Info: Opened file '/home/data/mmeg_sarisa/Transcriptomics/bioinf_analysis_March/meganize/LIB31209_LDI28071_RS-C-BS-2M_PRO1741_S35.meg.daa' with 7,530,498 reads
Executing: update;
updating viewer...
Induced tree has 10,216 of 1,787,388 nodes
Induced tree has 10,216 of 1,787,388 nodes
updating viewer...
Induced tree has 10,216 of 1,787,388 nodes
Induced tree has 10,216 of 1,787,388 nodes
MEGAN> Command: select id=2; select nodes=subTree;
Executing: select id=2; select nodes=subTree;
Number of nodes selected: 6190
MEGAN> Command: export what=reads file='/home/data/mmeg_sarisa/Transcriptomics/pipeline/March/extract/2/RS-C-BS-2M';
Executing: export what=reads file='/home/data/mmeg_sarisa/Transcriptomics/pipeline/March/extract/2/RS-C-BS-2M';
10% 20% 30% 40% 50% 60% 70% /home/data/mmeg_sarisa/Transcriptomics/bioinf_analysis_March/meganize/LIB31209_LDI28071_RS-C-BS-2M_PRO1741_S35.meg.daa (Too many open files)
Command usage: export what=reads [data={EGGNOG|INTERPRO2GO|KEGG|PFAM|SEED|Taxonomy}] file=<filename>; - Export reads to a text file
Error: Command failed: /home/data/mmeg_sarisa/Transcriptomics/bioinf_analysis_March/meganize/LIB31209_LDI28071_RS-C-BS-2M_PRO1741_S35.meg.daa (Too many open ...
MEGAN> Command: close;
Executing: close;
Executing: quit;

#2

Thank you for this bug report, I have found the problem and will upload a new release later today.


#3

Please try 6.12.3 and let me know whether the problem persists


#4

Thanks Daniel: working now.