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

Full Fasta info object without index building #72

Open
oschwengers opened this issue Sep 19, 2023 · 1 comment
Open

Full Fasta info object without index building #72

oschwengers opened this issue Sep 19, 2023 · 1 comment

Comments

@oschwengers
Copy link

Hi and thanks a lot for this super-fast python library.
We'd like to use this in our tools like Bakta and Platon. Maybe I've overlooked something, but we need a way to parse FASTA files in the fastest possible way, i.e. w/o building an index, but with access to the sequence ID, description and sequence.

So, due to the readme there is:

import pyfastx
for name, seq in pyfastx.Fasta('test.fa.gz', build_index=False):
    print(name, seq)

and:

import pyfastx
for seq in pyfastx.Fasta('test.fa.gz'):
    print(seq.name)
    print(seq.seq)
    print(seq.description)

But what we actually need is:

import pyfastx
for seq in pyfastx.Fasta('test.fa.gz', build_index=False):
    print(seq.name)
    print(seq.seq)
    print(seq.description)

Also, it would be best if the description would already exclude the FASTA id. I think this usecase would be interesting for many other users, as well.

Thanks again and best regards!

@lmdu
Copy link
Owner

lmdu commented Sep 24, 2023

Thank you for your suggestion. I will consider adding this feature in next major version.

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