Bismark aligns bisulfite-converted short reads (WGBS, RRBS, PBAT) and enzymatic-conversion reads (EM-seq) to an in-silico C->T/G->A-converted reference, recovering methylation by comparing the original read to the original reference. The idea underneath everything: methylation is never sequenced directly - the run reads which cytosines survived deamination, against a 3-letter genome stripped of cytosines. Every call rests on two silent bets: that conversion completed in both directions, and that the read mapped despite throwing its cytosines away. This skill covers the genome index, the directional/non-directional/PBAT strand flag, deduplication, and conversion QC; it stops at a deduplicated, M-bias-aware BAM, handing extraction to methylation-calling.
conda install -c bioconda bismark bowtie2 hisat2 samtools trim-galore fastqc
bismark --version
bowtie2 --version
trim_galore --version
Conceptual prerequisites:
- The bisulfite index is built once per genome FASTA with a chosen backend (--bowtie2 or --hisat2); the backend must match between genome preparation and alignment.
- The library protocol determines the strand flag: directional WGBS/EM-seq/RRBS use the default, PBAT/scBS-seq need --pbat, non-directional libraries need --non_directional. Guessing wrong silently drops reads.
- Conversion QC needs spike-in controls in BOTH directions: unmethylated lambda for under-conversion, CpG-methylated pUC19 for over-conversion. A single control bounds only one error direction.
- EM-seq uses the identical aligners and flags as bisulfite; only the upstream chemistry and the (flatter, higher) coverage/efficiency expectations differ.
- Standard bisulfite and standard EM-seq report 5mC and 5hmC summed; separating them requires an oxBS/TAB pairing.
Tell your AI agent what you want to do: - "Prepare a bisulfite genome index for my hg38 reference" - "Align my paired-end WGBS reads and deduplicate them" - "Align my RRBS data without deduplication" - "Align my PBAT single-cell library" - "Check my bisulfite conversion efficiency with lambda and pUC19 spike-ins" - "My Bismark mapping rate is very low, help me diagnose it"
"Build a Bismark bisulfite index from my hg38.fa using HISAT2 so it uses less memory on this large genome."
"Trim adapters, align my paired-end EM-seq reads to the prepared genome, deduplicate, then sort and index the BAM."
"I have RRBS FASTQ files. Trim them with the MspI fill-in handling, align with Bismark, and do not deduplicate. Explain why dedup is skipped."
"Align my scBS-seq PBAT library to mm10 with the correct strand flag and aggressive 5' clipping."
"Align my lambda and pUC19 spike-ins separately and report the under-conversion and over-conversion rates."
"My Bismark mapping efficiency is near zero. Walk through the diagnosis in order before relaxing any alignment parameters."
"Help me figure out whether my library is directional, non-directional, or PBAT, and which flag to pass."
--rrbs, --non_directional, or PBAT 5' clipping as the protocol requires.--rrbs for RRBS and the PBAT 5' clip for random-priming bias.-N 1 is a last resort that increases mis-mapping.