DBAmmd-class {MMDiff2} | R Documentation

## Class DBAmmd

### Description

The `DBAmmd` Class defines a container for differential binding analysis using MMDiff2. For this class a number of methods is foreseen, among which accessors for every slot. As MetaData, it needs to contain the path to the data directory and the name of a sampleSheet csv file.

### Value

DBAmmd Object

### Constructor

`DBAmmd()`returns an empty DBAmmd Object.
`DBAmmd(MetaData)` initializes a DBAmmd Object for a new Experiment.
(See below and the package vignette for more details.)

### Slots

`MetaData`:

  List containing an `ExpData` and an `AnaData` compartment. "ExpData" needs a `dataDir` and a `SampleSheet` entry. A `genome` entry, which should be a valid `BSGenome` name, is useful to find sequence motifs. (Note the genome version needs to correspond to the one used for the read alignment. Use `available.genomes()` to find the right name.) The `AnaData` entry is used to store and access parameters for the MMDiff2 Analysis, like the sigma of the RBF Kernel.

`rowRanges`:

  GRanges object containing Regions of Interests (Peaks)

`Reads`:

  List containing positions of mapped reads, i.e. exact start and end positions of mapped fragments. In the case of single-end reads, the left most postions of fragments mapping to the positive strands and the right most positions of fragments mapping to the negative strands are stored in "Left.p" and "Right.n". Use `getPeakReads` to fill this slot and `estimateFragmentCenters` to add the (estimated) positions of fragment centers.

`RawTotalCounts`:

  m x n matrix containing total counts of reads mapping to m peaks in n samples (including input samples)

`RawCounts.p`:

  m x n matrix containing counts of reads mapping to positive (forward) strand

`RawCounts.n`:

  m x n matrix containing counts of reads mapping to negative (reverse) strand

`Hists`:

  List of lists, each of length m (number of Peaks). Compartments could be 'Left.p','Right.n','Left.n','Right.p','Center.n', 'Center.p','Center','Left','Right', defining whether left or right ends or centers of fragments should be considered for positive ('p') or negative ('n') strand, or both strands combined. For a given compartment there is one entry per peak, which is a n x L_i matrix, where n is the number of samples and L_i is the number of bins used to cover the extend of the peak. Note, L_i varies between peaks of different lengths. See `compHists()` for more details.

`DISTs`:

  List with compartments for different methods to compute distances (e.g. MMD). Each compartment contains a m x N matrix with computed distances for each Peak between N pairs of samples. See `compDists()` for more details.

`mCounts`:

  (for internal use only)

`Contrasts`:

  List of lists. Each entry contains a contrast i.e. the definition of two groups that should be compared to each other in a differential analysis. A Contrast needs entries "name1", "name2" for group names, as well as group memberships given in "group1" and "group2". Results of a differential test for this contrast are stored in an entry given by the method name, e.g. "MMD.locfit"

### Author(s)

Gabriele Schweikert

### See Also

`DBAmmd-Accessors`,`getPeakReads`

### Examples

    ## Example using a small data set provided in the MMDiffBamSubset package

    # setting the Experiment meta data:
    ExpData <- list(dataDir=system.file("extdata", package="MMDiffBamSubset"),
               sampleSheet="Cfp1.csv")

    MetaData <- list('ExpData' = ExpData)

    # Creating a DBAmmd data set:
    MMD <- DBAmmd(MetaData)

[Package MMDiff2 version 1.22.0 Index]