---
author: Sam White
toc-title: Contents
toc-depth: 5
toc-location: left
date: 2018-09-04 20:49:56+00:00
layout: post
slug: dna-methylation-analysis-olympia-oyster-bsseq-methylkit-analysis
title: DNA Methylation Analysis - Olympia oyster BSseq MethylKit Analysis
categories:
  - 2018
  - Miscellaneous
tags:
  - bismark
  - BSseq
  - methylation
  - methylkit
  - olympia oyster
  - Ostrea lurida
---

##### NOTE: IMPORTANT CAVEATS - READ POST BEFORE USING DATA.





##### I'm posting this for posterity and to provide an overview of what (and whatnot) to do. Plus, this has a good R script for using MethylKit that can be used for subsequent analyses.



The goal of this analysis was to compare the methylation profiles of Olympia oysters originating from a common population (Fidalgo Bay) that were raised in two different locations (Fidalgo Bay & Oyster Bay).

An overview of the experiment can be viewed here:





  * [GitHub Wiki: Whole-genome-BSseq-December-2015](https://github.com/RobertsLab/project-olympia.oyster-genomic/wiki/Whole-genome-BSseq-December-2015)



I [previously ran all of Olympia oyster DNA methylation sequencing data through the Bismark pipeline](https://robertslab.github.io/sams-notebook/posts/2018/2018-08-16-dna-methylation-analysis-bismark-pipeline-on-all-olympia-oyster-bsseq-datasets/), and then processed them using the MethylKit R library.

First mistake (Bismark):





  * Trimmed FastQ files "incorrectly".



[Bismark provides an excellent user guide and provides a handy table on how to decide on trimming parameters](https://github.com/FelixKrueger/Bismark/tree/master/Docs), but I mistakenly trimmed these according to the recommendations for a different library preparation technique. I trimmed based on the Zymo Pico-Methyl Kit (which _was_ used for the other group of data that I processed simultaneously), instead of the TruSeq library prep.

So, "incorrectly" isn't necessarily the proper term here. The analysis can still be used, however, it's likely that the excessive trimming results in reducing sequencing coverage, and, in turn, making the downstream analysis result in a highly conservative output. Thus, the data isn't wrong or bad, it is just very limited.

And, this leads to the second mistake (Bismark):





  * Bowtie alignment score too strict



There's a bit of a weird "battle" between Bismark and bowtie2. Bismark uses bowtie2 for generating alignments, but bowtie2's default cutoff score overrides Bismark's. So, to adjust the score value, you have to explicitly add the scoring parameters to your Bismark parameters during the alignment step. I did not do this.

Again, it's not wrong, per se, but leads to a significantly limited set of data in the final analysis.

The data were analyzed based on a minimum of:



  * 3x coverage



  * 25% difference in methylation






* * *





# RESULTS:





Methylkit analysis (R project; GitHub):





  * [20180827_oly_methylkit](https://github.com/RobertsLab/code/tree/master/r_projects/sam/20180827_oly_methylkit)



BedGraph file (BED):



  * [OlyFbOb_3xCov_25percentDiff.bed](https://github.com/RobertsLab/code/raw/master/r_projects/sam/20180827_oly_methylkit/analyses/OlyFbOb_3xCov_25percentDiff.bed)



The analysis resulted in a total of seven (yes, 7) differentially methylated loci (DML) between the two groups. It was this result that made Steven and me revisit the initial Bismark analysis. He has done this previously (but differently) and gotten significantly greater numbers of DML.

Knowing all of this, I will re-trim the data and adjust Bismark alignment score thresholds and then re-analyze with MethylKit.

Regardless here're some plots to add some visual flair to this notebook entry (these, and more, are available in the GitHub repo):



##### CLUSTERING DENDROGRAM



![](https://raw.githubusercontent.com/RobertsLab/code/master/r_projects/sam/20180827_oly_methylkit/analyses/clustering_dendrogram.png)



* * *





##### PCA PLOT



![](https://raw.githubusercontent.com/RobertsLab/code/master/r_projects/sam/20180827_oly_methylkit/analyses/pca.png)
