[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EGEQB8NEB3ESFT57VB6A8A":3,"skill-same:01M7EGEQB8NEB3ESFT57VB6A8A":77},{"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":46,"commitSha":47,"skillDirectory":48,"forksCount":14,"repositoryHtmlUrl":49,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":51,"install":52,"resources":64},"01M7EGEQB8NEB3ESFT57VB6A8A","bio-workflows-clip-pipeline",null,"End-to-end CLIP-seq pipeline from FASTQ to ENCODE-compliant binding sites, single-nucleotide crosslink maps, annotation, motifs, and (optionally) differential binding. Use when running the full Yeo lab eCLIP \u002F iCLIP \u002F iCLIP2 \u002F iCLIP3 \u002F irCLIP \u002F PAR-CLIP analysis with SMInput control, protocol-specific UMI extraction, ENCODE STAR parameters, CLIPper or Skipper peak calling with stringent log2 FC and -log10 p thresholds, IDR rescue and self-consistency QC, and downstream motif registration with mCross or PEKA.","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-workflows-clip-pipeline\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-workflows-clip-pipeline\nworkflow: true\ndepends_on: [clip-seq\u002Fclip-preprocessing, clip-seq\u002Fclip-alignment, clip-seq\u002Fclip-qc, clip-seq\u002Fclip-peak-calling, clip-seq\u002Fcrosslink-site-detection, clip-seq\u002Fbinding-site-annotation, clip-seq\u002Fclip-motif-analysis, clip-seq\u002Fdifferential-clip]\nqc_checkpoints: [preprocessing_retention, alignment_rate, library_complexity, frip, idr]\ndescription: End-to-end CLIP-seq pipeline from FASTQ to ENCODE-compliant binding sites, single-nucleotide crosslink maps, annotation, motifs, and (optionally) differential binding. Use when running the full Yeo lab eCLIP \u002F iCLIP \u002F iCLIP2 \u002F iCLIP3 \u002F irCLIP \u002F PAR-CLIP analysis with SMInput control, protocol-specific UMI extraction, ENCODE STAR parameters, CLIPper or Skipper peak calling with stringent log2 FC and -log10 p thresholds, IDR rescue and self-consistency QC, and downstream motif registration with mCross or PEKA.\ntool_type: mixed\nprimary_tool: CLIPper\nsource: \"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills\"\nsource_repository: \"GPTomics\u002FbioSkills\"\nsource_path: \"workflows\u002Fclip-pipeline\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n\n## Version Compatibility\n\nReference examples tested with: umi_tools 1.1.5+, cutadapt 4.6+, fastp 0.23+, STAR 2.7.11b+, samtools 1.19+, bedtools 2.31+, CLIPper 2.0+, Skipper (commit 2023.05+), PureCLIP 1.3.1+, HOMER 4.11+, ChIPseeker 1.40+, preseq 3.2+, picard 3.1+, idr 2.0.4+, MultiQC 1.21+.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- CLI: `\u003Ctool> --version` then `\u003Ctool> --help` to confirm flags\n- Python: `pip show \u003Cpackage>` then `help(module.function)` to check signatures\n- R: `packageVersion('\u003Cpkg>')` then `?function_name` to verify parameters\n\nIf code throws unexpected errors, introspect the installed tool and adapt the example rather than retrying.\n\n# CLIP-seq End-to-End Pipeline\n\n**\"Analyze my CLIP-seq data from raw FASTQ to ENCODE-compliant binding sites\"** -> Orchestrate protocol-specific UMI extraction, 3'-only adapter trimming (preserving the R2 5' truncation = crosslink site -1), ENCODE STAR alignment, UMI-based deduplication, library complexity QC, peak calling against SMInput with stringent thresholds (log2 FC >= 3 AND -log10 p >= 3), single-nucleotide crosslink-site detection, ChIPseeker annotation with CLIP-appropriate `tssRegion`, motif discovery with GC-matched background and CL-position registration, and optional differential binding between conditions.\n\nThis is a workflow skill: it owns the chaining decisions and hand-offs, not the internals of any one step.\n\n## The governing principle\n\nA CLIP callset is decided at four seams, not inside the peak caller.\n\n1. **The protocol variant is the master commitment made once at the top.** It fixes the UMI pattern, the STAR mismatch ceiling, and the crosslink signal (truncation vs PAR-CLIP T->C vs STAMP C->U edit). The CLIP Variant Selection table below is that decision; everything downstream inherits it.\n2. **Every IP is normalized against its SMInput with ENCODE-stringent thresholds (log2 FC >= 3 AND -log10 p >= 3).** Peaks called without SMInput normalization are enrichment-uncontrolled and dominated by abundance.\n3. **The R2 5' end IS the crosslink site (-1), so preprocessing and alignment must PRESERVE it.** Trim 3'-only and permissively (`-q 6`, never `-g` on R1), and align with STAR `--alignEndsType EndToEnd` - soft-clipping or aggressive 5' trimming destroys the truncation base and with it single-nucleotide resolution.\n4. **40-70% PCR duplication is BY DESIGN; low duplication signals a FAILED IP, not a clean library.** The IP enriches a small molecule pool, so the real quality metric is the UNIQUE-fragment count after UMI dedup - never the raw duplication rate.\n\n## Pipeline Overview\n\n```\nFASTQ + SMInput\n  -> [clip-preprocessing]    UMI extract + 3' adapter trim (-q 6 -m 18) + two-pass for eCLIP\n  -> [clip-alignment]        STAR ENCODE block (alignEndsType EndToEnd, mismatch 0.04 or 0.07 for PAR-CLIP) + UMI dedup\n  -> [clip-qc]               preseq, FRiP, IDR rescue + self-consistency, read distribution\n  -> [clip-peak-calling]     CLIPper + SMInput log2 norm (stringent: log2 FC >= 3, -log10 p >= 3) OR Skipper (substantially more sites)\n  -> [crosslink-site-detection] PureCLIP or CTK CITS for single-nt CL positions\n  -> [binding-site-annotation] ChIPseeker (tssRegion=c(-100,100), level=transcript) + RBP-Maps for splicing factors\n  -> [clip-motif-analysis]   HOMER + mCross (registered) + RBNS Kd cross-check\n  -> [differential-clip]     DEWSeq window-level NB with type:condition interaction (optional)\n```\n\n## CLIP Variant Selection\n\n| Variant | When to use | UMI pattern | STAR mismatch ceiling | Detection signal |\n|---------|-------------|-------------|----------------------|------------------|\n| eCLIP (Van Nostrand 2016) | ENCODE comparability; SMInput available | 10 nt R1 | 0.04 | R2 5' truncation |\n| iCLIP \u002F iCLIP2 \u002F iCLIP3 | Single-end; high motif specificity | NNNXXXXNN (3+4+2; demux first) | 0.04 | R1 5' truncation |\n| irCLIP \u002F FLASH | Non-radioactive; fast | Protocol-specific | 0.04 | Truncation |\n| PAR-CLIP | Photoactivatable nucleoside (4SU); HEK293\u002FK562 | 4 nt typical | 0.07 (raised for T->C) | T->C transitions |\n| miCLIP \u002F miCLIP2 | m6A modification | iCLIP-style | 0.04 | Truncation + C->T at m6A |\n| STAMP \u002F scSTAMP | Antibody-free; in vivo or single-cell | NA (no UV) | 0.04 (RNA-seq mode) | C->U editing (RBP-APOBEC1 fusion) |\n| chimeric eCLIP \u002F miR-eCLIP | Direct miRNA-target pairs | 10 nt R1 | 0.04 | Chimeric reads |\n\n## Step 1: Quality Control of Raw FASTQ\n\n```bash\n# Initial QC\nfastqc raw_R1.fq.gz raw_R2.fq.gz -o qc\u002Fraw\u002F\n\n# Inspect first 12 bases of 100 reads to verify UMI pattern matches the prep\nzcat raw_R1.fq.gz | awk 'NR%4==2' | head -100 | cut -c1-12 | sort | uniq -c | sort -rn | head\n# Random barcode positions show ~25% per base; library barcodes are fixed\n```\n\n## Step 2: Preprocessing (Protocol-Specific)\n\n**Goal:** Convert raw CLIP FASTQ into UMI-deduplicated, alignment-ready FASTQ while preserving the R2 5' end (= crosslink site -1) that drives single-nucleotide resolution downstream.\n\n**Approach:** Use the protocol-matched UMI pattern (10 nt eCLIP, NNNXXXXNN iCLIP, 4 nt PAR-CLIP), run `umi_tools extract` to move random barcodes to read names, then apply cutadapt with 3'-only adapter trimming at `-q 6 -m 18` (permissive 5' to protect the truncation base). eCLIP uses two-pass trimming to remove read-through inline adapters from R2 5' only; iCLIP and PAR-CLIP use single-pass.\n\n```bash\n# eCLIP: 10 nt UMI on R1; two-pass adapter trim for read-through\n# See clip-seq\u002Fclip-preprocessing for protocol-specific patterns\numi_tools extract \\\n    --bc-pattern=NNNNNNNNNN \\\n    --stdin=raw_R1.fq.gz --read2-in=raw_R2.fq.gz \\\n    --stdout=R1.umi.fq.gz --read2-out=R2.umi.fq.gz \\\n    --log=qc\u002Fumi_extract.log\n\n# Pass 1: 3' adapter on both reads\n# -q 6 is intentionally permissive; aggressive trimming destroys R2 5' = CL site -1\ncutadapt \\\n    -a AGATCGGAAGAGCACACGTCT \\\n    -A AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT \\\n    --quality-base 33 -q 6 -m 18 \\\n    -j 8 \\\n    -o R1.p1.fq.gz -p R2.p1.fq.gz \\\n    R1.umi.fq.gz R2.umi.fq.gz \\\n    > qc\u002Fcutadapt_pass1.log 2>&1\n\n# Pass 2: strip read-through 5' adapter from R2 only (NEVER -g on R1)\ncutadapt \\\n    -G GATCGTCGGACTGTAGAACTCTGAAC \\\n    --quality-base 33 -q 6 -m 18 \\\n    -j 8 \\\n    -o R1.trim.fq.gz -p R2.trim.fq.gz \\\n    R1.p1.fq.gz R2.p1.fq.gz \\\n    >> qc\u002Fcutadapt_pass2.log 2>&1\n```\n\nFor PAR-CLIP: same UMI extraction but downstream alignment raises `--outFilterMismatchNoverReadLmax` from 0.04 to 0.07 (the T->C signature would otherwise be filtered as sequencing error). See clip-seq\u002Fclip-preprocessing for full per-protocol guidance.\n\n## Step 3: Alignment (ENCODE STAR Block)\n\n```bash\n# ENCODE eCLIP convention. Sacred: --alignEndsType EndToEnd (soft-clip would destroy truncation = CL site -1)\nSTAR --runMode alignReads \\\n    --runThreadN 16 \\\n    --genomeDir \u002Fpath\u002Fto\u002FSTAR_hg38_index \\\n    --genomeLoad NoSharedMemory \\\n    --readFilesIn R1.trim.fq.gz R2.trim.fq.gz \\\n    --readFilesCommand zcat \\\n    --outFilterType BySJout \\\n    --outFilterMultimapNmax 1 \\\n    --alignEndsType EndToEnd \\\n    --outFilterMismatchNoverReadLmax 0.04 \\\n    --outFilterScoreMinOverLread 0.66 \\\n    --outFilterMatchNminOverLread 0.66 \\\n    --outSAMtype BAM SortedByCoordinate \\\n    --outSAMattributes All \\\n    --outFileNamePrefix sample_\n\nsamtools index sample_Aligned.sortedByCoord.out.bam\n\n# MAPQ >= 10 (255 = unique in STAR; lower = multi-mapper)\nsamtools view -b -q 10 sample_Aligned.sortedByCoord.out.bam > sample_q10.bam\nsamtools index sample_q10.bam\n\n# UMI dedup. ENCODE convention: --method=unique\numi_tools dedup \\\n    --stdin=sample_q10.bam \\\n    --stdout=sample_dedup.bam \\\n    --method=unique \\\n    --paired \\\n    --log=qc\u002Fdedup.log\nsamtools index sample_dedup.bam\n```\n\nFor PAR-CLIP: change `--outFilterMismatchNoverReadLmax 0.04` to `0.07`. For repeat-binding RBPs (MATR3, ZFP36, FUS at LINE-1, HNRNPK at SINEs): change `--outFilterMultimapNmax 1` to `100` and add `--outSAMmultNmax -1`, then run CLAM downstream for EM-based multi-mapper assignment. See clip-seq\u002Fclip-alignment for full guidance.\n\n## Step 4: QC (Five Gates)\n\n```bash\n# Gate 1: preprocessing retention (cutadapt log, target >= 70%)\ngrep -E \"passing filters|Pairs written\" qc\u002Fcutadapt_pass1.log\n\n# Gate 2: alignment rate (STAR Log.final.out, target >= 60% eCLIP, 70% iCLIP)\ngrep \"Uniquely mapped reads %\" sample_Log.final.out\n\n# Gate 3: library complexity (preseq, target >= 1M unique at sequenced depth)\npreseq lc_extrap -B -P sample_q10.bam -o qc\u002Fpreseq.txt\n\n# Gate 4: FRiP (after peak calling; target >= 0.005 narrow-binding RBP)\n# Gate 5: IDR replicate reproducibility (after peak calling; target rescue and self-consistency \u003C 2)\n\n# Aggregate all QC into a single MultiQC report\nmultiqc qc\u002F -o qc\u002Fmultiqc\u002F\n```\n\nCLIP libraries have 40-70% PCR duplication BY DESIGN (the IP enriches a small molecule pool). Low duplication usually means failed IP, not a good library. The unique-fragment count after UMI dedup is the actual quality metric. See clip-seq\u002Fclip-qc for full five-gate diagnostic.\n\n## Step 5: Peak Calling\n\n```bash\n# CLIPper (ENCODE canonical) + SMInput log2 normalization\nclipper \\\n    -b sample_dedup.bam \\\n    -s GRCh38 \\\n    -o peaks\u002Fsample.clipper.bed \\\n    --FDR 0.05 \\\n    --save-pickle \\\n    --processors 8   # super-local p-values are hard-coded ON in current CLIPper; the --superlocal flag was removed\n\n# ENCODE stringent: log2(IP\u002FSMInput) >= 3 AND -log10 p >= 3\n# (Yeo lab eclip-pipeline scripts implement the normalization; see clip-seq\u002Fclip-peak-calling)\npython overlap_peakfi_with_bam_PE.py \\\n    peaks\u002Fsample.clipper.bed \\\n    sample_dedup.bam sminput_dedup.bam \\\n    sample_dedup.bam.readnum.txt sminput_dedup.bam.readnum.txt \\\n    peaks\u002Fsample.normed.bed\n\npython compress_l2foldenrpeakfi_for_replicate_overlapping_bedformat.py \\\n    peaks\u002Fsample.normed.bed \\\n    peaks\u002Fsample.compressed.bed\n\n# Stringent filter\nawk 'BEGIN{FS=OFS=\"\\t\"} $5 >= 3 && $6 >= 3' peaks\u002Fsample.compressed.bed > peaks\u002Fsample.stringent.bed\n```\n\nFor maximum sensitivity (substantially more sites than CLIPper for mRNA-binding RBPs), use the Skipper Snakemake workflow with the same SMInput control. Mandatory for FASTKD2 \u002F mt-RBPs which CLIPper misses on chrM. See clip-seq\u002Fclip-peak-calling for the full caller taxonomy.\n\n## Step 6: Single-Nucleotide Crosslink-Site Detection\n\n```bash\n# PureCLIP: HMM jointly modeling enrichment + truncation + CL motif.\n# -iv learns HMM parameters on a CHROMOSOME SUBSET (semicolon-delimited) to cut memory\u002Fruntime\n# (per PureCLIP docs); it is NOT a BED. To limit the callset to expressed regions, pre-filter the input BAM.\npureclip \\\n    -i sample_dedup.bam -bai sample_dedup.bam.bai \\\n    -g genome.fa \\\n    -ibam sminput_dedup.bam -ibai sminput_dedup.bam.bai \\\n    -o crosslinks\u002Fsample.sites.bed \\\n    -or crosslinks\u002Fsample.regions.bed \\\n    -nt 8 -dm 8 \\\n    -iv 'chr1;chr2;chr3;'\n```\n\nSingle-nt CL sites feed mCross motif registration and allele-specific binding analyses. They are NOT a replacement for the broad peak list; complementary outputs. See clip-seq\u002Fcrosslink-site-detection.\n\n## Step 7: IDR Across Replicates\n\n```bash\n# Sort each replicate's compressed BED by signal (log2 FC, column 5)\nsort -k5,5gr peaks\u002Frep1.compressed.bed > peaks\u002Frep1.sorted.bed\nsort -k5,5gr peaks\u002Frep2.compressed.bed > peaks\u002Frep2.sorted.bed\n\n# True replicates threshold 0.05\nidr --samples peaks\u002Frep1.sorted.bed peaks\u002Frep2.sorted.bed \\\n    --input-file-type bed --rank 5 \\\n    --output-file qc\u002Fidr.true.out \\\n    --idr-threshold 0.05 \\\n    --plot --log-output-file qc\u002Fidr.log\n\n# ENCODE rule: rescue + self-consistency ratios both \u003C 2 to pass\n# Pseudo-replicate IDR (split BAM in half) at threshold 0.10\n```\n\n## Step 8: Binding-Site Annotation\n\n```r\n# CLIP-appropriate ChIPseeker (tssRegion tight; level=transcript)\nlibrary(ChIPseeker)\nlibrary(TxDb.Hsapiens.UCSC.hg38.knownGene)\ntxdb \u003C- TxDb.Hsapiens.UCSC.hg38.knownGene\n\npeaks \u003C- readPeakFile('peaks\u002Fsample.stringent.bed')\nanno \u003C- annotatePeak(\n    peaks,\n    TxDb = txdb,\n    level = 'transcript',\n    tssRegion = c(-100, 100),\n    genomicAnnotationPriority = c('Promoter','5UTR','3UTR','Exon','Intron','Downstream','Intergenic')\n)\nplotAnnoPie(anno)\n```\n\nDefault ChIPseeker `tssRegion=c(-3000, 3000)` over-extends for CLIP (would label 30-50% peaks as \"Promoter\"). Splicing factors additionally need RBP-Maps (Yeo lab) for the 1400 nt cassette-exon regulatory metagene. See clip-seq\u002Fbinding-site-annotation.\n\n## Step 9: Motif Analysis (De Novo + CL-Registered)\n\n```bash\n# Extract peak sequences (strand-preserving)\nbedtools getfasta -fi genome.fa -bed peaks\u002Fsample.stringent.bed -s -fo motifs\u002Fpeaks.fa\n\n# GC-matched 3' UTR background (NOT auto-shuffled, which biases to AU)\nbedtools shuffle -i peaks\u002Fsample.stringent.bed -g chrom.sizes \\\n    -incl expressed_3utr.bed -seed 42 > motifs\u002Fbackground.bed\nbedtools getfasta -fi genome.fa -bed motifs\u002Fbackground.bed -s -fo motifs\u002Fbackground.fa\n\n# HOMER de novo\nfindMotifs.pl motifs\u002Fpeaks.fa fasta motifs\u002Fhomer \\\n    -rna -len 5,6,7,8 -p 8 -fasta motifs\u002Fbackground.fa\n\n# mCross for CL-position-registered motif. mCross.pl takes a POSITIONAL FASTA of sequences\n# pre-extracted\u002Fregistered around the CL sites and an output stem (not a BED + genome + -i\u002F-g\u002F-k\u002F-o):\n#   bedtools slop -i crosslinks\u002Fsample.sites.bed -g genome.sizes -b 10 | bedtools getfasta -fi genome.fa -bed - -s > motifs\u002Fpeakseqs.fa\nmCross.pl motifs\u002Fpeakseqs.fa motifs\u002Fmcross   # see clip-seq\u002Fclip-motif-analysis for options\n```\n\nUV254 crosslinking has a strong U bias at CL sites; naive logos centered on CL positions are U-enriched even for non-U-binding RBPs. mCross corrects this by registering motif relative to the CL offset. See clip-seq\u002Fclip-motif-analysis.\n\n## Step 10: Differential Binding (Optional, Across Conditions)\n\n```r\n# DEWSeq window-level NB with the interaction-term design\n# The interaction `~ type + condition + type:condition` tests whether IP\u002FSMInput ratio shifts;\n# naive `~ condition` confounds binding with expression changes.\nlibrary(DEWSeq)\ncounts \u003C- read.table('counts\u002Fmerged.tsv', sep='\\t', header=TRUE, row.names=1)\ncolData \u003C- data.frame(\n    type = relevel(factor(c('ip','ip','ip','ip','sminput','sminput','sminput','sminput')), ref='sminput'),\n    condition = relevel(factor(c('treat','treat','ctrl','ctrl','treat','treat','ctrl','ctrl')), ref='ctrl')\n)\ndds \u003C- DESeqDataSetFromSlidingWindows(\n    countData=counts, colData=colData,\n    annotObj='annotation.txt',   # htseq-clip TAB annotation table (named columns), NOT a plain BED\n    design = ~ type + condition + type:condition\n)\ndds \u003C- DESeq(dds)\n# with sminput\u002Fctrl as the references, the interaction coefficient is typeip.conditiontreat\nres \u003C- results(dds, name='typeip.conditiontreat')\n```\n\nSee clip-seq\u002Fdifferential-clip for full DEWSeq workflow and the htseq-clip preprocessing required upstream.\n\n## Quality Checkpoints\n\n| Step | Metric | ENCODE target |\n|------|--------|---------------|\n| Preprocessing | Retention after adapter trim | >= 70% |\n| Alignment | Unique mapping rate | >= 60% (eCLIP); >= 70% (iCLIP) |\n| Complexity | preseq predicted unique at 100M reads | >= 10M (good); >= 1M (minimum acceptable) |\n| Peak calling | FRiP (narrow-binding RBP) | >= 0.005 |\n| Peak calling | Stringent peaks log2(IP\u002FSMI) | >= 3 |\n| Peak calling | Stringent peaks -log10 p | >= 3 |\n| IDR | Rescue ratio | \u003C 2 |\n| IDR | Self-consistency ratio | \u003C 2 |\n| Annotation | Top RBP-class match expectation | Y (HuR -> 3' UTR; PTBP1 -> intron; FASTKD2 -> chrM) |\n\n## Per-Variant Adjustments\n\n- **PAR-CLIP:** Raise STAR `--outFilterMismatchNoverReadLmax` from 0.04 to 0.07; downstream use PARalyzer or CTK CIMS substitution T->C\n- **iCLIP \u002F iCLIP2 multiplexed:** Demultiplex by inline library barcode (NNNXXXXNN) BEFORE umi_tools extract\n- **HITS-CLIP:** Use deletion-tolerant aligner (BWA-aln); downstream CTK CIMS deletion mode\n- **Repeat-binding RBPs:** STAR `--outFilterMultimapNmax 100 --outSAMmultNmax -1` + CLAM EM rescue\n- **m6A profiling:** Switch to clip-seq\u002Fm6a-clip (miCLIP2 + m6Aboost or GLORI)\n- **Antibody unavailable:** Switch to clip-seq\u002Fstamp-antibody-free (STAMP or TRIBE)\n- **miRNA targets:** Switch to clip-seq\u002Fago-clip-mirna-targets (chimeric eCLIP \u002F miR-eCLIP)\n- **Variant-effect prediction:** Use clip-seq\u002Fclip-deep-learning (RBPNet or RNAProt)\n\n## Common Errors\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| Peaks everywhere, dominated by abundant transcripts | No SMInput normalization | Normalize IP against SMInput; keep log2 FC >= 3 AND -log10 p >= 3 |\n| Single-nucleotide resolution lost | Soft-clipping or aggressive 5' trim destroyed the R2 truncation base | STAR `--alignEndsType EndToEnd`; 3'-only `-q 6` trim; never `-g` on R1 |\n| PAR-CLIP T->C signal missing | Mismatch ceiling 0.04 filtered the transitions as error | Raise `--outFilterMismatchNoverReadLmax` to 0.07 |\n| \"Low-complexity\" library discarded | Judged on raw duplication (40-70% is normal for CLIP) | Use the unique-fragment count after UMI dedup as the quality metric |\n| Motif logo is all-U even for a non-U-binding RBP | Naive CL-centered logo + UV U-bias | mCross CL-registered motif + GC-matched (not shuffled) background |\n| 30-50% of peaks labeled \"Promoter\" | Default `tssRegion=c(-3000,3000)` over-extends for CLIP | Tight `tssRegion=c(-100,100)`, `level='transcript'` |\n| Differential binding confounded with expression | `~ condition` design | `~ type + condition + type:condition` interaction (DEWSeq) |\n\n## References\n\n- Van Nostrand EL, Pratt GA, Shishkin AA, et al (2016) Robust transcriptome-wide discovery of RNA-binding protein binding sites with enhanced CLIP (eCLIP). *Nature Methods* 13:508-514. DOI 10.1038\u002Fnmeth.3810.\n- Van Nostrand EL, Freese P, Pratt GA, et al (2020) A large-scale binding and functional map of human RNA-binding proteins. *Nature* 583:711-719. DOI 10.1038\u002Fs41586-020-2077-3. (ENCODE RBP; SMInput + IDR practice.)\n- Krakau S, Richard H, Marsico A (2017) PureCLIP: capturing target-specific protein-RNA interaction footprints from single-nucleotide CLIP-seq data. *Genome Biology* 18:240. DOI 10.1186\u002Fs13059-017-1364-2.\n- Li Q, Brown JB, Huang H, Bickel PJ (2011) Measuring reproducibility of high-throughput experiments. *Annals of Applied Statistics* 5:1752-1779. DOI 10.1214\u002F11-AOAS466. (IDR.)\n\n## Related Skills\n\n- clip-seq\u002Fclip-preprocessing - UMI extraction and adapter trimming details\n- clip-seq\u002Fclip-alignment - STAR ENCODE block + multi-mapper rescue\n- clip-seq\u002Fclip-qc - Five-gate QC framework\n- clip-seq\u002Fclip-peak-calling - CLIPper \u002F Skipper \u002F PureCLIP \u002F CTK taxonomy\n- clip-seq\u002Fcrosslink-site-detection - Single-nt CL detection by chemistry\n- clip-seq\u002Fbinding-site-annotation - ChIPseeker + RBP-Maps\n- clip-seq\u002Fclip-motif-analysis - HOMER + mCross + RBNS validation\n- clip-seq\u002Fdifferential-clip - DEWSeq + Flipper for cross-condition\n- clip-seq\u002Fm6a-clip - miCLIP2 \u002F GLORI \u002F DART for m6A modifications\n- clip-seq\u002Fstamp-antibody-free - STAMP \u002F TRIBE for antibody-free profiling\n- clip-seq\u002Fago-clip-mirna-targets - chimeric eCLIP for direct miRNA-target pairs\n- clip-seq\u002Fclip-deep-learning - RBPNet \u002F RNAProt for variant-effect prediction\n- read-qc\u002Fquality-reports - FastQC \u002F MultiQC upstream QC\n- reporting\u002Fautomated-qc-reports - MultiQC aggregates the per-tool QC into one report; gating stays in the five-gate framework, not MultiQC\n- alternative-splicing\u002Fdifferential-splicing - Cassette exon tables for RBP-Maps\n","## Version Compatibility\n\nReference examples tested with: umi_tools 1.1.5+, cutadapt 4.6+, fastp 0.23+, STAR 2.7.11b+, samtools 1.19+, bedtools 2.31+, CLIPper 2.0+, Skipper (commit 2023.05+), PureCLIP 1.3.1+, HOMER 4.11+, ChIPseeker 1.40+, preseq 3.2+, picard 3.1+, idr 2.0.4+, MultiQC 1.21+.\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- CLI: `\u003Ctool> --version` then `\u003Ctool> --help` to confirm flags\n- Python: `pip show \u003Cpackage>` then `help(module.function)` to check signatures\n- R: `packageVersion('\u003Cpkg>')` then `?function_name` to verify parameters\n\nIf code throws unexpected errors, introspect the installed tool and adapt the example rather than retrying.\n\n# CLIP-seq End-to-End Pipeline\n\n**\"Analyze my CLIP-seq data from raw FASTQ to ENCODE-compliant binding sites\"** -> Orchestrate protocol-specific UMI extraction, 3'-only adapter trimming (preserving the R2 5' truncation = crosslink site -1), ENCODE STAR alignment, UMI-based deduplication, library complexity QC, peak calling against SMInput with stringent thresholds (log2 FC >= 3 AND -log10 p >= 3), single-nucleotide crosslink-site detection, ChIPseeker annotation with CLIP-appropriate `tssRegion`, motif discovery with GC-matched background and CL-position registration, and optional differential binding between conditions.\n\nThis is a workflow skill: it owns the chaining decisions and hand-offs, not the internals of any one step.\n\n## The governing principle\n\nA CLIP callset is decided at four seams, not inside the peak caller.\n\n1. **The protocol variant is the master commitment made once at the top.** It fixes the UMI pattern, the STAR mismatch ceiling, and the crosslink signal (truncation vs PAR-CLIP T->C vs STAMP C->U edit). The CLIP Variant Selection table below is that decision; everything downstream inherits it.\n2. **Every IP is normalized against its SMInput with ENCODE-stringent thresholds (log2 FC >= 3 AND -log10 p >= 3).** Peaks called without SMInput normalization are enrichment-uncontrolled and dominated by abundance.\n3. **The R2 5' end IS the crosslink site (-1), so preprocessing and alignment must PRESERVE it.** Trim 3'-only and permissively (`-q 6`, never `-g` on R1), and align with STAR `--alignEndsType EndToEnd` - soft-clipping or aggressive 5' trimming destroys the truncation base and with it single-nucleotide resolution.\n4. **40-70% PCR duplication is BY DESIGN; low duplication signals a FAILED IP, not a clean library.** The IP enriches a small molecule pool, so the real quality metric is the UNIQUE-fragment count after UMI dedup - never the raw duplication rate.\n\n## Pipeline Overview\n\n```\nFASTQ + SMInput\n  -> [clip-preprocessing]    UMI extract + 3' adapter trim (-q 6 -m 18) + two-pass for eCLIP\n  -> [clip-alignment]        STAR ENCODE block (alignEndsType EndToEnd, mismatch 0.04 or 0.07 for PAR-CLIP) + UMI dedup\n  -> [clip-qc]               preseq, FRiP, IDR rescue + self-consistency, read distribution\n  -> [clip-peak-calling]     CLIPper + SMInput log2 norm (stringent: log2 FC >= 3, -log10 p >= 3) OR Skipper (substantially more sites)\n  -> [crosslink-site-detection] PureCLIP or CTK CITS for single-nt CL positions\n  -> [binding-site-annotation] ChIPseeker (tssRegion=c(-100,100), level=transcript) + RBP-Maps for splicing factors\n  -> [clip-motif-analysis]   HOMER + mCross (registered) + RBNS Kd cross-check\n  -> [differential-clip]     DEWSeq window-level NB with type:condition interaction (optional)\n```\n\n## CLIP Variant Selection\n\n| Variant | When to use | UMI pattern | STAR mismatch ceiling | Detection signal |\n|---------|-------------|-------------|----------------------|------------------|\n| eCLIP (Van Nostrand 2016) | ENCODE comparability; SMInput available | 10 nt R1 | 0.04 | R2 5' truncation |\n| iCLIP \u002F iCLIP2 \u002F iCLIP3 | Single-end; high motif specificity | NNNXXXXNN (3+4+2; demux first) | 0.04 | R1 5' truncation |\n| irCLIP \u002F FLASH | Non-radioactive; fast | Protocol-specific | 0.04 | Truncation |\n| PAR-CLIP | Photoactivatable nucleoside (4SU); HEK293\u002FK562 | 4 nt typical | 0.07 (raised for T->C) | T->C transitions |\n| miCLIP \u002F miCLIP2 | m6A modification | iCLIP-style | 0.04 | Truncation + C->T at m6A |\n| STAMP \u002F scSTAMP | Antibody-free; in vivo or single-cell | NA (no UV) | 0.04 (RNA-seq mode) | C->U editing (RBP-APOBEC1 fusion) |\n| chimeric eCLIP \u002F miR-eCLIP | Direct miRNA-target pairs | 10 nt R1 | 0.04 | Chimeric reads |\n\n## Step 1: Quality Control of Raw FASTQ\n\n```bash\n# Initial QC\nfastqc raw_R1.fq.gz raw_R2.fq.gz -o qc\u002Fraw\u002F\n\n# Inspect first 12 bases of 100 reads to verify UMI pattern matches the prep\nzcat raw_R1.fq.gz | awk 'NR%4==2' | head -100 | cut -c1-12 | sort | uniq -c | sort -rn | head\n# Random barcode positions show ~25% per base; library barcodes are fixed\n```\n\n## Step 2: Preprocessing (Protocol-Specific)\n\n**Goal:** Convert raw CLIP FASTQ into UMI-deduplicated, alignment-ready FASTQ while preserving the R2 5' end (= crosslink site -1) that drives single-nucleotide resolution downstream.\n\n**Approach:** Use the protocol-matched UMI pattern (10 nt eCLIP, NNNXXXXNN iCLIP, 4 nt PAR-CLIP), run `umi_tools extract` to move random barcodes to read names, then apply cutadapt with 3'-only adapter trimming at `-q 6 -m 18` (permissive 5' to protect the truncation base). eCLIP uses two-pass trimming to remove read-through inline adapters from R2 5' only; iCLIP and PAR-CLIP use single-pass.\n\n```bash\n# eCLIP: 10 nt UMI on R1; two-pass adapter trim for read-through\n# See clip-seq\u002Fclip-preprocessing for protocol-specific patterns\numi_tools extract \\\n    --bc-pattern=NNNNNNNNNN \\\n    --stdin=raw_R1.fq.gz --read2-in=raw_R2.fq.gz \\\n    --stdout=R1.umi.fq.gz --read2-out=R2.umi.fq.gz \\\n    --log=qc\u002Fumi_extract.log\n\n# Pass 1: 3' adapter on both reads\n# -q 6 is intentionally permissive; aggressive trimming destroys R2 5' = CL site -1\ncutadapt \\\n    -a AGATCGGAAGAGCACACGTCT \\\n    -A AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGT \\\n    --quality-base 33 -q 6 -m 18 \\\n    -j 8 \\\n    -o R1.p1.fq.gz -p R2.p1.fq.gz \\\n    R1.umi.fq.gz R2.umi.fq.gz \\\n    > qc\u002Fcutadapt_pass1.log 2>&1\n\n# Pass 2: strip read-through 5' adapter from R2 only (NEVER -g on R1)\ncutadapt \\\n    -G GATCGTCGGACTGTAGAACTCTGAAC \\\n    --quality-base 33 -q 6 -m 18 \\\n    -j 8 \\\n    -o R1.trim.fq.gz -p R2.trim.fq.gz \\\n    R1.p1.fq.gz R2.p1.fq.gz \\\n    >> qc\u002Fcutadapt_pass2.log 2>&1\n```\n\nFor PAR-CLIP: same UMI extraction but downstream alignment raises `--outFilterMismatchNoverReadLmax` from 0.04 to 0.07 (the T->C signature would otherwise be filtered as sequencing error). See clip-seq\u002Fclip-preprocessing for full per-protocol guidance.\n\n## Step 3: Alignment (ENCODE STAR Block)\n\n```bash\n# ENCODE eCLIP convention. Sacred: --alignEndsType EndToEnd (soft-clip would destroy truncation = CL site -1)\nSTAR --runMode alignReads \\\n    --runThreadN 16 \\\n    --genomeDir \u002Fpath\u002Fto\u002FSTAR_hg38_index \\\n    --genomeLoad NoSharedMemory \\\n    --readFilesIn R1.trim.fq.gz R2.trim.fq.gz \\\n    --readFilesCommand zcat \\\n    --outFilterType BySJout \\\n    --outFilterMultimapNmax 1 \\\n    --alignEndsType EndToEnd \\\n    --outFilterMismatchNoverReadLmax 0.04 \\\n    --outFilterScoreMinOverLread 0.66 \\\n    --outFilterMatchNminOverLread 0.66 \\\n    --outSAMtype BAM SortedByCoordinate \\\n    --outSAMattributes All \\\n    --outFileNamePrefix sample_\n\nsamtools index sample_Aligned.sortedByCoord.out.bam\n\n# MAPQ >= 10 (255 = unique in STAR; lower = multi-mapper)\nsamtools view -b -q 10 sample_Aligned.sortedByCoord.out.bam > sample_q10.bam\nsamtools index sample_q10.bam\n\n# UMI dedup. ENCODE convention: --method=unique\numi_tools dedup \\\n    --stdin=sample_q10.bam \\\n    --stdout=sample_dedup.bam \\\n    --method=unique \\\n    --paired \\\n    --log=qc\u002Fdedup.log\nsamtools index sample_dedup.bam\n```\n\nFor PAR-CLIP: change `--outFilterMismatchNoverReadLmax 0.04` to `0.07`. For repeat-binding RBPs (MATR3, ZFP36, FUS at LINE-1, HNRNPK at SINEs): change `--outFilterMultimapNmax 1` to `100` and add `--outSAMmultNmax -1`, then run CLAM downstream for EM-based multi-mapper assignment. See clip-seq\u002Fclip-alignment for full guidance.\n\n## Step 4: QC (Five Gates)\n\n```bash\n# Gate 1: preprocessing retention (cutadapt log, target >= 70%)\ngrep -E \"passing filters|Pairs written\" qc\u002Fcutadapt_pass1.log\n\n# Gate 2: alignment rate (STAR Log.final.out, target >= 60% eCLIP, 70% iCLIP)\ngrep \"Uniquely mapped reads %\" sample_Log.final.out\n\n# Gate 3: library complexity (preseq, target >= 1M unique at sequenced depth)\npreseq lc_extrap -B -P sample_q10.bam -o qc\u002Fpreseq.txt\n\n# Gate 4: FRiP (after peak calling; target >= 0.005 narrow-binding RBP)\n# Gate 5: IDR replicate reproducibility (after peak calling; target rescue and self-consistency \u003C 2)\n\n# Aggregate all QC into a single MultiQC report\nmultiqc qc\u002F -o qc\u002Fmultiqc\u002F\n```\n\nCLIP libraries have 40-70% PCR duplication BY DESIGN (the IP enriches a small molecule pool). Low duplication usually means failed IP, not a good library. The unique-fragment count after UMI dedup is the actual quality metric. See clip-seq\u002Fclip-qc for full five-gate diagnostic.\n\n## Step 5: Peak Calling\n\n```bash\n# CLIPper (ENCODE canonical) + SMInput log2 normalization\nclipper \\\n    -b sample_dedup.bam \\\n    -s GRCh38 \\\n    -o peaks\u002Fsample.clipper.bed \\\n    --FDR 0.05 \\\n    --save-pickle \\\n    --processors 8   # super-local p-values are hard-coded ON in current CLIPper; the --superlocal flag was removed\n\n# ENCODE stringent: log2(IP\u002FSMInput) >= 3 AND -log10 p >= 3\n# (Yeo lab eclip-pipeline scripts implement the normalization; see clip-seq\u002Fclip-peak-calling)\npython overlap_peakfi_with_bam_PE.py \\\n    peaks\u002Fsample.clipper.bed \\\n    sample_dedup.bam sminput_dedup.bam \\\n    sample_dedup.bam.readnum.txt sminput_dedup.bam.readnum.txt \\\n    peaks\u002Fsample.normed.bed\n\npython compress_l2foldenrpeakfi_for_replicate_overlapping_bedformat.py \\\n    peaks\u002Fsample.normed.bed \\\n    peaks\u002Fsample.compressed.bed\n\n# Stringent filter\nawk 'BEGIN{FS=OFS=\"\\t\"} $5 >= 3 && $6 >= 3' peaks\u002Fsample.compressed.bed > peaks\u002Fsample.stringent.bed\n```\n\nFor maximum sensitivity (substantially more sites than CLIPper for mRNA-binding RBPs), use the Skipper Snakemake workflow with the same SMInput control. Mandatory for FASTKD2 \u002F mt-RBPs which CLIPper misses on chrM. See clip-seq\u002Fclip-peak-calling for the full caller taxonomy.\n\n## Step 6: Single-Nucleotide Crosslink-Site Detection\n\n```bash\n# PureCLIP: HMM jointly modeling enrichment + truncation + CL motif.\n# -iv learns HMM parameters on a CHROMOSOME SUBSET (semicolon-delimited) to cut memory\u002Fruntime\n# (per PureCLIP docs); it is NOT a BED. To limit the callset to expressed regions, pre-filter the input BAM.\npureclip \\\n    -i sample_dedup.bam -bai sample_dedup.bam.bai \\\n    -g genome.fa \\\n    -ibam sminput_dedup.bam -ibai sminput_dedup.bam.bai \\\n    -o crosslinks\u002Fsample.sites.bed \\\n    -or crosslinks\u002Fsample.regions.bed \\\n    -nt 8 -dm 8 \\\n    -iv 'chr1;chr2;chr3;'\n```\n\nSingle-nt CL sites feed mCross motif registration and allele-specific binding analyses. They are NOT a replacement for the broad peak list; complementary outputs. See clip-seq\u002Fcrosslink-site-detection.\n\n## Step 7: IDR Across Replicates\n\n```bash\n# Sort each replicate's compressed BED by signal (log2 FC, column 5)\nsort -k5,5gr peaks\u002Frep1.compressed.bed > peaks\u002Frep1.sorted.bed\nsort -k5,5gr peaks\u002Frep2.compressed.bed > peaks\u002Frep2.sorted.bed\n\n# True replicates threshold 0.05\nidr --samples peaks\u002Frep1.sorted.bed peaks\u002Frep2.sorted.bed \\\n    --input-file-type bed --rank 5 \\\n    --output-file qc\u002Fidr.true.out \\\n    --idr-threshold 0.05 \\\n    --plot --log-output-file qc\u002Fidr.log\n\n# ENCODE rule: rescue + self-consistency ratios both \u003C 2 to pass\n# Pseudo-replicate IDR (split BAM in half) at threshold 0.10\n```\n\n## Step 8: Binding-Site Annotation\n\n```r\n# CLIP-appropriate ChIPseeker (tssRegion tight; level=transcript)\nlibrary(ChIPseeker)\nlibrary(TxDb.Hsapiens.UCSC.hg38.knownGene)\ntxdb \u003C- TxDb.Hsapiens.UCSC.hg38.knownGene\n\npeaks \u003C- readPeakFile('peaks\u002Fsample.stringent.bed')\nanno \u003C- annotatePeak(\n    peaks,\n    TxDb = txdb,\n    level = 'transcript',\n    tssRegion = c(-100, 100),\n    genomicAnnotationPriority = c('Promoter','5UTR','3UTR','Exon','Intron','Downstream','Intergenic')\n)\nplotAnnoPie(anno)\n```\n\nDefault ChIPseeker `tssRegion=c(-3000, 3000)` over-extends for CLIP (would label 30-50% peaks as \"Promoter\"). Splicing factors additionally need RBP-Maps (Yeo lab) for the 1400 nt cassette-exon regulatory metagene. See clip-seq\u002Fbinding-site-annotation.\n\n## Step 9: Motif Analysis (De Novo + CL-Registered)\n\n```bash\n# Extract peak sequences (strand-preserving)\nbedtools getfasta -fi genome.fa -bed peaks\u002Fsample.stringent.bed -s -fo motifs\u002Fpeaks.fa\n\n# GC-matched 3' UTR background (NOT auto-shuffled, which biases to AU)\nbedtools shuffle -i peaks\u002Fsample.stringent.bed -g chrom.sizes \\\n    -incl expressed_3utr.bed -seed 42 > motifs\u002Fbackground.bed\nbedtools getfasta -fi genome.fa -bed motifs\u002Fbackground.bed -s -fo motifs\u002Fbackground.fa\n\n# HOMER de novo\nfindMotifs.pl motifs\u002Fpeaks.fa fasta motifs\u002Fhomer \\\n    -rna -len 5,6,7,8 -p 8 -fasta motifs\u002Fbackground.fa\n\n# mCross for CL-position-registered motif. mCross.pl takes a POSITIONAL FASTA of sequences\n# pre-extracted\u002Fregistered around the CL sites and an output stem (not a BED + genome + -i\u002F-g\u002F-k\u002F-o):\n#   bedtools slop -i crosslinks\u002Fsample.sites.bed -g genome.sizes -b 10 | bedtools getfasta -fi genome.fa -bed - -s > motifs\u002Fpeakseqs.fa\nmCross.pl motifs\u002Fpeakseqs.fa motifs\u002Fmcross   # see clip-seq\u002Fclip-motif-analysis for options\n```\n\nUV254 crosslinking has a strong U bias at CL sites; naive logos centered on CL positions are U-enriched even for non-U-binding RBPs. mCross corrects this by registering motif relative to the CL offset. See clip-seq\u002Fclip-motif-analysis.\n\n## Step 10: Differential Binding (Optional, Across Conditions)\n\n```r\n# DEWSeq window-level NB with the interaction-term design\n# The interaction `~ type + condition + type:condition` tests whether IP\u002FSMInput ratio shifts;\n# naive `~ condition` confounds binding with expression changes.\nlibrary(DEWSeq)\ncounts \u003C- read.table('counts\u002Fmerged.tsv', sep='\\t', header=TRUE, row.names=1)\ncolData \u003C- data.frame(\n    type = relevel(factor(c('ip','ip','ip','ip','sminput','sminput','sminput','sminput')), ref='sminput'),\n    condition = relevel(factor(c('treat','treat','ctrl','ctrl','treat','treat','ctrl','ctrl')), ref='ctrl')\n)\ndds \u003C- DESeqDataSetFromSlidingWindows(\n    countData=counts, colData=colData,\n    annotObj='annotation.txt',   # htseq-clip TAB annotation table (named columns), NOT a plain BED\n    design = ~ type + condition + type:condition\n)\ndds \u003C- DESeq(dds)\n# with sminput\u002Fctrl as the references, the interaction coefficient is typeip.conditiontreat\nres \u003C- results(dds, name='typeip.conditiontreat')\n```\n\nSee clip-seq\u002Fdifferential-clip for full DEWSeq workflow and the htseq-clip preprocessing required upstream.\n\n## Quality Checkpoints\n\n| Step | Metric | ENCODE target |\n|------|--------|---------------|\n| Preprocessing | Retention after adapter trim | >= 70% |\n| Alignment | Unique mapping rate | >= 60% (eCLIP); >= 70% (iCLIP) |\n| Complexity | preseq predicted unique at 100M reads | >= 10M (good); >= 1M (minimum acceptable) |\n| Peak calling | FRiP (narrow-binding RBP) | >= 0.005 |\n| Peak calling | Stringent peaks log2(IP\u002FSMI) | >= 3 |\n| Peak calling | Stringent peaks -log10 p | >= 3 |\n| IDR | Rescue ratio | \u003C 2 |\n| IDR | Self-consistency ratio | \u003C 2 |\n| Annotation | Top RBP-class match expectation | Y (HuR -> 3' UTR; PTBP1 -> intron; FASTKD2 -> chrM) |\n\n## Per-Variant Adjustments\n\n- **PAR-CLIP:** Raise STAR `--outFilterMismatchNoverReadLmax` from 0.04 to 0.07; downstream use PARalyzer or CTK CIMS substitution T->C\n- **iCLIP \u002F iCLIP2 multiplexed:** Demultiplex by inline library barcode (NNNXXXXNN) BEFORE umi_tools extract\n- **HITS-CLIP:** Use deletion-tolerant aligner (BWA-aln); downstream CTK CIMS deletion mode\n- **Repeat-binding RBPs:** STAR `--outFilterMultimapNmax 100 --outSAMmultNmax -1` + CLAM EM rescue\n- **m6A profiling:** Switch to clip-seq\u002Fm6a-clip (miCLIP2 + m6Aboost or GLORI)\n- **Antibody unavailable:** Switch to clip-seq\u002Fstamp-antibody-free (STAMP or TRIBE)\n- **miRNA targets:** Switch to clip-seq\u002Fago-clip-mirna-targets (chimeric eCLIP \u002F miR-eCLIP)\n- **Variant-effect prediction:** Use clip-seq\u002Fclip-deep-learning (RBPNet or RNAProt)\n\n## Common Errors\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| Peaks everywhere, dominated by abundant transcripts | No SMInput normalization | Normalize IP against SMInput; keep log2 FC >= 3 AND -log10 p >= 3 |\n| Single-nucleotide resolution lost | Soft-clipping or aggressive 5' trim destroyed the R2 truncation base | STAR `--alignEndsType EndToEnd`; 3'-only `-q 6` trim; never `-g` on R1 |\n| PAR-CLIP T->C signal missing | Mismatch ceiling 0.04 filtered the transitions as error | Raise `--outFilterMismatchNoverReadLmax` to 0.07 |\n| \"Low-complexity\" library discarded | Judged on raw duplication (40-70% is normal for CLIP) | Use the unique-fragment count after UMI dedup as the quality metric |\n| Motif logo is all-U even for a non-U-binding RBP | Naive CL-centered logo + UV U-bias | mCross CL-registered motif + GC-matched (not shuffled) background |\n| 30-50% of peaks labeled \"Promoter\" | Default `tssRegion=c(-3000,3000)` over-extends for CLIP | Tight `tssRegion=c(-100,100)`, `level='transcript'` |\n| Differential binding confounded with expression | `~ condition` design | `~ type + condition + type:condition` interaction (DEWSeq) |\n\n## References\n\n- Van Nostrand EL, Pratt GA, Shishkin AA, et al (2016) Robust transcriptome-wide discovery of RNA-binding protein binding sites with enhanced CLIP (eCLIP). *Nature Methods* 13:508-514. DOI 10.1038\u002Fnmeth.3810.\n- Van Nostrand EL, Freese P, Pratt GA, et al (2020) A large-scale binding and functional map of human RNA-binding proteins. *Nature* 583:711-719. DOI 10.1038\u002Fs41586-020-2077-3. (ENCODE RBP; SMInput + IDR practice.)\n- Krakau S, Richard H, Marsico A (2017) PureCLIP: capturing target-specific protein-RNA interaction footprints from single-nucleotide CLIP-seq data. *Genome Biology* 18:240. DOI 10.1186\u002Fs13059-017-1364-2.\n- Li Q, Brown JB, Huang H, Bickel PJ (2011) Measuring reproducibility of high-throughput experiments. *Annals of Applied Statistics* 5:1752-1779. DOI 10.1214\u002F11-AOAS466. (IDR.)\n\n## Related Skills\n\n- clip-seq\u002Fclip-preprocessing - UMI extraction and adapter trimming details\n- clip-seq\u002Fclip-alignment - STAR ENCODE block + multi-mapper rescue\n- clip-seq\u002Fclip-qc - Five-gate QC framework\n- clip-seq\u002Fclip-peak-calling - CLIPper \u002F Skipper \u002F PureCLIP \u002F CTK taxonomy\n- clip-seq\u002Fcrosslink-site-detection - Single-nt CL detection by chemistry\n- clip-seq\u002Fbinding-site-annotation - ChIPseeker + RBP-Maps\n- clip-seq\u002Fclip-motif-analysis - HOMER + mCross + RBNS validation\n- clip-seq\u002Fdifferential-clip - DEWSeq + Flipper for cross-condition\n- clip-seq\u002Fm6a-clip - miCLIP2 \u002F GLORI \u002F DART for m6A modifications\n- clip-seq\u002Fstamp-antibody-free - STAMP \u002F TRIBE for antibody-free profiling\n- clip-seq\u002Fago-clip-mirna-targets - chimeric eCLIP for direct miRNA-target pairs\n- clip-seq\u002Fclip-deep-learning - RBPNet \u002F RNAProt for variant-effect prediction\n- read-qc\u002Fquality-reports - FastQC \u002F MultiQC upstream QC\n- reporting\u002Fautomated-qc-reports - MultiQC aggregates the per-tool QC into one report; gating stays in the five-gate framework, not MultiQC\n- alternative-splicing\u002Fdifferential-splicing - Cassette exon tables for RBP-Maps\n",{"name":5,"source":24,"license":15,"workflow":25,"tool_type":26,"depends_on":27,"description":7,"imported_at":36,"source_path":37,"primary_tool":38,"qc_checkpoints":39,"source_repository":45},"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills",true,"mixed",[28,29,30,31,32,33,34,35],"clip-seq\u002Fclip-preprocessing","clip-seq\u002Fclip-alignment","clip-seq\u002Fclip-qc","clip-seq\u002Fclip-peak-calling","clip-seq\u002Fcrosslink-site-detection","clip-seq\u002Fbinding-site-annotation","clip-seq\u002Fclip-motif-analysis","clip-seq\u002Fdifferential-clip","2026-09-20","workflows\u002Fclip-pipeline\u002FSKILL.md","CLIPper",[40,41,42,43,44],"preprocessing_retention","alignment_rate","library_complexity","frip","idr","GPTomics\u002FbioSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fbiology\u002Fbio-workflows-clip-pipeline","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":53,"prompt":63,"zipAvailable":25},[54,57,60],{"tool":55,"command":56},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-workflows-clip-pipeline",{"tool":58,"command":59},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-workflows-clip-pipeline",{"tool":61,"command":62},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-workflows-clip-pipeline","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-workflows-clip-pipeline\u002FSKILL.md",[65,71],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"examples\u002Fclip_full_pipeline.sh","SCRIPT","脚本",10554,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-workflows-clip-pipeline\u002Fexamples\u002Fclip_full_pipeline.sh",{"path":72,"resourceType":73,"resourceTypeDesc":74,"sizeBytes":75,"sourceHtmlUrl":76},"usage-guide.md","REFERENCE","参考文档",6410,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-workflows-clip-pipeline\u002Fusage-guide.md",[78,86,93,100,107,114],{"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":85},"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":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":85},"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":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":85},"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":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":85},"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":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":85},"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":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":85},"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",[],[]]