Install the software you need
Try to do this before the course starts, so supervision time can be spent on the analysis.
You need two kinds of software: command-line tools (alignment, peak calling, coverage tracks) and R with Bioconductor (downstream analysis).
1. Command-line tools with conda
Install Miniforge (it provides conda and mamba with the conda-forge channel preconfigured). Then create the course environment:
mamba create -n epigenetics -c conda-forge -c bioconda \
"samtools>=1.16" htslib bcftools bedtools bowtie2 bwa macs3 deeptools fastp multiqc \
ucsc-bedgraphtobigwig idr epic2 seacr chromhmm bismark openjdk ont-modkit whatshap
mamba activate epigeneticsWhat each is for: samtools, bowtie2, fastp, deeptools (alignment and coverage, From reads to coverage); macs3, idr, epic2 (Peak calling); seacr (CUT&RUN and CUT&Tag); chromhmm and openjdk (Combining marks into chromatin states); bismark (Bisulfite and enzymatic sequencing); bcftools (Epigenomics and genetic variation); ont-modkit and whatshap (Methylation and chromatin from long reads).
The Hi-C units use Python tools that need their own environment (the versions are pinned because newer cooler does not work with this cooltools):
mamba create -n hic -c conda-forge -c bioconda python=3.11 cooler=0.10 cooltools=0.7 \
pairtools=1.1 bwa samtools bedtools pybigwig pyfaidx bioframe matplotlib hic-straw2. A genome browser
Install IGV (desktop), or use igv.js in the browser.
3. R and Bioconductor
Install a recent R (4.4 or newer) and RStudio Desktop.
install.packages(c("tidyverse", "BiocManager", "torch", "patchwork", "ggrepel", "pheatmap",
"data.table", "glmnet", "pROC", "ggseqlogo", "jsonlite", "nnls"))
torch::install_torch() # downloads the libtorch backend once (CPU version);
# if it fails on a machine with a GPU driver, run Sys.setenv(CUDA = "cpu") first
BiocManager::install(c(
"GenomicRanges", # genomic intervals
"rtracklayer", # read/write BED, narrowPeak, GTF, bigWig
"Biostrings", # DNA sequences, CpG counts (What is epigenetics?)
"Rsamtools", # indexed FASTA and BAM access
"GenomicAlignments", # reads from BAM files
"DESeq2", "edgeR", "apeglm", # differential accessibility
"JASPAR2024", "TFBSTools", "motifmatchr", "universalmotif", "RSQLite", # motifs
"chromVAR", # motif accessibility per sample
"ChIPseeker", "txdbmaker", # peak annotation (Annotation and differential binding)
"DSS", # differential methylation (brings bsseq)
"limma", "minfi", "IlluminaHumanMethylation450kmanifest",
"IlluminaHumanMethylation450kanno.ilmn12.hg19", "FlowSorted.Blood.450k" # methylation arrays
))4. Check it works
mamba activate epigenetics
samtools --version | head -1
macs3 --versionlibrary(GenomicRanges)
gr <- GRanges("chr1", IRanges(c(100, 150), width = 100))
reduce(gr) # should print one merged interval, chr1:100-249If both print without error, you are ready for the course!
If preprocessFunnorm (methylation arrays) stops with a pthread error, reinstall one package without threading: BiocManager::install("preprocessCore", configure.args = "--disable-threading", force = TRUE).