We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
How to make a new Read object from string, so that I can call Read.antisense ?
fa = pyfastx.Fastx("x.fq") for name,seq,_ in fa: seqF = seq[:100]
I want to get antisense of seqF. However, fa[-1][:100] not working as "TypeError: 'Read' object is not subscriptable".
seqF
fa[-1][:100]
The text was updated successfully, but these errors were encountered:
Currently, the Read object of pyfastx could not support for slicing. You can implement a function for conversion like this:
def reverse_complement(s): bases = {'A': 'T', 'G': 'C', 'T': 'A', 'C': 'G', 'N': 'N'} return ''.join([bases[b] for b in s][::-1]) fa = pyfastx.Fastx("x.fq") for name, seq, _ in fa: seqF = reverse_complement(seq[:100])
Sorry, something went wrong.
No branches or pull requests
How to make a new Read object from string, so that I can call Read.antisense ?
I want to get antisense of
seqF
.However,
fa[-1][:100]
not working as "TypeError: 'Read' object is not subscriptable".The text was updated successfully, but these errors were encountered: