[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XF88PGFRCFPTKK88PGS2ER":3,"skill-same:01M6XF88PGFRCFPTKK88PGS2ER":66},{"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":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":14,"repositoryHtmlUrl":43,"repositoryHomepageUrl":6,"ownerHtmlUrl":44,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":45,"install":46,"resources":59},"01M6XF88PGFRCFPTKK88PGS2ER","glycobiology",null,"Glycosylation site prediction and glycobiology analysis. N-glycosylation motif finding, O-glycosylation hotspot prediction, glycan structure resources. Lightweight, pure Python. For protein function queries use uniprot-database; for structure analysis use alphafold-database.","fadrienne\u002FMyGitHub","fadrienne","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F197874571?v=4","01M6X64V8VWCRSMFZ4EPS2BWXG","Francesca Adrienne","01M6X64VD5MW4F9PHDWQKS7ZAF",0,"MIT","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Fglycobiology\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29,30,31],"python","database","analysis","site","use","queries","structure","alphafold","resources","biology","for","prediction","Protein","2026-11-10 10:12:30",false,"---\nname: glycobiology\ndescription: Glycosylation site prediction and glycobiology analysis. N-glycosylation motif finding, O-glycosylation hotspot prediction, glycan structure resources. Lightweight, pure Python. For protein function queries use uniprot-database; for structure analysis use alphafold-database.\ncategory: biology\nlicense: MIT license\nmetadata:\n    skill-author: InkVell Inc.\n---\n\n# Glycobiology: Glycosylation Analysis\n\n## Overview\n\nGlycobiology provides lightweight computational tools for predicting and analyzing glycosylation sites in protein sequences. This skill covers N-glycosylation sequon motif finding (N-X-S\u002FT where X is not P), O-glycosylation hotspot prediction using a sliding window serine\u002Fthreonine density heuristic, glycan structure tool references, and combined glycoprotein analysis with domain mapping. All analyses use pure Python with minimal dependencies (Biopython for sequence I\u002FO, regex for pattern matching).\n\n## When to Use This Skill\n\n- Predicting N-glycosylation sites from protein sequences\n- Identifying O-glycosylation hotspot regions\n- Planning glycosylation site mutagenesis experiments\n- Comparing predicted vs experimentally determined glycosylation sites\n- Annotating glycosylation in biotherapeutic protein design\n- Surveying glycan analysis tools for downstream structural studies\n\n**Related Skills:** For protein function and existing glycosylation annotations use `uniprot-database`. For protein 3D structure and site accessibility use `alphafold-database`. For sequence manipulation use `biopython`.\n\n## Installation\n\n```bash\nuv pip install biopython numpy\n```\n\nNo additional dependencies required — this skill uses pure Python.\n\n## Quick Start\n\n```python\nimport re\n\ndef find_n_glycosylation_sites(sequence):\n    \"\"\"Find N-X-S\u002FT sequons where X != P.\"\"\"\n    sites = []\n    for i in range(len(sequence) - 2):\n        if sequence[i] == 'N' and sequence[i+1] != 'P' and sequence[i+2] in ('S', 'T'):\n            sites.append({\n                'position': i + 1,  # 1-based\n                'motif': sequence[i:i+3],\n                'context': sequence[max(0,i-3):i+6]\n            })\n    return sites\n\n# Example: human EPO\nepo_seq = \"MGVHECPAWLWLLLSLLSLPLGLPVLGAPPRLICDSRVLERYLLEAKEAENITTGCAEHCSLNENITVPDTKVNFYAWKRMEVGQQAVEVWQGLALLSEAVLRGQALLVNSSQPWEPLQLHVDKAVSGLRSLTTLLRALGAQKEAISPPDAASAAPLRTITADTFRKLFRVYSNFLRGKLKLYTGEACRTGDR\"\n\nsites = find_n_glycosylation_sites(epo_seq)\nprint(f\"N-glycosylation sites: {len(sites)}\")\nfor s in sites:\n    print(f\"  Position {s['position']}: {s['motif']} (context: ...{s['context']}...)\")\n```\n\n## Core Capabilities\n\n### 1. N-Glycosylation Motif Finding\n\nIdentify N-X-S\u002FT sequons in protein sequences.\n\n```python\nimport re\nfrom Bio import SeqIO\n\ndef find_n_glycosylation_sites(sequence, exclude_proline=True):\n    \"\"\"Find N-linked glycosylation sequons (N-X-S\u002FT).\n\n    Args:\n        sequence: protein sequence string\n        exclude_proline: if True, exclude N-P-S\u002FT motifs (standard rule)\n    \"\"\"\n    sites = []\n    seq = str(sequence).upper()\n\n    for i in range(len(seq) - 2):\n        if seq[i] != 'N':\n            continue\n\n        x_residue = seq[i + 1]\n        st_residue = seq[i + 2]\n\n        # Standard rule: X != P\n        if exclude_proline and x_residue == 'P':\n            continue\n\n        if st_residue not in ('S', 'T'):\n            continue\n\n        # Context (5 residues each side)\n        context_start = max(0, i - 5)\n        context_end = min(len(seq), i + 8)\n        context = seq[context_start:context_end]\n\n        sites.append({\n            'position': i + 1,  # 1-based position\n            'residue': seq[i],\n            'motif': seq[i:i+3],\n            'x_residue': x_residue,\n            'acceptor': st_residue,\n            'context': context,\n            'context_start': context_start + 1\n        })\n\n    return sites\n\ndef scan_fasta_for_n_glyc(fasta_path):\n    \"\"\"Scan all sequences in a FASTA file for N-glycosylation sites.\"\"\"\n    results = []\n    for record in SeqIO.parse(fasta_path, 'fasta'):\n        sites = find_n_glycosylation_sites(str(record.seq))\n        results.append({\n            'id': record.id,\n            'description': record.description,\n            'length': len(record.seq),\n            'n_sites': len(sites),\n            'sites': sites,\n            'density': len(sites) \u002F len(record.seq) * 1000  # per 1000 residues\n        })\n\n    import pandas as pd\n    df = pd.DataFrame([{k: v for k, v in r.items() if k != 'sites'} for r in results])\n    print(f\"Scanned {len(df)} sequences\")\n    print(f\"Total N-glyc sites: {df['n_sites'].sum()}\")\n    print(f\"Mean density: {df['density'].mean():.1f} per 1000 residues\")\n    return results\n\n# Example with multiple sequences\nsites = find_n_glycosylation_sites(\"MANLQTSPNGTLKNVTSITDA\")\nfor s in sites:\n    print(f\"N{s['position']}: {s['motif']} (X={s['x_residue']}, acceptor={s['acceptor']})\")\n```\n\n### 2. O-Glycosylation Hotspot Prediction\n\nIdentify regions enriched in serine\u002Fthreonine that may be O-glycosylated.\n\n```python\nimport numpy as np\n\ndef predict_o_glycosylation_hotspots(sequence, window_size=20, threshold=0.4,\n                                       exclude_near_proline=True):\n    \"\"\"Predict O-glycosylation hotspots using S\u002FT density heuristic.\n\n    O-glycosylation preferentially occurs in S\u002FT-rich regions, often near\n    proline residues. This heuristic identifies candidate regions.\n\n    Args:\n        sequence: protein sequence string\n        window_size: sliding window size\n        threshold: minimum S\u002FT fraction to call a hotspot\n        exclude_near_proline: if True, downweight S\u002FT not near P\n    \"\"\"\n    seq = str(sequence).upper()\n    n = len(seq)\n\n    if n \u003C window_size:\n        return []\n\n    # Calculate S\u002FT density in sliding windows\n    densities = []\n    for i in range(n - window_size + 1):\n        window = seq[i:i + window_size]\n        st_count = window.count('S') + window.count('T')\n        density = st_count \u002F window_size\n        densities.append(density)\n\n    densities = np.array(densities)\n\n    # Find hotspot regions\n    hotspots = []\n    in_hotspot = False\n    start = 0\n\n    for i, d in enumerate(densities):\n        if d >= threshold and not in_hotspot:\n            start = i\n            in_hotspot = True\n        elif d \u003C threshold and in_hotspot:\n            hotspots.append({\n                'start': start + 1,  # 1-based\n                'end': i + window_size,\n                'length': i + window_size - start,\n                'max_density': float(densities[start:i].max()),\n                'mean_density': float(densities[start:i].mean()),\n                'region': seq[start:i + window_size]\n            })\n            in_hotspot = False\n\n    if in_hotspot:\n        hotspots.append({\n            'start': start + 1,\n            'end': n,\n            'length': n - start,\n            'max_density': float(densities[start:].max()),\n            'mean_density': float(densities[start:].mean()),\n            'region': seq[start:]\n        })\n\n    # Individual S\u002FT residues in hotspots\n    all_st_sites = []\n    for hs in hotspots:\n        region_start = hs['start'] - 1\n        region_seq = hs['region']\n        for j, aa in enumerate(region_seq):\n            if aa in ('S', 'T'):\n                pos = region_start + j + 1\n                # Check proline neighbors\n                has_nearby_P = False\n                for k in range(-3, 4):\n                    check_pos = region_start + j + k\n                    if 0 \u003C= check_pos \u003C n and seq[check_pos] == 'P':\n                        has_nearby_P = True\n                        break\n\n                all_st_sites.append({\n                    'position': pos,\n                    'residue': aa,\n                    'in_hotspot': True,\n                    'near_proline': has_nearby_P\n                })\n\n    print(f\"O-glycosylation hotspots: {len(hotspots)}\")\n    for hs in hotspots:\n        print(f\"  Pos {hs['start']}-{hs['end']}: density={hs['max_density']:.2f}, \"\n              f\"{hs['region'][:30]}{'...' if len(hs['region'])>30 else ''}\")\n    print(f\"Candidate S\u002FT residues: {len(all_st_sites)}\")\n\n    return hotspots, all_st_sites\n```\n\n### 3. Glycan Structure Resources\n\nCurated list of tools for glycan structure analysis and prediction.\n\n```python\nGLYCAN_TOOLS = {\n    'NetNGlyc': {\n        'url': 'https:\u002F\u002Fservices.healthtech.dtu.dk\u002Fservices\u002FNetNGlyc-1.0\u002F',\n        'description': 'Neural network prediction of N-glycosylation sites',\n        'input': 'Protein sequence (FASTA)',\n        'output': 'N-glycosylation probability per Asn',\n        'note': 'More accurate than motif-only scanning; considers sequence context'\n    },\n    'NetOGlyc': {\n        'url': 'https:\u002F\u002Fservices.healthtech.dtu.dk\u002Fservices\u002FNetOGlyc-4.0\u002F',\n        'description': 'Neural network prediction of mucin-type O-glycosylation',\n        'input': 'Protein sequence (FASTA)',\n        'output': 'O-glycosylation probability per Ser\u002FThr',\n        'note': 'Version 4.0 trained on O-GalNAc glycoproteomics data'\n    },\n    'GlycoWorkbench': {\n        'url': 'https:\u002F\u002Fcode.google.com\u002Farchive\u002Fp\u002Fglycoworkbench\u002F',\n        'description': 'Glycan structure drawing and MS annotation',\n        'input': 'Mass spectrometry data',\n        'output': 'Glycan structure assignments'\n    },\n    'GLYCAM-Web': {\n        'url': 'https:\u002F\u002Fglycam.org\u002F',\n        'description': 'Glycan 3D structure building and MD simulation',\n        'input': 'Glycan sequence (IUPAC condensed)',\n        'output': '3D coordinates (PDB), AMBER parameters'\n    },\n    'Glycoshield-MD': {\n        'url': 'https:\u002F\u002Fgithub.com\u002FGlycoSHIELD-MD\u002FGlycoSHIELD-MD',\n        'description': 'Model glycan shields on protein structures for MD',\n        'input': 'Protein PDB + glycosylation sites',\n        'output': 'Glycosylated protein structure'\n    },\n    'SweetTalk': {\n        'url': 'https:\u002F\u002Fglycoproteome.expasy.org\u002Fsweettalk\u002F',\n        'description': 'Glycoprotein structure visualization',\n        'input': 'UniProt ID',\n        'output': 'Interactive glycoprotein 3D viewer'\n    }\n}\n\ndef list_glycan_tools():\n    \"\"\"Print available glycan analysis tools.\"\"\"\n    for name, info in GLYCAN_TOOLS.items():\n        print(f\"\\n{name}\")\n        print(f\"  URL: {info['url']}\")\n        print(f\"  Description: {info['description']}\")\n        if 'note' in info:\n            print(f\"  Note: {info['note']}\")\n```\n\n### 4. Glycoprotein Analysis\n\nCombined N\u002FO glycosylation analysis with domain mapping.\n\n```python\ndef analyze_glycoprotein(sequence, protein_name='protein',\n                          uniprot_sites=None):\n    \"\"\"Comprehensive glycosylation analysis.\n\n    Args:\n        sequence: protein sequence\n        protein_name: name for reporting\n        uniprot_sites: dict of known sites from UniProt\n                       {'N_glyc': [positions], 'O_glyc': [positions]}\n    \"\"\"\n    seq = str(sequence).upper()\n    print(f\"=== Glycoprotein Analysis: {protein_name} ===\")\n    print(f\"Length: {len(seq)} residues\")\n\n    # N-glycosylation\n    n_sites = find_n_glycosylation_sites(seq)\n    print(f\"\\nN-glycosylation sites (sequon motif): {len(n_sites)}\")\n    for s in n_sites:\n        print(f\"  N{s['position']}: {s['motif']}\")\n\n    # O-glycosylation hotspots\n    o_hotspots, o_sites = predict_o_glycosylation_hotspots(seq)\n\n    # Comparison with UniProt annotations\n    if uniprot_sites:\n        known_n = set(uniprot_sites.get('N_glyc', []))\n        predicted_n = set(s['position'] for s in n_sites)\n\n        tp = known_n & predicted_n\n        fp = predicted_n - known_n\n        fn = known_n - predicted_n\n\n        print(f\"\\nComparison with UniProt annotations:\")\n        print(f\"  True positives (predicted & annotated): {len(tp)}\")\n        print(f\"  False positives (predicted, not annotated): {len(fp)}\")\n        print(f\"  False negatives (annotated, not predicted): {len(fn)}\")\n\n        if fn:\n            print(f\"  Missed sites: {sorted(fn)}\")\n            for pos in fn:\n                context = seq[max(0,pos-4):pos+5]\n                print(f\"    N{pos}: ...{context}... (may have N-P-S\u002FT or non-standard motif)\")\n\n    # Summary\n    print(f\"\\nSummary:\")\n    print(f\"  N-glyc sites: {len(n_sites)}\")\n    print(f\"  O-glyc hotspots: {len(o_hotspots)}\")\n    print(f\"  Total candidate O-glyc S\u002FT: {len(o_sites)}\")\n    print(f\"  Glycosylation density: {(len(n_sites) + len(o_sites)) \u002F len(seq) * 100:.1f}%\")\n\n    return {\n        'n_glyc_sites': n_sites,\n        'o_glyc_hotspots': o_hotspots,\n        'o_glyc_sites': o_sites\n    }\n```\n\n## Typical Workflows\n\n### Workflow 1: Predict All Glycosylation Sites in a Protein\n\n```python\nsequence = \"MANLQTSPNGTLKNVTSITDANLTQSPNNFTLRNITSANDTVTQSTPNVTQLNVSQSTPNVTQLNVSQST\"\nresults = analyze_glycoprotein(sequence, protein_name='MyProtein')\n```\n\n### Workflow 2: Compare Predicted vs UniProt-Annotated Sites\n\n```python\nsequence = \"MGVHECPAWLWLLLSLLSLPLGLPVLGAPPRLICDSRVLERYLLEAKEAENITTGCAEHCSLNENITVPDT\"\nknown = {'N_glyc': [24, 38, 83], 'O_glyc': []}  # Known from UniProt\nresults = analyze_glycoprotein(sequence, protein_name='EPO', uniprot_sites=known)\n```\n\n## Best Practices\n\n1. **N-glycosylation prediction** — sequon motif (N-X-S\u002FT, X!=P) is necessary but not sufficient; not all sequons are glycosylated; use NetNGlyc for probability-based prediction\n2. **O-glycosylation** — much harder to predict than N-glyc; the S\u002FT density heuristic identifies candidate regions but has high false positive rate; use NetOGlyc for better accuracy\n3. **Validate with UniProt** — always cross-reference predictions with experimentally verified glycosylation annotations in UniProt\n4. **Signal peptide** — glycosylation occurs in the ER\u002FGolgi; ensure the protein has a signal peptide (positions are relative to mature protein in databases)\n5. **Structural context** — glycosylation requires surface accessibility; use AlphaFold to check if predicted sites are surface-exposed\n6. **Biotherapeutics** — for antibody\u002Fprotein drug design, N-glycosylation in Fc regions (N297 in IgG) is critical for effector function\n\n## Troubleshooting\n\n**Problem:** Sequon search finds sites in cytoplasmic proteins\n**Solution:** N-glycosylation only occurs in secretory pathway proteins. Filter predictions by subcellular localization (check UniProt).\n\n**Problem:** Known glycosylation site not detected\n**Solution:** Some rare N-glycosylation occurs at non-canonical motifs (N-X-C). Check if the site has N-P-S\u002FT which is excluded by default.\n\n**Problem:** Too many O-glycosylation hotspots\n**Solution:** Increase the density threshold (e.g., 0.5). Focus on regions that are both S\u002FT-rich and in extracellular domains.\n\n## Resources\n\n- [UniProt Glycosylation Annotations](https:\u002F\u002Fwww.uniprot.org\u002Fhelp\u002Fcarbohyd)\n- [NetNGlyc Server](https:\u002F\u002Fservices.healthtech.dtu.dk\u002Fservices\u002FNetNGlyc-1.0\u002F)\n- [NetOGlyc Server](https:\u002F\u002Fservices.healthtech.dtu.dk\u002Fservices\u002FNetOGlyc-4.0\u002F)\n- [GlyConnect Database](https:\u002F\u002Fglyconnect.expasy.org\u002F)\n- [Essentials of Glycobiology (NCBI)](https:\u002F\u002Fwww.ncbi.nlm.nih.gov\u002Fbooks\u002FNBK310274\u002F)\n","# Glycobiology: Glycosylation Analysis\n\n## Overview\n\nGlycobiology provides lightweight computational tools for predicting and analyzing glycosylation sites in protein sequences. This skill covers N-glycosylation sequon motif finding (N-X-S\u002FT where X is not P), O-glycosylation hotspot prediction using a sliding window serine\u002Fthreonine density heuristic, glycan structure tool references, and combined glycoprotein analysis with domain mapping. All analyses use pure Python with minimal dependencies (Biopython for sequence I\u002FO, regex for pattern matching).\n\n## When to Use This Skill\n\n- Predicting N-glycosylation sites from protein sequences\n- Identifying O-glycosylation hotspot regions\n- Planning glycosylation site mutagenesis experiments\n- Comparing predicted vs experimentally determined glycosylation sites\n- Annotating glycosylation in biotherapeutic protein design\n- Surveying glycan analysis tools for downstream structural studies\n\n**Related Skills:** For protein function and existing glycosylation annotations use `uniprot-database`. For protein 3D structure and site accessibility use `alphafold-database`. For sequence manipulation use `biopython`.\n\n## Installation\n\n```bash\nuv pip install biopython numpy\n```\n\nNo additional dependencies required — this skill uses pure Python.\n\n## Quick Start\n\n```python\nimport re\n\ndef find_n_glycosylation_sites(sequence):\n    \"\"\"Find N-X-S\u002FT sequons where X != P.\"\"\"\n    sites = []\n    for i in range(len(sequence) - 2):\n        if sequence[i] == 'N' and sequence[i+1] != 'P' and sequence[i+2] in ('S', 'T'):\n            sites.append({\n                'position': i + 1,  # 1-based\n                'motif': sequence[i:i+3],\n                'context': sequence[max(0,i-3):i+6]\n            })\n    return sites\n\n# Example: human EPO\nepo_seq = \"MGVHECPAWLWLLLSLLSLPLGLPVLGAPPRLICDSRVLERYLLEAKEAENITTGCAEHCSLNENITVPDTKVNFYAWKRMEVGQQAVEVWQGLALLSEAVLRGQALLVNSSQPWEPLQLHVDKAVSGLRSLTTLLRALGAQKEAISPPDAASAAPLRTITADTFRKLFRVYSNFLRGKLKLYTGEACRTGDR\"\n\nsites = find_n_glycosylation_sites(epo_seq)\nprint(f\"N-glycosylation sites: {len(sites)}\")\nfor s in sites:\n    print(f\"  Position {s['position']}: {s['motif']} (context: ...{s['context']}...)\")\n```\n\n## Core Capabilities\n\n### 1. N-Glycosylation Motif Finding\n\nIdentify N-X-S\u002FT sequons in protein sequences.\n\n```python\nimport re\nfrom Bio import SeqIO\n\ndef find_n_glycosylation_sites(sequence, exclude_proline=True):\n    \"\"\"Find N-linked glycosylation sequons (N-X-S\u002FT).\n\n    Args:\n        sequence: protein sequence string\n        exclude_proline: if True, exclude N-P-S\u002FT motifs (standard rule)\n    \"\"\"\n    sites = []\n    seq = str(sequence).upper()\n\n    for i in range(len(seq) - 2):\n        if seq[i] != 'N':\n            continue\n\n        x_residue = seq[i + 1]\n        st_residue = seq[i + 2]\n\n        # Standard rule: X != P\n        if exclude_proline and x_residue == 'P':\n            continue\n\n        if st_residue not in ('S', 'T'):\n            continue\n\n        # Context (5 residues each side)\n        context_start = max(0, i - 5)\n        context_end = min(len(seq), i + 8)\n        context = seq[context_start:context_end]\n\n        sites.append({\n            'position': i + 1,  # 1-based position\n            'residue': seq[i],\n            'motif': seq[i:i+3],\n            'x_residue': x_residue,\n            'acceptor': st_residue,\n            'context': context,\n            'context_start': context_start + 1\n        })\n\n    return sites\n\ndef scan_fasta_for_n_glyc(fasta_path):\n    \"\"\"Scan all sequences in a FASTA file for N-glycosylation sites.\"\"\"\n    results = []\n    for record in SeqIO.parse(fasta_path, 'fasta'):\n        sites = find_n_glycosylation_sites(str(record.seq))\n        results.append({\n            'id': record.id,\n            'description': record.description,\n            'length': len(record.seq),\n            'n_sites': len(sites),\n            'sites': sites,\n            'density': len(sites) \u002F len(record.seq) * 1000  # per 1000 residues\n        })\n\n    import pandas as pd\n    df = pd.DataFrame([{k: v for k, v in r.items() if k != 'sites'} for r in results])\n    print(f\"Scanned {len(df)} sequences\")\n    print(f\"Total N-glyc sites: {df['n_sites'].sum()}\")\n    print(f\"Mean density: {df['density'].mean():.1f} per 1000 residues\")\n    return results\n\n# Example with multiple sequences\nsites = find_n_glycosylation_sites(\"MANLQTSPNGTLKNVTSITDA\")\nfor s in sites:\n    print(f\"N{s['position']}: {s['motif']} (X={s['x_residue']}, acceptor={s['acceptor']})\")\n```\n\n### 2. O-Glycosylation Hotspot Prediction\n\nIdentify regions enriched in serine\u002Fthreonine that may be O-glycosylated.\n\n```python\nimport numpy as np\n\ndef predict_o_glycosylation_hotspots(sequence, window_size=20, threshold=0.4,\n                                       exclude_near_proline=True):\n    \"\"\"Predict O-glycosylation hotspots using S\u002FT density heuristic.\n\n    O-glycosylation preferentially occurs in S\u002FT-rich regions, often near\n    proline residues. This heuristic identifies candidate regions.\n\n    Args:\n        sequence: protein sequence string\n        window_size: sliding window size\n        threshold: minimum S\u002FT fraction to call a hotspot\n        exclude_near_proline: if True, downweight S\u002FT not near P\n    \"\"\"\n    seq = str(sequence).upper()\n    n = len(seq)\n\n    if n \u003C window_size:\n        return []\n\n    # Calculate S\u002FT density in sliding windows\n    densities = []\n    for i in range(n - window_size + 1):\n        window = seq[i:i + window_size]\n        st_count = window.count('S') + window.count('T')\n        density = st_count \u002F window_size\n        densities.append(density)\n\n    densities = np.array(densities)\n\n    # Find hotspot regions\n    hotspots = []\n    in_hotspot = False\n    start = 0\n\n    for i, d in enumerate(densities):\n        if d >= threshold and not in_hotspot:\n            start = i\n            in_hotspot = True\n        elif d \u003C threshold and in_hotspot:\n            hotspots.append({\n                'start': start + 1,  # 1-based\n                'end': i + window_size,\n                'length': i + window_size - start,\n                'max_density': float(densities[start:i].max()),\n                'mean_density': float(densities[start:i].mean()),\n                'region': seq[start:i + window_size]\n            })\n            in_hotspot = False\n\n    if in_hotspot:\n        hotspots.append({\n            'start': start + 1,\n            'end': n,\n            'length': n - start,\n            'max_density': float(densities[start:].max()),\n            'mean_density': float(densities[start:].mean()),\n            'region': seq[start:]\n        })\n\n    # Individual S\u002FT residues in hotspots\n    all_st_sites = []\n    for hs in hotspots:\n        region_start = hs['start'] - 1\n        region_seq = hs['region']\n        for j, aa in enumerate(region_seq):\n            if aa in ('S', 'T'):\n                pos = region_start + j + 1\n                # Check proline neighbors\n                has_nearby_P = False\n                for k in range(-3, 4):\n                    check_pos = region_start + j + k\n                    if 0 \u003C= check_pos \u003C n and seq[check_pos] == 'P':\n                        has_nearby_P = True\n                        break\n\n                all_st_sites.append({\n                    'position': pos,\n                    'residue': aa,\n                    'in_hotspot': True,\n                    'near_proline': has_nearby_P\n                })\n\n    print(f\"O-glycosylation hotspots: {len(hotspots)}\")\n    for hs in hotspots:\n        print(f\"  Pos {hs['start']}-{hs['end']}: density={hs['max_density']:.2f}, \"\n              f\"{hs['region'][:30]}{'...' if len(hs['region'])>30 else ''}\")\n    print(f\"Candidate S\u002FT residues: {len(all_st_sites)}\")\n\n    return hotspots, all_st_sites\n```\n\n### 3. Glycan Structure Resources\n\nCurated list of tools for glycan structure analysis and prediction.\n\n```python\nGLYCAN_TOOLS = {\n    'NetNGlyc': {\n        'url': 'https:\u002F\u002Fservices.healthtech.dtu.dk\u002Fservices\u002FNetNGlyc-1.0\u002F',\n        'description': 'Neural network prediction of N-glycosylation sites',\n        'input': 'Protein sequence (FASTA)',\n        'output': 'N-glycosylation probability per Asn',\n        'note': 'More accurate than motif-only scanning; considers sequence context'\n    },\n    'NetOGlyc': {\n        'url': 'https:\u002F\u002Fservices.healthtech.dtu.dk\u002Fservices\u002FNetOGlyc-4.0\u002F',\n        'description': 'Neural network prediction of mucin-type O-glycosylation',\n        'input': 'Protein sequence (FASTA)',\n        'output': 'O-glycosylation probability per Ser\u002FThr',\n        'note': 'Version 4.0 trained on O-GalNAc glycoproteomics data'\n    },\n    'GlycoWorkbench': {\n        'url': 'https:\u002F\u002Fcode.google.com\u002Farchive\u002Fp\u002Fglycoworkbench\u002F',\n        'description': 'Glycan structure drawing and MS annotation',\n        'input': 'Mass spectrometry data',\n        'output': 'Glycan structure assignments'\n    },\n    'GLYCAM-Web': {\n        'url': 'https:\u002F\u002Fglycam.org\u002F',\n        'description': 'Glycan 3D structure building and MD simulation',\n        'input': 'Glycan sequence (IUPAC condensed)',\n        'output': '3D coordinates (PDB), AMBER parameters'\n    },\n    'Glycoshield-MD': {\n        'url': 'https:\u002F\u002Fgithub.com\u002FGlycoSHIELD-MD\u002FGlycoSHIELD-MD',\n        'description': 'Model glycan shields on protein structures for MD',\n        'input': 'Protein PDB + glycosylation sites',\n        'output': 'Glycosylated protein structure'\n    },\n    'SweetTalk': {\n        'url': 'https:\u002F\u002Fglycoproteome.expasy.org\u002Fsweettalk\u002F',\n        'description': 'Glycoprotein structure visualization',\n        'input': 'UniProt ID',\n        'output': 'Interactive glycoprotein 3D viewer'\n    }\n}\n\ndef list_glycan_tools():\n    \"\"\"Print available glycan analysis tools.\"\"\"\n    for name, info in GLYCAN_TOOLS.items():\n        print(f\"\\n{name}\")\n        print(f\"  URL: {info['url']}\")\n        print(f\"  Description: {info['description']}\")\n        if 'note' in info:\n            print(f\"  Note: {info['note']}\")\n```\n\n### 4. Glycoprotein Analysis\n\nCombined N\u002FO glycosylation analysis with domain mapping.\n\n```python\ndef analyze_glycoprotein(sequence, protein_name='protein',\n                          uniprot_sites=None):\n    \"\"\"Comprehensive glycosylation analysis.\n\n    Args:\n        sequence: protein sequence\n        protein_name: name for reporting\n        uniprot_sites: dict of known sites from UniProt\n                       {'N_glyc': [positions], 'O_glyc': [positions]}\n    \"\"\"\n    seq = str(sequence).upper()\n    print(f\"=== Glycoprotein Analysis: {protein_name} ===\")\n    print(f\"Length: {len(seq)} residues\")\n\n    # N-glycosylation\n    n_sites = find_n_glycosylation_sites(seq)\n    print(f\"\\nN-glycosylation sites (sequon motif): {len(n_sites)}\")\n    for s in n_sites:\n        print(f\"  N{s['position']}: {s['motif']}\")\n\n    # O-glycosylation hotspots\n    o_hotspots, o_sites = predict_o_glycosylation_hotspots(seq)\n\n    # Comparison with UniProt annotations\n    if uniprot_sites:\n        known_n = set(uniprot_sites.get('N_glyc', []))\n        predicted_n = set(s['position'] for s in n_sites)\n\n        tp = known_n & predicted_n\n        fp = predicted_n - known_n\n        fn = known_n - predicted_n\n\n        print(f\"\\nComparison with UniProt annotations:\")\n        print(f\"  True positives (predicted & annotated): {len(tp)}\")\n        print(f\"  False positives (predicted, not annotated): {len(fp)}\")\n        print(f\"  False negatives (annotated, not predicted): {len(fn)}\")\n\n        if fn:\n            print(f\"  Missed sites: {sorted(fn)}\")\n            for pos in fn:\n                context = seq[max(0,pos-4):pos+5]\n                print(f\"    N{pos}: ...{context}... (may have N-P-S\u002FT or non-standard motif)\")\n\n    # Summary\n    print(f\"\\nSummary:\")\n    print(f\"  N-glyc sites: {len(n_sites)}\")\n    print(f\"  O-glyc hotspots: {len(o_hotspots)}\")\n    print(f\"  Total candidate O-glyc S\u002FT: {len(o_sites)}\")\n    print(f\"  Glycosylation density: {(len(n_sites) + len(o_sites)) \u002F len(seq) * 100:.1f}%\")\n\n    return {\n        'n_glyc_sites': n_sites,\n        'o_glyc_hotspots': o_hotspots,\n        'o_glyc_sites': o_sites\n    }\n```\n\n## Typical Workflows\n\n### Workflow 1: Predict All Glycosylation Sites in a Protein\n\n```python\nsequence = \"MANLQTSPNGTLKNVTSITDANLTQSPNNFTLRNITSANDTVTQSTPNVTQLNVSQSTPNVTQLNVSQST\"\nresults = analyze_glycoprotein(sequence, protein_name='MyProtein')\n```\n\n### Workflow 2: Compare Predicted vs UniProt-Annotated Sites\n\n```python\nsequence = \"MGVHECPAWLWLLLSLLSLPLGLPVLGAPPRLICDSRVLERYLLEAKEAENITTGCAEHCSLNENITVPDT\"\nknown = {'N_glyc': [24, 38, 83], 'O_glyc': []}  # Known from UniProt\nresults = analyze_glycoprotein(sequence, protein_name='EPO', uniprot_sites=known)\n```\n\n## Best Practices\n\n1. **N-glycosylation prediction** — sequon motif (N-X-S\u002FT, X!=P) is necessary but not sufficient; not all sequons are glycosylated; use NetNGlyc for probability-based prediction\n2. **O-glycosylation** — much harder to predict than N-glyc; the S\u002FT density heuristic identifies candidate regions but has high false positive rate; use NetOGlyc for better accuracy\n3. **Validate with UniProt** — always cross-reference predictions with experimentally verified glycosylation annotations in UniProt\n4. **Signal peptide** — glycosylation occurs in the ER\u002FGolgi; ensure the protein has a signal peptide (positions are relative to mature protein in databases)\n5. **Structural context** — glycosylation requires surface accessibility; use AlphaFold to check if predicted sites are surface-exposed\n6. **Biotherapeutics** — for antibody\u002Fprotein drug design, N-glycosylation in Fc regions (N297 in IgG) is critical for effector function\n\n## Troubleshooting\n\n**Problem:** Sequon search finds sites in cytoplasmic proteins\n**Solution:** N-glycosylation only occurs in secretory pathway proteins. Filter predictions by subcellular localization (check UniProt).\n\n**Problem:** Known glycosylation site not detected\n**Solution:** Some rare N-glycosylation occurs at non-canonical motifs (N-X-C). Check if the site has N-P-S\u002FT which is excluded by default.\n\n**Problem:** Too many O-glycosylation hotspots\n**Solution:** Increase the density threshold (e.g., 0.5). Focus on regions that are both S\u002FT-rich and in extracellular domains.\n\n## Resources\n\n- [UniProt Glycosylation Annotations](https:\u002F\u002Fwww.uniprot.org\u002Fhelp\u002Fcarbohyd)\n- [NetNGlyc Server](https:\u002F\u002Fservices.healthtech.dtu.dk\u002Fservices\u002FNetNGlyc-1.0\u002F)\n- [NetOGlyc Server](https:\u002F\u002Fservices.healthtech.dtu.dk\u002Fservices\u002FNetOGlyc-4.0\u002F)\n- [GlyConnect Database](https:\u002F\u002Fglyconnect.expasy.org\u002F)\n- [Essentials of Glycobiology (NCBI)](https:\u002F\u002Fwww.ncbi.nlm.nih.gov\u002Fbooks\u002FNBK310274\u002F)\n",{"name":5,"license":37,"category":28,"metadata":38,"description":7},"MIT license",{"skill-author":39},"InkVell Inc.","main","4aa39efd1cdab0b4657ecee16c92a92011a5b10f","openscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Fglycobiology","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub","https:\u002F\u002Fgithub.com\u002Ffadrienne","2026-10-28 00:43:09",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add fadrienne\u002FMyGitHub --skill glycobiology",{"tool":52,"command":53},"bunx","bunx skills add fadrienne\u002FMyGitHub --skill glycobiology",{"tool":55,"command":56},"pnpm","pnpm dlx skills add fadrienne\u002FMyGitHub --skill glycobiology","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Fglycobiology\u002FSKILL.md",true,[60],{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"scripts\u002Fpredict_glycosylation.py","SCRIPT","脚本",13117,"https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fopenscience\u002Fbackend\u002Fcli\u002Fskills\u002Fbiology\u002Fglycobiology\u002Fscripts\u002Fpredict_glycosylation.py",[67,103,129,156,183,207],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":71,"sourceHtmlUrl":72,"categories":73,"keywords":84,"publishedAt":102},"01M6XF367QJAN2RNPJWZ3SENGD","hallmark","Anti-AI-slop design skill for greenfield pages, audits, redesigns, and design extraction from URLs or screenshots. Use when the user asks to build a new app or landing page, wants to redesign something, invokes Hallmark by name, or uses audit\u002Fredesign\u002Fstudy.","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fhallmark\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fhallmark\u002FSKILL.md",[74,79],{"categoryNo":75,"categoryName":76,"taxonomyType":77,"taxonomyTypeDesc":78},"01JBSEEDCAT000000000000015","视觉设计","SCENARIO","使用场景",{"categoryNo":80,"categoryName":81,"taxonomyType":82,"taxonomyTypeDesc":83},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[69,85,86,87,88,89,90,91,92,93,29,94,95,96,97,23,98,99,100,101],"app","slop","Anti-AI","design","when","audit","redesign","screenshots","by name","page","study","landing","pages","anti-ai-slop","build","name","landing page","2026-11-10 22:39:42",{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":107,"licenseFileUrl":108,"sourceHtmlUrl":109,"categories":110,"keywords":113,"publishedAt":102},"01M6XAFXNBF8DXAXJ4ZMPQ82M8","brand-guidelines","Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fanthropic-skills\u002Fskills\u002Fbrand-guidelines\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fanthropic-skills\u002Fskills\u002Fbrand-guidelines\u002FSKILL.md",[111,112],{"categoryNo":75,"categoryName":76,"taxonomyType":77,"taxonomyTypeDesc":78},{"categoryNo":80,"categoryName":81,"taxonomyType":82,"taxonomyTypeDesc":83},[114,115,116,117,118,119,88,23,89,120,121,122,123,124,125,126,127,128],"brand","guidelines","brand guidelines","standards","official","company","apply","sort","visual","artifact","style","look","typography","it","formatting",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":107,"licenseFileUrl":133,"sourceHtmlUrl":134,"categories":135,"keywords":137,"publishedAt":102},"01M6XAFSEYZJ2TNR02EQG7Y7ZZ","algorithmic-art","Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fanthropic-skills\u002Fskills\u002Falgorithmic-art\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fanthropic-skills\u002Fskills\u002Falgorithmic-art\u002FSKILL.md",[136],{"categoryNo":75,"categoryName":76,"taxonomyType":77,"taxonomyTypeDesc":78},[138,139,140,141,142,143,23,144,89,145,146,147,148,149,150,151,152,153,154,155],"Art","algorithmic art","algorithmic","copyright","exploration","generative","Existing","generative art","code","interactive","users","with","create","work","request","systems","flow","fields",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":165,"publishedAt":32},"01M7167B28PK20HP7R7ZED2DY0","statistical-power","Sample size calculation, power analysis, and effect size conversion for scientific studies. Use BEFORE data collection (a priori) to determine required N, or after (post-hoc) to compute achieved power. Covers parametric tests (t-test, ANOVA, chi-square, proportions, correlation, regression), simulation-based power for complex\u002Fclustered\u002Fnested designs, and power curves. Use this skill when someone asks 'how many samples do I need', 'what is my power', 'what effect size can I detect', or any variant. Pairs with \u002Fexperimental-design (choose design first, then compute power) and \u002Fstatistical-analysis (analyze data after collection).","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fstatistical-power\u002FSKILL.md",[162],{"categoryNo":163,"categoryName":164,"taxonomyType":77,"taxonomyTypeDesc":78},"01JBSEEDCAT000000000000023","Skill与智能体开发",[166,167,168,169,170,171,88,172,89,173,174,21,175,176,177,178,179,180,181,182],"power","statistical power","effect","scipy","regression","choose","uv","Bash","collection","calculation","ANOVA","conversion","analyze","t-test","chi-square","simulation","sample",{"skillNo":184,"name":185,"nameZh":6,"description":186,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":187,"categories":188,"keywords":192,"publishedAt":32},"01M71677EBCM8EPCE9BZCK8505","statistical-analysis","Guided statistical analysis with test selection and reporting. Use when you need help choosing appropriate tests for your data, assumption checking, power analysis, and APA-formatted results. Best for academic research reporting, test selection guidance. For implementing specific models programmatically use statsmodels.","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fstatistical-analysis\u002FSKILL.md",[189],{"categoryNo":190,"categoryName":191,"taxonomyType":77,"taxonomyTypeDesc":78},"01JBSEEDCAT000000000000008","测试与质量",[21,193,166,194,195,196,89,197,198,199,29,200,23,149,201,202,203,204,205,206],"statistical analysis","academic research","implementing","selection","you","reporting","data","tests","test","research","results","statsmodels","models","help",{"skillNo":208,"name":209,"nameZh":6,"description":210,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":211,"categories":212,"keywords":220,"publishedAt":32},"01M71673R93XAHFH81DBNVNG7H","scientific-writing","Core skill for the deep research and writing tool. Write scientific manuscripts in full paragraphs (never bullet points). Use two-stage process with (1) section outlines with key points using research-lookup then (2) convert to flowing prose. IMRAD structure, citations (APA\u002FAMA\u002FVancouver), figures\u002Ftables, reporting guidelines (CONSORT\u002FSTROBE\u002FPRISMA), for research papers and journal submissions.","https:\u002F\u002Fgithub.com\u002Ffadrienne\u002FMyGitHub\u002Fblob\u002Fmain\u002Fscientific-agent-skills\u002Fskills\u002Fscientific-writing\u002FSKILL.md",[213,216,217],{"categoryNo":214,"categoryName":215,"taxonomyType":77,"taxonomyTypeDesc":78},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":163,"categoryName":164,"taxonomyType":77,"taxonomyTypeDesc":78},{"categoryNo":218,"categoryName":219,"taxonomyType":82,"taxonomyTypeDesc":83},"01JBSEEDCAT000000000000036","内容创作者",[221,222,223,224,225,226,227,228,229,230,173,231,232,25,233,234,235,236,198,237],"writing","scientific","scientific writing","Citations","deep","deep research","never","papers","journal","false","api","prisma","openrouter","Outlines","core skill","read","features"]