loadHmmsFromFiles {chromstaR} | R Documentation |
Wrapper to load chromstaR objects from file and check the class of the loaded objects.
loadHmmsFromFiles( files, check.class = c("GRanges", "uniHMM", "multiHMM", "combinedMultiHMM") )
files |
A list of |
check.class |
Any combination of |
A list of chromstaR-object
.
## Get an example BAM file file <- system.file("extdata", "euratrans", "lv-H3K27me3-BN-male-bio2-tech1.bam", package="chromstaRData") ## Bin the file into bin size 1000bp data(rn4_chrominfo) binned <- binReads(file, assembly=rn4_chrominfo, binsizes=1000, stepsizes=500, chromosomes='chr12') ## Fit the univariate Hidden Markov Model hmm <- callPeaksUnivariate(binned, max.time=60, eps=1) temp.file <- tempfile() save(hmm, file=temp.file) loaded.hmm <- loadHmmsFromFiles(temp.file)[[1]] class(loaded.hmm)