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

A way to obtain the nucleotide sequence of a gene #4

Closed
EnzoAndree opened this issue Sep 13, 2021 · 2 comments
Closed

A way to obtain the nucleotide sequence of a gene #4

EnzoAndree opened this issue Sep 13, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@EnzoAndree
Copy link

Hello!, Congratulations for this implementation.

Although I have a question. is it possible to get the nucleotide sequence of a gene from the pyrodigal prediction? something like the "translate" method, but with the nucleotide sequence.

I need that in downstream analysis to do codon alignment.

Best regards.
Enzo

@althonos
Copy link
Owner

Hi @EnzoAndree , thanks for the kind message!

At the moment it's not possible (you'd need to slice the original sequence yourself) but i'm changing how the sequences are handled internally and I can add that in a next version. Cheers!

@althonos althonos added the enhancement New feature or request label Sep 14, 2021
@althonos
Copy link
Owner

Hi again, v0.5.4 is out. With it you can get the sequence of a prediction as a string:

p = pyrodigal.Pyrodigal(meta=True)
for prediction in p.find_genes(seq):
    gene_sequence = prediction.sequence()

Note that any unknown character (none of A/T/G/C) will be converted as a N, so the sequence you get from that method may not be 100% the same as if you manually indexed the source sequence with the start and end coordinates.

Cheers!

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

No branches or pull requests

2 participants