← Về thư mục
📄 / / profiles / r-and-d / raw_evidence / OpenAI4S / skills / bioskills / bio-data-visualization-sequence-logos / references / usage-guide.md

Sequence Logos - Usage Guide

Overview

Sequence logos visualize per-position base/aa composition for an aligned motif set. Position height encodes information content in bits (Schneider-Stephens 1990); letter height is proportional to frequency. The bits encoding is the canonical bioinformatics standard - conserved positions are visually tall, variable positions short. ggseqlogo (R) is the modern default; Logomaker (Python) is the most flexible for non-standard alphabets; WebLogo is the CLI / web original.

Prerequisites

install.packages('ggseqlogo')
pip install logomaker
# CLI option:
pip install weblogo

Quick Start

Tell your AI agent what you want to do: - "Plot a sequence logo of these aligned TF binding sites with bits encoding" - "Apply human-genome background composition to the information calculation" - "Stack two motifs vertically to compare TF-A vs TF-B" - "Custom color scheme for a protein motif by amino-acid class" - "Show enrichment AND depletion using log-odds encoding"

Example Prompts

"Build a sequence logo of CTCF binding sites with bits encoding and human genome background composition (A=0.29, C=0.21, G=0.21, T=0.29). Use ggseqlogo's nucleotide color scheme."

Splice site composition

"Logo of 5' splice sites from 200 aligned exon-intron junctions. Bits encoding, uniform background. ggseqlogo."

Differential motif

"Use Logomaker weight (log-odds) encoding to show enrichment AND depletion in TF-A motif relative to TF-B background. Flip depleted letters below the axis."

Protein kinase substrate

"Logo of phosphorylation-site neighborhoods (15 aa around phospho-S/T). Color by amino-acid class: phospho-acceptor red, basic blue, acidic purple."

Multi-motif comparison

"Stack three TF logos (CTCF, REST, GATA1) vertically to compare conservation patterns. Same scale for all."

What the Agent Will Do

  1. Load aligned sequences (FASTA) or PWM (counts/probability/PSSM).
  2. Verify alignment: same length for all entries; sequence type (DNA, RNA, protein).
  3. Set background composition: uniform default; genome-derived if appropriate.
  4. Compute information content per position (bits encoding).
  5. Render with ggseqlogo / Logomaker / WebLogo per project preference.
  6. Annotate N (number of input sequences) for transparency.
  7. Apply CVD-safe color scheme; for proteins use functional-class coloring.

Tips