BayMethList-class: Class '"BayMethList"'

BayMethListR Documentation

Class "BayMethList"

Description

This S4 class captures the genomic windows together with the number of read counts obtained by affinity-enrichment sequencing experiments for a fully methylated control and one or more samples of interest. Furthermore CpG-density is stored.

Constructor

Creates a BayMethList object:

BayMethList(windows, control, sampleInterest, cpgDens, f=matrix(), priorTab=list(), methEst=list(), maskEmpBayes=logical())

windows

A GRanges object.

control

A matrix of read counts obtained by an affinity enrichment sequencing experiment for the fully methylated (SssI) treated sample. The number of rows must be equal to length(windows). Each column contains the counts of one sample. The number of columns must be either one or equal to the number of columns of sampleInterest.

sampleInterest

A matrix of read counts obtained by an affinity enrichment sequencing experiment for the samples of interest. The number of rows must be equal to length(windows). Each column contains the counts of one sample.

cpgDens

A numeric vector containing the CpG density for windows. The length must be equal to length(windows)

fOffset

A matrix where each column contains the normalizing offsets for one sample. The number of rows must be either equal to one or the number of windows.

priorTab

A list containing for each sample of interest the prior parameters as determined by empBayes.

methEst

A list containing the methylation estimates as determined by methylEst.

maskEmpBayes

A logical vector indicating which bins should be masked out in the empirical Bayes analysis. TRUE indicates to neglect the bin in the empirical Bayes approach.

Methods

x[i]

signature(x = "BayMethList"): Creates a BayMethList object, keeping only the i entries.

length

signature(x= "BayMethList"): gets the number of genomic regions included.

control<-

signature(x = "BayMethList"): replace the control slot

control

signature(object = "BayMethList"): extract the control matrix slot.

cpgDens<-

signature(x = "BayMethList"): replace the cpgDens slot

cpgDens

signature(object = "BayMethList"): extract the cpgDens slot.

sampleInterest<-

signature(x = "BayMethList"): replace the sampleInterest slot

sampleInterest

signature(object = "BayMethList"): extract the sampleInterest matrix slot.

show

signature(object = "BayMethList"): show an overview of the object

windows<-

signature(x = "BayMethList"): replace the windows slot

windows

signature(object = "BayMethList"): extract the windows GRanges slot.

fOffset<-

signature(x = "BayMethList"): replace the fOffset slot

fOffset

signature(object = "BayMethList"): extract the fOffset slot.

priorTab<-

signature(x = "BayMethList"): replace the priorTab slot

priorTab

signature(object = "BayMethList"): extract the priorTab slot.

methEst<-

signature(x = "BayMethList"): replace the methEst slot

methEst

signature(object = "BayMethList"): extract the methEst slot.

maskEmpBayes<-

signature(x = "BayMethList"): replace the maskEmpBayes slot

maskEmpBayes

signature(object = "BayMethList"): extract the maskEmpBayes slot.

ncontrol

signature(object = "BayMethList"): get the number of provided SssI samples.

nsampleInterest

signature(object = "BayMethList"): get the number of provided samples of Interest.

Author(s)

Andrea Riebler and Mark Robinson

See Also

determineOffset, empBayes, methylEst

Examples

    if(require(BSgenome.Hsapiens.UCSC.hg18)){
        windows <- genomeBlocks(Hsapiens, chrs="chr21", width=100, spacing=100)
        cpgdens <- cpgDensityCalc(windows, organism=Hsapiens,  
            w.function="linear", window=700)  
        co <- matrix(rnbinom(length(windows), mu=10, size=2), ncol=1)
        sI <- matrix(rnbinom(2*length(windows), mu=5, size=2), ncol=2)
        bm <- BayMethList(windows=windows, control=co, sampleInterest=sI,
            cpgDens=cpgdens)

        cat("Number of genomic regions", length(bm), "\n")
        cat("Number of fully methylated control samples:", ncontrol(bm), "\n")
        cat("Number of samples of interest:", nsampleInterest(bm), "\n")
        bm[2:20]
    }

markrobinsonuzh/Repitools documentation built on March 20, 2024, 6:04 a.m.