Skip to content
@deckyard/bioinformatics

@deckyard/bioinformatics

Sequence manipulation for DNA, RNA and protein in Jennifer, modelled on the Sequence Manipulation Suite.

This deck is part of Deckyard, community decks for Jennifer.

jennifer
import "@deckyard/bioinformatics/" as bioseq;

def gene as string init bioseq.filterDna("1 atg acg tta cat gga taa");

bioseq.reverseComplement($gene);            # TTATCCATGTAACGTCAT
bioseq.translate($gene);                    # MTLHG*
bioseq.gcContent($gene);                    # 33.33
bioseq.molecularWeight($gene, bioseq.DNA);  # 5546.66

Sequences are plain strings, offsets are 0-based half-open, and every error is Error{kind: "bioinformatics"}. Read Sequences and alphabets first: it states the conventions every other page relies on. Every snippet in this book imports the deck as bioseq; nothing depends on the alias.

Transformscomplement, transcribe, translate, six frames, residue spellings
CompositionGC content, molecular weight, melting temperature, pI, GRAVY, codon usage
Searchexact, IUPAC and approximate patterns; ORFs; CpG islands; restriction mapping and digestion
FormatsFASTA and FASTQ, quality scores
Manipulationrandom sequences, shuffle, mutation, windows
ComparisonNeedleman-Wunsch, Smith-Waterman, Hamming and edit distance
Genetic codes and residuesnine NCBI codes, IUPAC codes, residue properties, parameter constants
Restriction enzymes76 hand-curated type II enzymes
Cheatsheetevery export on one page
Design notesmeasurements behind the implementation, correctness anchors

No I/O, so it runs on jennifer-tiny

Nothing under src/ touches the network, a subprocess or the filesystem. FASTA and FASTQ are parsed from and written to strings; reading the file is the caller's job (Formats). There is no pragma-jennifer-capability in the deck. [engines] in deck.toml is an allowlist, not a version floor, so it lists jennifer-tiny beside jennifer; CI runs every example under both.

Melting temperatures, isoelectric points and masses depend on published parameter sets that disagree with each other. Each function names its set in its docblock and the parameters are exported constants (Parameter constants).