Segmenter
Perform Chromatin Segmentation Analysis in R by Calling ChromHMM
Install / Use
/learn @MahShaaban/SegmenterREADME
segmenter
Perform Chromatin Segmentation Analysis in R by Calling ChromHMM
Description
Call chromHMM from within R, capture the output files in an S4 object and
interface to other relevant Bioconductor analysis tools. In addition segmenter
provides functions to test, select and visualize the output of the segmentation.
Installation
You can install the released version of segmenter from Bioconductor with:
BiocManager::install("segmenter")
or the development version from GitHub with:
remotes::install_github('MahShaaban/segmenter@devel')
Getting started
# load required libraries
library(segmenter)
# locate input and annotation files
inputdir <- system.file('extdata/SAMPLEDATA_HG18',
package = 'segmenter')
coordsdir <- system.file('extdata/COORDS',
package = 'chromhmmData')
anchorsdir <- system.file('extdata/ANCHORFILES',
package = 'chromhmmData')
chromsizefile <- system.file('extdata/CHROMSIZES',
'hg18.txt',
package = 'chromhmmData')
# run command
obj <- learn_model(inputdir = inputdir,
coordsdir = coordsdir,
anchorsdir = anchorsdir,
chromsizefile = chromsizefile,
numstates = 3,
assembly = 'hg18',
cells = c('K562', 'GM12878'),
annotation = 'RefSeq',
binsize = 200)
# show the object
show(obj)
# access object slots
emission(obj)
# operate on the object
get_frequency(segments = segment(obj))
