Skip to content

Make an AminoAcid type #21

Description

@lynn

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions