Last active
August 29, 2015 14:23
-
-
Save al2na/8433238fc4ca61ace5a3 to your computer and use it in GitHub Desktop.
methseg usage and installation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
download.file("https://dl.dropboxusercontent.com/u/1373164/H1.chr21.chr22.rds",destfile="H1.chr21.chr22.rds",method="curl") | |
mbw=readRDS("H1.chr21.chr22.rds") | |
# it finds the optimal number of componets as 6 | |
res=methSeg(mbw,diagnostic.plot=TRUE,maxInt=100,minSeg=10) | |
# however the BIC stabilizes after 4, we can also try 4 componets | |
res=methSeg(mbw,diagnostic.plot=TRUE,maxInt=100,minSeg=10,G=1:4) | |
# get segments to BED file | |
methSeg2bed(res,filename="H1.chr21.chr22.trial.seg.bed") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install.packages( c("data.table","devtools")) | |
source("http://bioconductor.org/biocLite.R") | |
biocLite(c("fastseg","rtracklayer")) | |
# install the package from github | |
library(devtools) | |
install_github("al2na/methylKit",ref="methSeg",build_vignettes=FALSE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment