[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ECSJB7GME5D4TQZQP7YKNF":3,"skill-same:01M7ECSJB7GME5D4TQZQP7YKNF":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7ECSJB7GME5D4TQZQP7YKNF","bio-data-visualization-sequence-logos",null,"Build sequence logos from aligned DNA, RNA, or protein motifs using ggseqlogo (R), Logomaker (Python), or WebLogo with explicit bits vs probability encoding, background-frequency correction, custom alphabets, and multi-logo stacking. Use when visualizing motif PWMs (TF binding, splice sites, CRISPR spacers), aligned-position composition, or comparing two motif sets.","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-data-visualization-sequence-logos\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-data-visualization-sequence-logos\ndescription: Build sequence logos from aligned DNA, RNA, or protein motifs using ggseqlogo (R), Logomaker (Python), or WebLogo with explicit bits vs probability encoding, background-frequency correction, custom alphabets, and multi-logo stacking. Use when visualizing motif PWMs (TF binding, splice sites, CRISPR spacers), aligned-position composition, or comparing two motif sets.\ntool_type: mixed\nprimary_tool: ggseqlogo\nsource: \"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills\"\nsource_repository: \"GPTomics\u002FbioSkills\"\nsource_path: \"data-visualization\u002Fsequence-logos\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n\n## Version Compatibility\n\nReference examples tested with: ggseqlogo 0.2 (CRAN; per Wagih 2017), Logomaker 0.8+ (Python), WebLogo 3.7+ (CLI), Biopython 1.83+ (motif parsing), MEME suite 5.5+.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- Python: `pip show \u003Cpackage>` then `help(module.function)` to check signatures\n- R: `packageVersion('\u003Cpkg>')` then `?function_name`\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.\n\n# Sequence Logos\n\n**\"Plot a sequence motif\"** -> Render a per-position stack of letters whose total height encodes information content (Schneider-Stephens 1990 *Nucleic Acids Res* 18:6097) and individual letter height is proportional to base\u002Faa frequency. The information-content encoding makes conserved positions visually tall and variable positions visually short — the visual is *the conservation profile*.\n\n- R: `ggseqlogo::ggseqlogo` (Wagih 2017 *Bioinformatics* 33:3645)\n- Python: `logomaker.Logo`\n- CLI: `weblogo` (Crooks 2004 *Genome Res* 14:1188)\n\n## The Single Most Important Modern Insight -- Bits vs Probability Are Different Visualizations\n\nA sequence logo can encode each position as **bits** (information content) or **probability** (raw frequency). They look superficially similar; they communicate different things.\n\n- **Bits (Schneider-Stephens 1990):** position height = `R = log2(K) − H(p)` where K=4 for DNA, H is Shannon entropy. Maximum 2 bits for DNA, 4.3 bits for protein. A fully conserved position is 2 bits; a uniform position is 0. This is the canonical motif encoding.\n- **Probability:** position height = 1.0; letter height = frequency. Every position has the same total height. Cannot distinguish \"conserved A\" from \"variable\" — both can show 100% A at a position.\n- **EDLogo (enrichment-depletion):** Dey et al. 2018 — uses log-odds of observed vs background, supporting depleted-residue display.\n\n**Default to bits unless a specific reason exists otherwise.** Bits is what reviewers expect to see for a TF binding site, splice site, or CRISPR spacer composition.\n\n## Decision Tree by Use Case\n\n| Use case | Encoding | Background | Tool |\n|----------|----------|------------|------|\n| TF binding motif (JASPAR\u002FCIS-BP PWM) | bits | uniform OR genome composition | ggseqlogo, Logomaker |\n| Splice-site motif (5'SS, 3'SS) | bits | uniform | ggseqlogo |\n| CRISPR sgRNA position-composition | probability | – | logomaker (custom alphabet) |\n| Protein motif (kinase substrate) | bits | proteome composition | Logomaker (matrix_type='counts') |\n| Alignment-conservation cartoon | bits OR probability | depends on intent | WebLogo |\n| Differential motif (TF-A vs TF-B) | EDLogo log-odds | TF-B | Logomaker (matrix_type='weight') |\n\n## ggseqlogo (R) -- Canonical Bioinformatics Default\n\n**Goal:** Render a sequence motif as a per-position letter stack whose total height encodes information content (Schneider-Stephens 1990) and individual letter heights reflect frequency, optionally corrected for genome background.\n\n**Approach:** Pass a PWM matrix (rows = letters, columns = positions) or vector of aligned same-length sequences to `ggseqlogo()` with `method = 'bits'` and explicit `bg_freq` for the relevant genome composition; stack multiple motifs as a named list.\n\n```r\nlibrary(ggseqlogo)\n\n# Input: PWM matrix (rows = positions, columns = nucleotides A\u002FC\u002FG\u002FT)\n# or aligned sequence vector\n\n# From a vector of aligned sequences (same length)\nseqs \u003C- c('ATGCAA', 'ATGCAC', 'ATGCAG', 'ATGCAT', 'ACGCAA')\nggseqlogo(seqs, method = 'bits')\n\n# From a PWM matrix (probability or counts)\npwm \u003C- matrix(c(0.7, 0.1, 0.1, 0.1,\n                0.1, 0.7, 0.1, 0.1,\n                0.4, 0.1, 0.4, 0.1), ncol = 3,\n              dimnames = list(c('A', 'C', 'G', 'T'), NULL))\nggseqlogo(pwm, method = 'bits')           # 'bits' OR 'probability'\n\n# Multiple logos stacked (e.g., compare TF-A and TF-B)\nggseqlogo(list(TFA = seqs_a, TFB = seqs_b),\n          method = 'bits',\n          col_scheme = 'nucleotide')\n```\n\n```r\n# Custom color scheme (protein motif, kinase substrate)\nggseqlogo(protein_pwm,\n          method = 'bits',\n          seq_type = 'aa',                      # auto-detected usually\n          col_scheme = make_col_scheme(\n              chars = c('S','T','Y','K','R','H','D','E','A','V','L','I','M'),\n              cols  = c('#D55E00','#D55E00','#D55E00',          # phospho-acceptors\n                        '#0072B2','#0072B2','#0072B2',          # basic\n                        '#CC79A7','#CC79A7',                    # acidic\n                        '#009E73','#009E73','#009E73','#009E73','#009E73')))  # hydrophobic\n```\n\n## Logomaker (Python) -- Most Flexible\n\n```python\nimport logomaker\nimport pandas as pd\n\n# Counts matrix (rows = position, columns = ACGT)\ncounts_df = pd.DataFrame({'A': [10, 0, 5, 8],\n                          'C': [0, 8, 5, 1],\n                          'G': [0, 2, 0, 0],\n                          'T': [0, 0, 0, 1]})\n\n# Convert counts -> information (bits)\nic_df = logomaker.transform_matrix(counts_df,\n                                    from_type='counts',\n                                    to_type='information',\n                                    background=[0.25] * 4)    # uniform; pass real background for corrected IC\n\nimport matplotlib.pyplot as plt\nfig, ax = plt.subplots(figsize=(6, 2))\nlogo = logomaker.Logo(ic_df,\n                      color_scheme='classic',           # 'NajafabadiEtAl2017' for protein\n                      shade_below=0.5,\n                      fade_below=0.5,\n                      font_name='Arial Rounded MT Bold')\nlogo.style_xticks(rotation=0)\nlogo.ax.set_ylabel('Bits')\n```\n\n```python\n# Weight matrix (signed) -- enrichment vs depletion\nweight_df = logomaker.transform_matrix(counts_df,\n                                        from_type='counts',\n                                        to_type='weight',\n                                        background=genome_composition)\nlogo = logomaker.Logo(weight_df, color_scheme='classic',\n                       flip_below=True)                  # depleted letters below axis\n```\n\n## WebLogo (CLI \u002F web)\n\n```bash\nweblogo --format pdf --sequence-type dna \\\n        --color-scheme classic --units bits \\\n        --composition equiprobable \\\n        --fineprint '' \\\n        --size large \\\n        \u003C aligned.fasta > logo.pdf\n```\n\nWebLogo (Crooks 2004) is the original; supports many formats and is scriptable. For reproducible figures, prefer ggseqlogo or Logomaker (programmatic, easier to integrate with multi-panel figures).\n\n## Background Composition Correction\n\nThe bits encoding assumes a uniform background by default. For genome-derived motifs, the background should match the genome:\n\n- Human genome: A=0.29, C=0.21, G=0.21, T=0.29 (approx)\n- GC-rich genomes (Streptomyces): A=0.18, C=0.32, G=0.32, T=0.18\n\nWithout correction, a motif preferring GC in a genome where GC is rare overestimates information; conversely, an A-rich motif in an AT-rich genome underestimates.\n\n```r\n# ggseqlogo: pass `bg_freq`\nggseqlogo(pwm, method = 'bits',\n          bg_freq = c(A = 0.29, C = 0.21, G = 0.21, T = 0.29))\n```\n\n```python\nlogomaker.transform_matrix(counts_df, from_type='counts', to_type='information',\n                            background=[0.29, 0.21, 0.21, 0.29])\n```\n\n## Per-Method Failure Modes\n\n### Probability encoding mistaken for bits\n\n**Trigger:** Default `method = 'probability'` in some implementations.\n\n**Mechanism:** Every position has total height 1; visually flat with all letters same total.\n\n**Symptom:** Reviewer asks \"why doesn't the logo show conservation gradient?\"\n\n**Fix:** Use `method = 'bits'` for the standard motif encoding.\n\n### Background uniform when genome composition matters\n\n**Trigger:** Uniform `bg_freq = c(0.25, 0.25, 0.25, 0.25)` for a non-uniform genome.\n\n**Mechanism:** Information content overestimates conservation for preferred bases.\n\n**Symptom:** Reported motif looks more conserved than it actually is.\n\n**Fix:** Pass genome composition to `bg_freq` \u002F `background` parameter.\n\n### PWM rows\u002Fcolumns reversed\n\n**Trigger:** Input matrix in samples-as-rows convention; logomaker expects positions-as-rows.\n\n**Mechanism:** Logo renders the wrong dimension as \"position.\"\n\n**Symptom:** Logo has letter count = number of input rows, not motif length.\n\n**Fix:** Transpose the matrix; verify with `print(matrix.shape)` before plotting.\n\n### Custom alphabet not recognized\n\n**Trigger:** RNA logo with `U` instead of `T`; protein logo with `J` or `Z`.\n\n**Mechanism:** ggseqlogo and logomaker auto-detect alphabet from input; unusual characters may fail.\n\n**Symptom:** Letters render as boxes or missing entirely.\n\n**Fix:** Explicit `seq_type = 'rna'` (ggseqlogo) or pass custom color scheme (Logomaker).\n\n### Aligned sequences of unequal length\n\n**Trigger:** Vector of motif instances with different lengths.\n\n**Mechanism:** Most tools require equal-length input.\n\n**Symptom:** Error or only first N positions plotted.\n\n**Fix:** Pre-align (MEME \u002F TOMTOM) or trim to a common length.\n\n### Logo for too few input sequences\n\n**Trigger:** PWM from N=5 sequences plotted as if N=500.\n\n**Mechanism:** Information content has small-N bias; even random sequences look \"conserved\" at N=5.\n\n**Symptom:** Logo appears more meaningful than the input warrants.\n\n**Fix:** Compute small-sample correction (Schneider 1986; standard in MEME); annotate N in caption; require N ≥ 20 for credible motif.\n\n### Stacked logos with different alphabets compared\n\n**Trigger:** Stacking a DNA logo above a protein logo for visual comparison.\n\n**Mechanism:** Maximum information content differs (2 bits DNA vs 4.3 bits protein); y-axes are not comparable.\n\n**Symptom:** Apparent \"weaker\" protein logo because of higher possible max.\n\n**Fix:** Normalize both to fractional information (0-1) OR present separately.\n\n## Reconciliation: When Logos Differ\n\n| Pattern | Cause | Action |\n|---------|-------|--------|\n| ggseqlogo vs Logomaker show different heights | Different default backgrounds (uniform vs explicit) | Standardize background; recompute |\n| WebLogo vs Logomaker differ at low-conservation positions | Small-sample correction differs | Use consistent N; report sample-corrected IC |\n| JASPAR vs MEME PWM look different | JASPAR uses observed counts; MEME has Dirichlet prior | Document source; cite version |\n\n## Quantitative Thresholds\n\n| Threshold | Value | Source |\n|-----------|-------|--------|\n| Max IC per DNA position | 2 bits | Schneider-Stephens 1990 |\n| Max IC per protein position | 4.32 bits (log2(20)) | Schneider-Stephens 1990 |\n| Min N for credible motif | ≥ 20 instances; ≥ 100 ideal | Common practice |\n| Small-sample correction | Schneider 1986 entropy correction | MEME default; ggseqlogo via small-N tools |\n| TF binding-site length typical | 6-20 bp | Biology |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| Logo flat with all positions = 1 | Probability mode | Switch to bits |\n| Motif looks too conserved | Uniform bg in non-uniform genome | Pass `bg_freq` |\n| Letter count = N samples not motif length | Matrix transposed | Verify shape |\n| RNA U renders as box | Alphabet not recognized | `seq_type = 'rna'` |\n| Logos at different scales overlaid | Different alphabets | Normalize OR separate |\n| Logo from N=5 looks meaningful | Small-sample bias | Require N>=20; annotate |\n\n## References\n\n- Crooks GE, Hon G, Chandonia JM, Brenner SE. 2004. WebLogo: a sequence logo generator. *Genome Res* 14(6):1188-1190.\n- Dey KK, Xie D, Stephens M. 2018. A new sequence logo plot to highlight enrichment and depletion. *bioRxiv*.\n- Schneider TD. 1986. Information content of binding sites on nucleotide sequences. *J Mol Biol* 188(3):415-431.\n- Schneider TD, Stephens RM. 1990. Sequence logos: a new way to display consensus sequences. *Nucleic Acids Res* 18(20):6097-6100.\n- Tareen A, Kinney JB. 2020. Logomaker: beautiful sequence logos in Python. *Bioinformatics* 36(7):2272-2274.\n- Wagih O. 2017. ggseqlogo: a versatile R package for drawing sequence logos. *Bioinformatics* 33(22):3645-3647.\n\n## Related Skills\n\n- chip-seq\u002Fmotif-analysis - Discover the PWM that becomes the logo\n- atac-seq\u002Ffootprinting - Footprinting motifs to visualize\n- clip-seq\u002Fclip-motif-analysis - CLIP-derived motifs\n- alignment\u002Fmultiple-alignment - Aligned sequences as logo input\n- data-visualization\u002Fcolor-palettes - Custom alphabet color schemes\n","## Version Compatibility\n\nReference examples tested with: ggseqlogo 0.2 (CRAN; per Wagih 2017), Logomaker 0.8+ (Python), WebLogo 3.7+ (CLI), Biopython 1.83+ (motif parsing), MEME suite 5.5+.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- Python: `pip show \u003Cpackage>` then `help(module.function)` to check signatures\n- R: `packageVersion('\u003Cpkg>')` then `?function_name`\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.\n\n# Sequence Logos\n\n**\"Plot a sequence motif\"** -> Render a per-position stack of letters whose total height encodes information content (Schneider-Stephens 1990 *Nucleic Acids Res* 18:6097) and individual letter height is proportional to base\u002Faa frequency. The information-content encoding makes conserved positions visually tall and variable positions visually short — the visual is *the conservation profile*.\n\n- R: `ggseqlogo::ggseqlogo` (Wagih 2017 *Bioinformatics* 33:3645)\n- Python: `logomaker.Logo`\n- CLI: `weblogo` (Crooks 2004 *Genome Res* 14:1188)\n\n## The Single Most Important Modern Insight -- Bits vs Probability Are Different Visualizations\n\nA sequence logo can encode each position as **bits** (information content) or **probability** (raw frequency). They look superficially similar; they communicate different things.\n\n- **Bits (Schneider-Stephens 1990):** position height = `R = log2(K) − H(p)` where K=4 for DNA, H is Shannon entropy. Maximum 2 bits for DNA, 4.3 bits for protein. A fully conserved position is 2 bits; a uniform position is 0. This is the canonical motif encoding.\n- **Probability:** position height = 1.0; letter height = frequency. Every position has the same total height. Cannot distinguish \"conserved A\" from \"variable\" — both can show 100% A at a position.\n- **EDLogo (enrichment-depletion):** Dey et al. 2018 — uses log-odds of observed vs background, supporting depleted-residue display.\n\n**Default to bits unless a specific reason exists otherwise.** Bits is what reviewers expect to see for a TF binding site, splice site, or CRISPR spacer composition.\n\n## Decision Tree by Use Case\n\n| Use case | Encoding | Background | Tool |\n|----------|----------|------------|------|\n| TF binding motif (JASPAR\u002FCIS-BP PWM) | bits | uniform OR genome composition | ggseqlogo, Logomaker |\n| Splice-site motif (5'SS, 3'SS) | bits | uniform | ggseqlogo |\n| CRISPR sgRNA position-composition | probability | – | logomaker (custom alphabet) |\n| Protein motif (kinase substrate) | bits | proteome composition | Logomaker (matrix_type='counts') |\n| Alignment-conservation cartoon | bits OR probability | depends on intent | WebLogo |\n| Differential motif (TF-A vs TF-B) | EDLogo log-odds | TF-B | Logomaker (matrix_type='weight') |\n\n## ggseqlogo (R) -- Canonical Bioinformatics Default\n\n**Goal:** Render a sequence motif as a per-position letter stack whose total height encodes information content (Schneider-Stephens 1990) and individual letter heights reflect frequency, optionally corrected for genome background.\n\n**Approach:** Pass a PWM matrix (rows = letters, columns = positions) or vector of aligned same-length sequences to `ggseqlogo()` with `method = 'bits'` and explicit `bg_freq` for the relevant genome composition; stack multiple motifs as a named list.\n\n```r\nlibrary(ggseqlogo)\n\n# Input: PWM matrix (rows = positions, columns = nucleotides A\u002FC\u002FG\u002FT)\n# or aligned sequence vector\n\n# From a vector of aligned sequences (same length)\nseqs \u003C- c('ATGCAA', 'ATGCAC', 'ATGCAG', 'ATGCAT', 'ACGCAA')\nggseqlogo(seqs, method = 'bits')\n\n# From a PWM matrix (probability or counts)\npwm \u003C- matrix(c(0.7, 0.1, 0.1, 0.1,\n                0.1, 0.7, 0.1, 0.1,\n                0.4, 0.1, 0.4, 0.1), ncol = 3,\n              dimnames = list(c('A', 'C', 'G', 'T'), NULL))\nggseqlogo(pwm, method = 'bits')           # 'bits' OR 'probability'\n\n# Multiple logos stacked (e.g., compare TF-A and TF-B)\nggseqlogo(list(TFA = seqs_a, TFB = seqs_b),\n          method = 'bits',\n          col_scheme = 'nucleotide')\n```\n\n```r\n# Custom color scheme (protein motif, kinase substrate)\nggseqlogo(protein_pwm,\n          method = 'bits',\n          seq_type = 'aa',                      # auto-detected usually\n          col_scheme = make_col_scheme(\n              chars = c('S','T','Y','K','R','H','D','E','A','V','L','I','M'),\n              cols  = c('#D55E00','#D55E00','#D55E00',          # phospho-acceptors\n                        '#0072B2','#0072B2','#0072B2',          # basic\n                        '#CC79A7','#CC79A7',                    # acidic\n                        '#009E73','#009E73','#009E73','#009E73','#009E73')))  # hydrophobic\n```\n\n## Logomaker (Python) -- Most Flexible\n\n```python\nimport logomaker\nimport pandas as pd\n\n# Counts matrix (rows = position, columns = ACGT)\ncounts_df = pd.DataFrame({'A': [10, 0, 5, 8],\n                          'C': [0, 8, 5, 1],\n                          'G': [0, 2, 0, 0],\n                          'T': [0, 0, 0, 1]})\n\n# Convert counts -> information (bits)\nic_df = logomaker.transform_matrix(counts_df,\n                                    from_type='counts',\n                                    to_type='information',\n                                    background=[0.25] * 4)    # uniform; pass real background for corrected IC\n\nimport matplotlib.pyplot as plt\nfig, ax = plt.subplots(figsize=(6, 2))\nlogo = logomaker.Logo(ic_df,\n                      color_scheme='classic',           # 'NajafabadiEtAl2017' for protein\n                      shade_below=0.5,\n                      fade_below=0.5,\n                      font_name='Arial Rounded MT Bold')\nlogo.style_xticks(rotation=0)\nlogo.ax.set_ylabel('Bits')\n```\n\n```python\n# Weight matrix (signed) -- enrichment vs depletion\nweight_df = logomaker.transform_matrix(counts_df,\n                                        from_type='counts',\n                                        to_type='weight',\n                                        background=genome_composition)\nlogo = logomaker.Logo(weight_df, color_scheme='classic',\n                       flip_below=True)                  # depleted letters below axis\n```\n\n## WebLogo (CLI \u002F web)\n\n```bash\nweblogo --format pdf --sequence-type dna \\\n        --color-scheme classic --units bits \\\n        --composition equiprobable \\\n        --fineprint '' \\\n        --size large \\\n        \u003C aligned.fasta > logo.pdf\n```\n\nWebLogo (Crooks 2004) is the original; supports many formats and is scriptable. For reproducible figures, prefer ggseqlogo or Logomaker (programmatic, easier to integrate with multi-panel figures).\n\n## Background Composition Correction\n\nThe bits encoding assumes a uniform background by default. For genome-derived motifs, the background should match the genome:\n\n- Human genome: A=0.29, C=0.21, G=0.21, T=0.29 (approx)\n- GC-rich genomes (Streptomyces): A=0.18, C=0.32, G=0.32, T=0.18\n\nWithout correction, a motif preferring GC in a genome where GC is rare overestimates information; conversely, an A-rich motif in an AT-rich genome underestimates.\n\n```r\n# ggseqlogo: pass `bg_freq`\nggseqlogo(pwm, method = 'bits',\n          bg_freq = c(A = 0.29, C = 0.21, G = 0.21, T = 0.29))\n```\n\n```python\nlogomaker.transform_matrix(counts_df, from_type='counts', to_type='information',\n                            background=[0.29, 0.21, 0.21, 0.29])\n```\n\n## Per-Method Failure Modes\n\n### Probability encoding mistaken for bits\n\n**Trigger:** Default `method = 'probability'` in some implementations.\n\n**Mechanism:** Every position has total height 1; visually flat with all letters same total.\n\n**Symptom:** Reviewer asks \"why doesn't the logo show conservation gradient?\"\n\n**Fix:** Use `method = 'bits'` for the standard motif encoding.\n\n### Background uniform when genome composition matters\n\n**Trigger:** Uniform `bg_freq = c(0.25, 0.25, 0.25, 0.25)` for a non-uniform genome.\n\n**Mechanism:** Information content overestimates conservation for preferred bases.\n\n**Symptom:** Reported motif looks more conserved than it actually is.\n\n**Fix:** Pass genome composition to `bg_freq` \u002F `background` parameter.\n\n### PWM rows\u002Fcolumns reversed\n\n**Trigger:** Input matrix in samples-as-rows convention; logomaker expects positions-as-rows.\n\n**Mechanism:** Logo renders the wrong dimension as \"position.\"\n\n**Symptom:** Logo has letter count = number of input rows, not motif length.\n\n**Fix:** Transpose the matrix; verify with `print(matrix.shape)` before plotting.\n\n### Custom alphabet not recognized\n\n**Trigger:** RNA logo with `U` instead of `T`; protein logo with `J` or `Z`.\n\n**Mechanism:** ggseqlogo and logomaker auto-detect alphabet from input; unusual characters may fail.\n\n**Symptom:** Letters render as boxes or missing entirely.\n\n**Fix:** Explicit `seq_type = 'rna'` (ggseqlogo) or pass custom color scheme (Logomaker).\n\n### Aligned sequences of unequal length\n\n**Trigger:** Vector of motif instances with different lengths.\n\n**Mechanism:** Most tools require equal-length input.\n\n**Symptom:** Error or only first N positions plotted.\n\n**Fix:** Pre-align (MEME \u002F TOMTOM) or trim to a common length.\n\n### Logo for too few input sequences\n\n**Trigger:** PWM from N=5 sequences plotted as if N=500.\n\n**Mechanism:** Information content has small-N bias; even random sequences look \"conserved\" at N=5.\n\n**Symptom:** Logo appears more meaningful than the input warrants.\n\n**Fix:** Compute small-sample correction (Schneider 1986; standard in MEME); annotate N in caption; require N ≥ 20 for credible motif.\n\n### Stacked logos with different alphabets compared\n\n**Trigger:** Stacking a DNA logo above a protein logo for visual comparison.\n\n**Mechanism:** Maximum information content differs (2 bits DNA vs 4.3 bits protein); y-axes are not comparable.\n\n**Symptom:** Apparent \"weaker\" protein logo because of higher possible max.\n\n**Fix:** Normalize both to fractional information (0-1) OR present separately.\n\n## Reconciliation: When Logos Differ\n\n| Pattern | Cause | Action |\n|---------|-------|--------|\n| ggseqlogo vs Logomaker show different heights | Different default backgrounds (uniform vs explicit) | Standardize background; recompute |\n| WebLogo vs Logomaker differ at low-conservation positions | Small-sample correction differs | Use consistent N; report sample-corrected IC |\n| JASPAR vs MEME PWM look different | JASPAR uses observed counts; MEME has Dirichlet prior | Document source; cite version |\n\n## Quantitative Thresholds\n\n| Threshold | Value | Source |\n|-----------|-------|--------|\n| Max IC per DNA position | 2 bits | Schneider-Stephens 1990 |\n| Max IC per protein position | 4.32 bits (log2(20)) | Schneider-Stephens 1990 |\n| Min N for credible motif | ≥ 20 instances; ≥ 100 ideal | Common practice |\n| Small-sample correction | Schneider 1986 entropy correction | MEME default; ggseqlogo via small-N tools |\n| TF binding-site length typical | 6-20 bp | Biology |\n\n## Common Errors\n\n| Error \u002F symptom | Cause | Solution |\n|-----------------|-------|----------|\n| Logo flat with all positions = 1 | Probability mode | Switch to bits |\n| Motif looks too conserved | Uniform bg in non-uniform genome | Pass `bg_freq` |\n| Letter count = N samples not motif length | Matrix transposed | Verify shape |\n| RNA U renders as box | Alphabet not recognized | `seq_type = 'rna'` |\n| Logos at different scales overlaid | Different alphabets | Normalize OR separate |\n| Logo from N=5 looks meaningful | Small-sample bias | Require N>=20; annotate |\n\n## References\n\n- Crooks GE, Hon G, Chandonia JM, Brenner SE. 2004. WebLogo: a sequence logo generator. *Genome Res* 14(6):1188-1190.\n- Dey KK, Xie D, Stephens M. 2018. A new sequence logo plot to highlight enrichment and depletion. *bioRxiv*.\n- Schneider TD. 1986. Information content of binding sites on nucleotide sequences. *J Mol Biol* 188(3):415-431.\n- Schneider TD, Stephens RM. 1990. Sequence logos: a new way to display consensus sequences. *Nucleic Acids Res* 18(20):6097-6100.\n- Tareen A, Kinney JB. 2020. Logomaker: beautiful sequence logos in Python. *Bioinformatics* 36(7):2272-2274.\n- Wagih O. 2017. ggseqlogo: a versatile R package for drawing sequence logos. *Bioinformatics* 33(22):3645-3647.\n\n## Related Skills\n\n- chip-seq\u002Fmotif-analysis - Discover the PWM that becomes the logo\n- atac-seq\u002Ffootprinting - Footprinting motifs to visualize\n- clip-seq\u002Fclip-motif-analysis - CLIP-derived motifs\n- alignment\u002Fmultiple-alignment - Aligned sequences as logo input\n- data-visualization\u002Fcolor-palettes - Custom alphabet color schemes\n",{"name":5,"source":24,"license":15,"tool_type":25,"description":7,"imported_at":26,"source_path":27,"primary_tool":28,"source_repository":29},"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills","mixed","2026-09-20","data-visualization\u002Fsequence-logos\u002FSKILL.md","ggseqlogo","GPTomics\u002FbioSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fbiology\u002Fbio-data-visualization-sequence-logos","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-data-visualization-sequence-logos",{"tool":42,"command":43},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-data-visualization-sequence-logos",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-data-visualization-sequence-logos","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-data-visualization-sequence-logos\u002FSKILL.md",true,[50,56],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"examples\u002Fseqlogo_phd.R","OTHER","其他",3165,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-data-visualization-sequence-logos\u002Fexamples\u002Fseqlogo_phd.R",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"usage-guide.md","REFERENCE","参考文档",4069,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-data-visualization-sequence-logos\u002Fusage-guide.md",[63,71,78,85,92,99],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":70},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":70},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":70},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":70},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":70},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":70},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]