Start here
  • InstallationAdd Nelumbo to a shadcn project
  • ThemingBrand accent, neutrals, dynamic color
  • Biology componentsSequences, maps, plates and trees
  • katalyx.bio

    Translation

    DNA with its protein underneath: each amino acid a tile as wide as its codon, so a base, its codon and the residue it makes read together. One frame, three, or all six.

    Install

    npx shadcn@latest add @nelumbo/translation

    A coding sequence

    The first 90 bases of TP53's coding sequence and the 30 residues they make: MEEPQSDPSV, as p53 begins. Lines wrap in whole codons; residues in a frame join into one shape, as a sequence's tiles do.

    ATGGAGGAGCCGCAGTCAGATCCTAGCGTCGAGCCCCCTCTGAGTCAGGAAACATTTTCA
    GACCTATGGAAACTACTTCCTGAAAACAAC

    Six frames

    frames={6} reads both strands: the forward frames under the top strand, the reverse frames under the bottom strand, right to left. orfs fades everything outside an open reading frame, so the real one stands out: TP53 starts at the ATG of base 143, in frame +1 here. Stops are solid.

    Longest open frame: +1, from 143, 86 codons and still open
    CTTCCCTGGATTGGCAGCCAGACTGCCTTCCGGGTCACTGCCATGGAGGAGCCGCAGTCA
    GATCCTAGCGTCGAGCCCCCTCTGAGTCAGGAAACATTTTCAGACCTATGGAAACTACTT

    Notation and size

    notation="three" spells residues out where a codon has room; the small size suits panels and tables.

    ATGGAGGAGCCGCAGTCAGATCCTAGCGTCGAGCCCCCTCTGAGT
    ATGGAGGAGCCGCAGTCAGATCCTAGCGTCGAGCCCCCTCTGAGTCAGGAAACATTTTCA
    GACCTATGGAAACTACTTCCTGAAAACAAC

    Selection

    selectable makes the bases one keyboard stop: arrows move a base, up and down a line, Shift extends, Escape clears. Drag across bases, or click a residue to take its codon. Copying gives the bases.

    EPPLS, Bases 31 to 45, 15 bp
    67% GC, residues 11 to 15
    ATGGAGGAGCCGCAGTCAGATCCTAGCGTCGAGCCCCCTCTGAGTCAGGAAACATTTTCA
    GACCTATGGAAACTACTTCCTGAAAACAAC

    Props

    PropTypeDefaultNotes
    sequencestringDNA or RNA; spaces and numbers are ignored.
    frames1 | 3 | 61The coding frame, the three forward frames, or all six.
    codonStart1 | 2 | 31With one frame: which base the first codon starts on.
    complementbooleanframes is 6The bottom strand under the top.
    startnumber1The number of the first base.
    scheme / aminoSchemeNucleotideScheme, AminoAcidScheme"nelumbo"Base and residue colors.
    notation"one" | "three""one"Residues as W or Trp.
    orfsboolean | { minLength }falseFade residues outside open reading frames of at least minLength codons (30).
    lineLength"auto" | number"auto"Bases a line; auto fits the width in fives of codons.
    size"sm" | "default""default"13 or 17 px a base.
    selectable / selectionboolean, { start, end } | nullfalseBase selection by keyboard, drag or codon. Controlled or not (defaultSelection).
    onActiveChange({ position, codon? } | null) => voidThe base, or the codon, in focus.
    HelpersframeCodons, findOrfsEvery codon of a frame; open reading frames, longest first.