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

fix: unidock pipeline ligand index list too long err #127

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,10 @@ def main(args: dict):
if args.get("ligand_index"):
with open(args["ligand_index"], "r") as f:
index_content = f.read()
index_lines1 = [Path(line.strip()).resolve() for line in index_content.split("\n")
if line.strip() and Path(line.strip()).exists()]
index_lines2 = [Path(line.strip()).resolve() for line in index_content.split(" ")
if line.strip() and Path(line.strip()).exists()]
index_lines1 = [line.strip() for line in index_content.split("\n") if line.strip()]
index_lines2 = [line.strip() for line in index_content.split(" ") if line.strip()]
ligands.extend(index_lines2 if len(index_lines2) > len(index_lines1) else index_lines1)
ligands = [Path(ligand).resolve() for ligand in ligands if Path(ligand).exists()]

if len(ligands) == 0:
logging.error("No ligands found.")
Expand Down