Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OError: [Errno 24] Too many open files. Too many reads? #3

Open
ViriatoII opened this issue Oct 8, 2018 · 1 comment
Open

OError: [Errno 24] Too many open files. Too many reads? #3

ViriatoII opened this issue Oct 8, 2018 · 1 comment

Comments

@ViriatoII
Copy link

ViriatoII commented Oct 8, 2018

Hey,

This tool looks great, and so does the explanation. But I'm immediately running into a problem. I have a very big FASTQ file with dozens of thousands of PacBio reads. The tool fails after processing the first 1021 reads.

"Traceback (most recent call last):
File "/home/guerreiro/bin/FALCON-formatter", line 6, in
main()
File "/home/guerreiro/.local/lib/python2.7/site-packages/FALCON_formatter/init.py", line 29, in main
parseFastq(infile, OF, args.w, args.o)
File "/home/guerreiro/.local/lib/python2.7/site-packages/FALCON_formatter/init.py", line 62, in parseFastq
writeFA(fName, faHeader, seq, OF, wrap)
File "/home/guerreiro/.local/lib/python2.7/site-packages/FALCON_formatter/init.py", line 79, in writeFA
OF[fName] = open(fName,'w')
IOError: [Errno 24] Too many open files: 'ERR/ERR1713481.1021 "

@ViriatoII ViriatoII changed the title [Error] Too many reads? OError: [Errno 24] Too many open files. Too many reads? Oct 8, 2018
@zyndagj
Copy link
Owner

zyndagj commented Oct 8, 2018

Hello,

It looks like you ran into the open file limit on your system. File open and close operations in python hammer my distributed metadata servers, so I usually try keep a file handle open until I am done writing. Since you seem to have many different machine runs in your input file, I would suggest trying the following:

  1. Have you tried using the raw file with the latest release of Falcon? It has been about a year and a half since I have interacted with Falcon, so this limitation may not exist any longer.
  2. Is it possible to split your file instead of having a single monolithic input? The FOFN input can accept multiple files
    https://pb-falcon.readthedocs.io/en/latest/tutorial.html#create-fofn
    • Splitting your input will also allow you to [de]compress your input in parallel.
  3. If neither of the first suggestions work, I can try to modify the code to limit the number of simultaneous file handles.

-Greg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants