Amino Acid
Protein residues as colored tiles, a protein as blocks of them, and substitutions such as R175H. The default scheme groups residues by side chain on Nelumbo's palette hues; Clustal X, Zappo, Taylor and the others are redrawn at the same even lightness.
Install
npx shadcn@latest add @nelumbo/amino-acidThe twenty
Grouped by side chain, the way the default scheme colors them. Each tile is named on hover.
Notation
notation="three" shows Trp instead of W. The tile widens; the colors stay.
Color schemes
Charge is Nelumbo's own, for reading surfaces: only what carries a charge is colored. Hydrophobicity's strength follows the value. The rest take their schemes' hues at Nelumbo's lightness.
Nelumbo
By side chain, on the palette's hues
Charge
Only charged residues colored: positive blue, negative red
Hydrophobicity
Kyte and Doolittle: blue water-loving, amber oily
Clustal X
Clustal X's groups and hues
Zappo
Seven physicochemical groups
Taylor
A hue for each, kin residues in kin hues
Color-blind safe
By kind, in Okabe and Ito's set
None
Neutral tiles
Spacers and positions
groupSize puts a spacer every n residues, and blocks wrap as a whole. ruler numbers them: "top" puts the first position above each block, "inline" puts the last position in the spacer, as sequence listings print it.
Highlight
Residues 18 to 26 of p53, the stretch that binds MDM2, brought forward from the transactivation domain.
Selection
One keyboard stop, like a chart: drag or Shift-click, arrows and Shift, Escape to clear. The readout names the residue under the pointer or sums up the selection.
Mutations
AminoAcidChange is one connected shape: the residue it was, a wider neutral segment with the position, and the residue it became. It is announced as one phrase (Arginine 175 to Histidine) and titled in HGVS (p.Arg175His).
Building blocks
Residue is the tile both components are made of: give it any hue for your own scheme.
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
AminoAcid residue | string | One letter ("W") or three ("Trp"). * is a stop, X unknown, - a gap. | |
scheme | AminoAcidScheme | "nelumbo" | nelumbo, charge, hydrophobicity, clustal, zappo, taylor, okabe-ito, none. |
notation | "one" | "three" | "one" | |
variant / size | as Nucleotide | "tonal" / "default" | |
ProteinSequence sequence | string | Plus every NucleotideSequence prop except complement. | |
groupSize | number | 10 | A spacer every n residues. 0 for none. |
ruler | boolean | "top" | "inline" | false | true or top: first position above each block. inline: last position in the spacer. |
AminoAcidChange from, to, position | string, string, number | to may be "*" (stop) or "=" (synonymous). Announced as one phrase, titled in HGVS. | |
AminoAcidChange notation / size | "one" | "three", ResidueSize | "one", "default" | |
Residue tone | { hue, chroma?, shade? } | null | OKLCH hue; chroma 0 to 1; shade -1 to 1. null is neutral. | |
Data | AMINO_ACIDS, AMINO_ACID_KINDS, HYDROPATHY, fromThree, aminoAcidTone | Names, three-letter codes, kinds and Kyte-Doolittle values. |