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

user-defined species-sequence id delimiter? #13

Open
000generic opened this issue Dec 31, 2024 · 0 comments
Open

user-defined species-sequence id delimiter? #13

000generic opened this issue Dec 31, 2024 · 0 comments

Comments

@000generic
Copy link

Hi!

I'm using OrthoSnap for the first time - possibly to replace DISCO. I'm not seeing any option for a user-defined delimiter between species and sequence ids in headers and trees. Would it be possible to make this something the user can supply to OrthoSNAP. From the error I am getting

-------------
| Arguments |
-------------
Input phylogeny: output/10-output/10-mollusca___6191at6447.veryfasttree (rooted, False)
Input fasta: ../../../01-prepare_sequences_1/species51/output/17-output/17-mollusca___6191at6447.aa.filtered
Inparalog to keep: longest_seq_len
Report inparalog handling: True
Support threshold: 80
Taxon occupancy threshold: 6
Output newick of SNAP-OGs: False
Output directory: ../../../01-prepare_sequences_1/species51/output/17-output/

Traceback (most recent call last):
  File "/home/ericedsinger/.local/bin/orthosnap", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/ericedsinger/.local/lib/python3.12/site-packages/orthosnap/orthosnap.py", line 169, in main
    execute(**process_args(args))
  File "/home/ericedsinger/.local/lib/python3.12/site-packages/orthosnap/orthosnap.py", line 70, in execute
    taxa, all_tips = get_all_tips_and_taxa_names(tree)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ericedsinger/.local/lib/python3.12/site-packages/orthosnap/helper.py", line 69, in get_all_tips_and_taxa_names
    taxa_name = term.name[: term.name.index("|")]
                            ^^^^^^^^^^^^^^^^^^^^
ValueError: substring not found

it looks like I should use | as the delimiter - which I can do for now - swapping it in upstream of OrthoSNAP and then out downstream of OrthoSNAP - but if its not too hard to code up, it would be great if I could simply supply to OrthoSNAP what my preferred delimiter is - this could provide greater flexibility on the user side, which would be greatly appreciated when possible.

I'm looking forward to seeing how OrthoSNAP works and performs.

Thank you very much,
Eric

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

1 participant