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

Unidock pipeline fails to read ligand index #124

Closed
davide-grheco opened this issue Apr 18, 2024 · 1 comment · Fixed by #127
Closed

Unidock pipeline fails to read ligand index #124

davide-grheco opened this issue Apr 18, 2024 · 1 comment · Fixed by #127
Assignees
Labels
bug Something isn't working

Comments

@davide-grheco
Copy link

Describe the bug

When a large ligand index is provided, the software fails to work.

This is because the whole file is read and pathlib attempts to resolve it to a path. This incurs in an OS error.
I solved it removing one of the two lines here, but a more elegant solution should not be too hard to find.

https://github.com/dptech-corp/Uni-Dock/blob/ab4d8cd46886949da10e62a5f10cd5d8839ef76f/unidock_tools/src/unidock_tools/application/unidock_pipeline.py#L215C1-L218C73

Traceback:

Traceback (most recent call last):                                                                                                                                                                                                                                                                                          
  File "/conda/unidock/bin/unidocktools", line 8, in <module>                                                                                                                                                                                                                    
    sys.exit(main_cli())                                                                                                                                      
             ^^^^^^^^^^                                                                                                                                       
  File "/conda/unidock/lib/python3.12/site-packages/unidock_tools/main.py", line 32, in main_cli                   
    name_module_dict[args["cmd"]].main(args)                                                                                                                  
  File "/conda/unidock/lib/python3.12/site-packages/unidock_tools/application/unidock_pipeline.py", line 216, in main
    if line.strip() and Path(line.strip()).exists()]                                                                                                          
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                           
  File "/conda/unidock/lib/python3.12/pathlib.py", line 860, in exists                                             
    self.stat(follow_symlinks=follow_symlinks)                                                                                                                
  File "/conda/unidock/lib/python3.12/pathlib.py", line 840, in stat                                               
    return os.stat(self, follow_symlinks=follow_symlinks)                                                                                                     
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                     
OSError: [Errno 36] File name too long: '

Expected behavior

No response

To Reproduce

Install unidocktools, prepare an index file with a large number of files.

seq 30000 > ligands.txt
unidocktools unidock_pipeline -i ligands.txt (other required parameters)

Environment

No response

Additional Context

No response

@davide-grheco davide-grheco added the bug Something isn't working label Apr 18, 2024
@dp-yuanyn dp-yuanyn linked a pull request Apr 26, 2024 that will close this issue
@dp-yuanyn
Copy link
Contributor

@davide-grheco Thanks for your report, this problem has been solved in #127.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants