TITLE: Bioinformatics manual for population epigenomics combining whole-genome and target genome sequencing
AUTHORS: Odile Rogier, Isabelle Lesur Kupin, Mamadou Dia Sow, Christophe Boury, Alexandre Duplan, Abel Garnier, Abdeljalil Senhaji rachik, Peter Civan, Josquin Daron, Alain Delaunay, Ludovic Duvaux, Vanina Benoit, Erwan Guichoux, Gregoire Le Provost, Edmond Sanou, Christophe Ambroise, Christophe Plomion, Jérôme Salse, Vincent Segura, Jorg Tost, Stéphane Maury

[DESCRIPTION]
We developed a strategy and a workflow for quantifying epigenetic diversity in natural populations combining whole genome and targeted capture sequencing for DNA methylation.
We first identified regions of highly variable DNA methylation in a representative subset of genotypes representative of the biological diversity in the population by WGBS. We then analysed the variations of DNA methylation in these targeted regions at the population level by Sequencing Capture Bisulphite (SeqCapBis).

[STEPS]
SECTION: Whole Genome Sequencing - Removing false C/T mutations
2. Trimming
 
Publication: Bolger et al., 2014
Version: 0.38
Github: https://github.com/usadellab/Trimmomatic
 

 

SECTION: Whole Genome Sequencing - Removing false C/T mutations
1. A preliminary Whole Genome Sequencing (WGS) step was considered for filtering purposes, to prevent C/T Single Nucleotide Polymorphisms (SNP) being interpreted as bisulfite conversions of unmethylated sites (i.e. false-positive calls). However, this C/T SNPs identification step is not required to study epigenetics levels along genomes. 
 


SECTION: Whole Genome Sequencing - Removing false C/T mutations
4. Variant calling

SECTION: Whole Genome Sequencing - Removing false C/T mutations
3. Mapping
 
Publication:  Li H, 2013
Version: 0.7.17
 
Poplar genome: Populus trichocarpa v3.1
Publication: Tuskan GA et al., 2006. 
 

 

SECTION: Whole Genome Sequencing - Removing false C/T mutations
4.3. Variant Caller 1: GATK (Genome Analysis ToolKit)
 
Publication: McKenna et al., 2010
Version: 4.0.11.1
Github: https://github.com/broadinstitute/gatk
Poplar genome: Populus trichocarpa v3.1 
 

 

SECTION: Whole Genome Sequencing - Removing false C/T mutations
4.7. Variant Caller 3: FreeBayes
 
Publication: Garrison and Marth, 2012
Version: 1.2.0-2
Github: https://github.com/freebayes/freebayes
 
Poplar genome: Populus trichocarpa v3.1
Oak genome: Q. robur haplome V2.3
 

SECTION: Whole Genome Sequencing - Removing false C/T mutations
4.5. Variant Caller 2: samtools / bcftools
 
Publication: Danecek et al., 2021
Version: 1.8
Github: https://github.com/samtools/samtools
Poplar genome: Populus trichocarpa v3.1 
 

 
Publication: Li H, 2011
Version: 1.8
Github: https://github.com/samtools/bcftools
 

 

SECTION: Whole Genome Sequencing - Removing false C/T mutations
4.9. SNP identification
Only SNPs identified by at least 2 callers were selected to obtain the final set of SNPs.
 
Publication: Danecek P, et al. 2021
Version: 1.8
Github: https://github.com/samtools/bcftools
 
Parameters: tabix-0.2.5, samtools-1.8, bcftools-1.8
 

SECTION: Whole Genome Sequencing - Removing false C/T mutations
5. Selection of C/T SNP
SMPs colocalizing with a C/T SNP (see the WGS and SNP detection section of the manuscript) will be removed at step #7 "SMPs filtering".

SECTION: Whole Genome Bisulfite Sequencing - Detecting mC whole genome and Identifying outlier DMCs
6. Galaxy pipeline
SMPs were identified with the GALAXY (The Galaxy Community, 2022) pipeline (Dugé de Bernonville et al., 2022; Sow et al., 2023).
 

 
Following Sow et al., 2023:
 

SECTION: Whole Genome Bisulfite Sequencing - Detecting mC whole genome and Identifying outlier DMCs
6.2. Mapping
 
Publication:  Xi Y and Li W, 2009 
Version: v1.0.0
Github: https://github.com/genome-vendor/bsmap/
Parameters: default options
 
Poplar genome: Populus trichocarpa v3.1

Mapping adjustments for Q. petraea
Oak genome: Quercus robur Haplome V2.3
SECTION: Whole Genome Bisulfite Sequencing - Detecting mC whole genome and Identifying outlier DMCs
7. SMP filtering
Each methylation context (CpG, CHG, CHH) was considered separately.
 
Publication: Akalin et al., 2012
Version: Methylkit R package v0.99.2
Github: https://github.com/al2na/methylKit/releases
Site: https://bioconductor.org/packages/release/bioc/html/methylKit.html
Parameters: R (v3.5.1), library(methylKit)
 
     Step1: Forward and reverse strands were merged for the CG context only and 30% missing data were tolerated for each context.
 
     Step2: Positions corresponding to C/T SNPs were removed.
 
     Step3: A minimum coverage of 7X per sample was considered.
 

SECTION: SeqCapBis - Detecting mC Target regions
9. Agilent Probes design and sequencing
A set of 120 bp probes was selected to capture 18 Mb of each genome (Agilent, https://earray.chem.agilent.com/suredesign/). The targeted regions corresponded to the regions identified as differentially methylated between populations. Custom targeted genome bisulfite sequencing was performed with SureSelect XT Methyl-Seq Target Enrichment (Agilent, Santa Clara, CA, USA) according to the manufacturer’s recommendations.
For poplar, in total, 17.84 Mb of sequence corresponding to the 25,434 DMRs was covered by 339,658 probes. Regarding oak, a set of 140,249 probes (120 bp) was designed by Agilent to cover  16.15 Mb DMRs.
SECTION: Whole Genome Bisulfite Sequencing - Detecting mC whole genome and Identifying outlier DMCs
6.1. Trimming
 
Publication: Krueger F et al., 2023. FelixKrueger/TrimGalore: v0.4.3.1
Version: v0.4.3.1
Github: https://github.com/FelixKrueger/TrimGalore
Parameters: --paired read1.fastq read2.fastq --clip_R1 10 --clip_R2 30
 

SECTION: Whole Genome Bisulfite Sequencing - Detecting mC whole genome and Identifying outlier DMCs
8. Identification of target regions for the SeqCapBis design
We first grouped SMPs into 1kb sliding windows of 250bp for each methylation context. Following the calculation of the methylation levels in each window, the outlier DMRs were identified using two strategies (see 8.2 and 8.3) with homemade scripts (given as examples). Finally, target sequences correspond to outlier DMRs identified by the two strategies.
SECTION: SeqCapBis - Detecting mC Target regions
10. Trimming
 
Publication: Krueger F et al., 2023. FelixKrueger/TrimGalore: v0.6.5
Version: 0.6.5
Github: https://github.com/FelixKrueger/TrimGalore
 

 

SECTION: SeqCapBis - Detecting mC Target regions
12. Mapping
 
Publications: 
Xi Y, Li W, 2009
 
Zynda G. 2018. BSMAPz. https://github.com/zyndagj/BSMAPz
Version: 1.1.3
Github: https://github.com/zyndagj/BSMAPz
Poplar genome: Populus trichocarpa v4.1
 
Mapping adjustments for Q. petraea
Oak genome: Quercus robur Haplome V2.3
SECTION: SeqCapBis - Detecting mC Target regions
16. Methylation quantification
 
Publication: Akalin A et al, 2012. 
Version: 1.18.0
Parameters: MethylKit package 
Github: https://github.com/al2na/methylKit/releases
Site: https://bioconductor.org/packages/release/bioc/html/methylKit.html
 
Functions: getMethylationStats(), getCoverageStats()
 

SECTION: Whole Genome Sequencing - Removing false C/T mutations
3.2. Mapping conversion, sorting & statistics
 
Publication: Danecek et al., 2021 
Version: 1.8
Github: https://github.com/samtools/samtools
 

 

SECTION: Whole Genome Sequencing - Removing false C/T mutations
4.2. Duplicates removing
 
Publication: “Picard Toolkit.” 2019. Broad Institute, GitHub Repository. https://broadinstitute.github.io/picard/; Broad Institute
Version: 2.18.2
Github: https://github.com/broadinstitute/picard
 

SECTION: Whole Genome Sequencing - Removing false C/T mutations
3.1. Mapping adjustments for Q. petraea

Oak genome: Quercus robur Haplome V2.3
Publication: Plomion C et al., 2018
 

SECTION: Whole Genome Sequencing - Removing false C/T mutations
4.4. GATK adjustments for Q. petraea

Version: GATK 3.8
Download: https://console.cloud.google.com/storage/browser/_details/gatk-software/package-archive/gatk/GenomeAnalysisTK-3.8-0-ge9d806836.tar.bz2;tab=live_object
Oak reference genome: Quercus robur Haplome V2.3
Parameters: java 1.8.0_72 ; HaplotypeCaller; GenotypeGVCFs
 

SECTION: Whole Genome Sequencing - Removing false C/T mutations
4.6. bcftools adjustments for Q. petraea

Oak genome: Q. robur haplome V2.3
bcftools version: 1.6
Download: https://sourceforge.net/projects/samtools/files/samtools/1.6/
SECTION: Whole Genome Sequencing - Removing false C/T mutations
4.1.  Adjustment for Q. petraea : Digital normalization

Computational limitations associated with GATK and FreeBayes due to the very deep sequencing in oak (100X on average) necessitated a reduction of the complexity of each dataset. To reduce redundancy within the WGS dataset, we randomly downsampled sequencing reads over genome regions that are over-covered.
 
Publication: Crusoe et al., 2015
Version: 2.1.2
Github: https://github.com/dib-lab/khmer
 
Step1: Interleave reads
Parameters: Python-3.6.3
 
Step2: Digital normalization
Parameters: Python-3.6.3; -k 20 --> kmer size = 20bp; -C 30 --> maximal coverage; -N 4  -x 4e9 --> 16Gb
 
Step3: Paired reads extraction
Parameters: Python-3.6.3
 

SECTION: Whole Genome Sequencing - Removing false C/T mutations
4.8. SNP filtering

For poplar, we considered only biallelic intra-nigra SNPs with quality threshold ≥ 30. 
 
Publication: Danecek et al., 2011
Version: 0.1.15
Github: https://vcftools.github.io/man_latest.html
 

 
For oak, we considered bi-allelic SNPs, depth >= 20, maf >= 30% and <= 70%
SECTION: Whole Genome Bisulfite Sequencing - Detecting mC whole genome and Identifying outlier DMCs
6.3. Methylation calling (SMP)
 
Publication:  Xi Y and Li W, 2009  
Version: v1.0.0
Github: https://github.com/genome-vendor/bsmap/
 
Poplar genome: Populus trichocarpa v3.1 
 
Mapping adjustments for Q. petraea
Oak genome: Quercus robur Haplome V2.3
SECTION: Transposon insertion polymorphisms (TIPs)
18. Detection of TIPs on whole genome sequencing (WGS) data with TEFLoN
SECTION: Transposon insertion polymorphisms (TIPs)
17. Trimming
Eliminate unwanted or irrelevant parts of the read. Data trimming may include removing low quality bases or adapters used during sequencing.
 

 

 

SECTION: Transposon insertion polymorphisms (TIPs)
18.1. Mapping 
Alignment of DNA sequences to a reference genome.
 

 

 

SECTION: Transposon insertion polymorphisms (TIPs)
18.2. Extracting unmapped reads
Search for TIPs from reads not aligning with the reference genome. It is interesting to choose non-mapped sequences, because we hypothesize that the insertion of a transposable element is one of the reasons which prevented the alignment of certain reads to their reference genome.
 

 

 

 

 

 

SECTION: Transposon insertion polymorphisms (TIPs)
18.3. TIPs detection
Search for TIPs from reads not aligning with the reference genome. It is interesting to choose non-mapped sequences, because we hypothesize that the insertion of a transposable element is one of the reasons which prevented the alignment of certain reads to their reference genome.
 

 

 

 

19. Detection of TIPs on whole genome bisulfite sequencing (WGBS) data with epiTEome
19.1. Mapping and extracting unmapped reads
Alignment of DNA sequences to a reference genome. Search for TIPs from reads not aligning with the reference genome. We choose non-mapped sequences, because we hypothesize that the insertion of a transposable element is one of the reasons which prevented the alignment of certain reads to their reference genome.
 

 

 

19.2. TIPs detection
Search for TIPs from reads not aligning with the reference genome. It is interesting to choose non-mapped sequences, because we hypothesize that the insertion of a transposable element is one of the reasons which prevented the alignment of certain reads to their reference genome.
 

 

 

SECTION: SeqCapBis - Detecting mC Target regions
13. Detection of methylated cytosines (mC)
 
Publications: 
Xi Y and Li W, 2009. 
 
Zynda G. 2018. BSMAPz. https://github.com/zyndagj/BSMAPz
Version: 1.1.3
Github: https://github.com/zyndagj/BSMAPz
Poplar genome: Populus trichocarpa v4.1 
Parameters: methratio.py, python 2.7, samtools 1.11, pysam 0.16.0.1
 
Mapping adjustments for Q. petraea
Oak genome: Quercus robur Haplome V2.3
SECTION: Whole Genome Bisulfite Sequencing - Detecting mC whole genome and Identifying outlier DMCs
8.1. Grouping SMPs in windows and DMRs identification
 
Publication: Akalin et al., 2012
Version: 1.18.0
Github: https://github.com/al2na/methylKit/releases
Site: https://bioconductor.org/packages/release/bioc/html/methylKit.html
Parameters: MethylKit package
 
Input files: pre-filtered SMPs in each context.
 
 
SECTION: Whole Genome Bisulfite Sequencing - Detecting mC whole genome and Identifying outlier DMCs
8.2. Strategy I: STANDARD DEVIATION OF THE MEANS
Calculate average C-methylation by averaging the methylation level across all (pre-filtered) cytosines in each window for each individual. Then calculate standard deviation of this average across individuals.
 

SECTION: Whole Genome Bisulfite Sequencing - Detecting mC whole genome and Identifying outlier DMCs
8.4. Outlier threshold
The threshold for DMRs is defined as (Q3+1.5*(Q3-Q1)) where Q1 and Q3 are the first and third quartiles (i.e. the threshold is not defined by a percentile, but instead depends on the length of the boxplot box)

     * Strategy I
Parameters: Python 3.7
 
     * Strategy II
Parameters: Python 3.7
 

SECTION: Whole Genome Bisulfite Sequencing - Detecting mC whole genome and Identifying outlier DMCs
8.3. Strategy II: MEAN OF THE STANDARD DEVIATIONS
For each (pre-filtered) cytosine, calculate the standard deviation of methylation across individuals. Then calculate the mean standard deviation from all cytosines in a window.
 

SECTION: Whole Genome Bisulfite Sequencing - Detecting mC whole genome and Identifying outlier DMCs
8.5. Identification of capture targets
Target sequences correspond to outlier DMRs identified by the two strategies. This is a two-steps strategy where the 3 contexts are first merged and, then, sequence redundancy between the three methylation contexts is removed.
 
Publication: Quinlan AR and Hall IM, 2010
Version: 2.27.1
Github: https://github.com/arq5x/bedtools2
Parameters: intersect, merge
 

SECTION: SeqCapBis - Detecting mC Target regions
11. Quality control
 
Publication: Andrews, S. (2010). FastQC:  A Quality Control Tool for High Throughput Sequence Data [Online]. Available online at: http://www.bioinformatics.babraham.ac.uk/projects/fastqc/
Version: 0.11.9
Github: https://github.com/s-andrews/FastQC
 

SECTION: SeqCapBis - Detecting mC Target regions
14. 10X sequencing filtering
 
Publication: Akalin A et al, 2012. 
Version: 1.18.0
Parameters: MethylKit package
Github: https://github.com/al2na/methylKit/releases
Site: https://bioconductor.org/packages/release/bioc/html/methylKit.html
 

 

SECTION: SeqCapBis - Detecting mC Target regions
15. Splitting context
We set up a homemade bash script (splitting.sh) to obtain methylation files for each sample in the three contexts (CG, CHG and CHH).
 

SECTION: SeqCapBis - Detecting mC Target regions
12.1. Duplicate Removing
 
Publication: Danecek et al., 2021
Version: 1.11
Github: https://github.com/samtools/samtools
Parameters: stat, fixmate, sort, markdup
Poplar genome: Populus trichocarpa v4.1
 

 
Mapping adjustments for Q. petraea
Oak genome: Quercus robur Haplome V2.3