learn_model {segmenter} | R Documentation |
Integrate multiple ChIP-seq chromatin datasets of histone modifications, transcription factors or other DNA binding proteins to build a multi-state model of the combinatorial and spatial frequently occurring patterns. The function uses as an input binarized ChIP-seq data and the genome annotations on which the states will be discovered.
learn_model( inputdir, outputdir, numstates, coordsdir, anchorsdir, chromsizefile, assembly, cells, annotation, binsize, inputbamdir, cellmarkfiletable, read_only = FALSE, read_bins = FALSE, counts = FALSE )
inputdir |
A string. The path to binarized files. |
outputdir |
A string. The path to a directory where output will be written. |
numstates |
An integer. The number of desired states in the model. |
coordsdir |
A string. The path to genomic coordinates files. |
anchorsdir |
A string. The path to the genomic anchors files. |
chromsizefile |
A string. The path to the chromosomes sizes file. |
assembly |
A string. The name of the genomic assembely. |
cells |
A |
annotation |
A string. The name of the type of annotation as it occurs in the genomic annotation files. |
binsize |
An integer. The number in bp used to generate binarized files. |
inputbamdir |
A string. The path to the input bam files. Only used when
|
cellmarkfiletable |
A string. The path to the input files table. Only
used when |
read_only |
A logical. Default is |
read_bins |
A logical. Default is |
counts |
A logical. Default is |
By default, this functions runs the analysis commands, writes the
output to files and loads it into an object of class
segmentation
. In addition, the binarized data and the reads
counts in the bins can be loaded. When read_only
is TRUE
.
The functions looks for previously generated files in the output
directory and load them without rerunning the commands.
An object of class segmentation
(see for details)
and the files written to the output directory.
LearnModel
# locate input and output files inputdir <- system.file('extdata/SAMPLEDATA_HG18', package = 'segmenter') outputdir <- tempdir() 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, outputdir = outputdir, coordsdir = coordsdir, anchorsdir = anchorsdir, chromsizefile = chromsizefile, numstates = 3, assembly = 'hg18', cells = c('K562', 'GM12878'), annotation = 'RefSeq', binsize = 200) # show the output obj