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

Make an AminoAcid type #21

Open
lynn opened this issue Nov 9, 2022 · 0 comments
Open

Make an AminoAcid type #21

lynn opened this issue Nov 9, 2022 · 0 comments

Comments

@lynn
Copy link
Contributor

lynn commented Nov 9, 2022

Right now a ProteinSequence is just an unchecked ASCII sequence.

We should make an AminoAcid type like Nucleotide that represents only the valid amino acids ABCDEFGHIKLMNPQRSTVWYZ, and then AminoAcidAmbiguous which includes ambiguity code X. See #18.

Thought: if we assign these by ASCII codes like enum AminoAcid { A = 65, B = 66, ... } then we can cast &[u8] to &[AminoAcid] after validation. But maybe that's a bit overzealous if we normally have to strip whitespace and uppercase the string anyway.

Consideration: What about . (deletion) and * (terminator)? Should we treat those as ambiguity codes or as something else?

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