Turn raw CLIP-seq FASTQ (eCLIP, iCLIP, iCLIP2, iCLIP3, irCLIP, PAR-CLIP, FLASH) into UMI-deduplicated, alignment-ready FASTQ. The defining constraint of CLIP preprocessing is preservation of the 5' read end where the reverse transcriptase truncated at the protein-RNA adduct: that base is one nucleotide downstream of the crosslink and is the foundation of all single-nucleotide-resolution analyses. Quality trimming and adapter trimming must operate on the 3' end only.
conda install -c bioconda umi_tools cutadapt fastp samtools bowtie2 preseq picard
pip install pysam
Tell your AI agent what you want to do: - "Preprocess my eCLIP data with 10 nt UMIs" - "Demultiplex multiplexed iCLIP2 with the NNNXXXXNN pattern" - "Run two-pass adapter trimming for read-through events" - "Dedupe by UMI using ENCODE convention" - "Estimate library complexity with preseq" - "Preprocess PAR-CLIP without losing T-to-C mutations"
"Extract 10-nt UMIs from R1 of my paired-end eCLIP library"
"My iCLIP2 has the NNNXXXXNN barcode pattern - demultiplex by the 4-base library barcode first, then extract the surrounding 5 nt as UMI"
"PAR-CLIP from the Tuschl lab - 4 nt random barcode; verify pattern by inspecting first 12 bases of reads"
"Run cutadapt with -q 6 -m 18 and only the 3' adapter (-a/-A), never 5' (-g/-G on R1)"
"Two-pass eCLIP trimming: pass 1 is standard 3' adapter, pass 2 strips the read-through 5' adapter from R2 only"
"Raise STAR mismatch ceiling to 0.07 for PAR-CLIP so T-to-C reads are not filtered as errors"
"After alignment, dedupe with
umi_tools dedup --method=uniqueper ENCODE convention""Estimate library complexity with preseq lc_extrap; flag if predicted unique < 1M at 100M reads"
"Fall back to picard MarkDuplicates if my older library has no UMIs"
"Compare retained read counts between fastp and cutadapt and pick the one matching ENCODE eCLIP"
"My library has 95% PCR duplication - is this normal CLIP, or did the IP fail?"
"Pre-map to rRNA before genome alignment to avoid STAR multi-mapper tangles"
umi_tools extract with the correct --bc-pattern (10 nt eCLIP R1; NNNXXXXNN iCLIP/iCLIP2; demultiplexed UMI for iCLIP3; 4 nt PAR-CLIP)-q 6 -m 18umi_tools dedup --method=unique--outFilterMismatchNoverLmax from 0.04 to 0.07.umi_tools dedup --method=unique is the ENCODE default. Directional clustering is more conservative but adds runtime.