DBAmmd-Accessors {MMDiff2} | R Documentation

## Extract data from DBAmmd objects

### Description

This help file describes different ways to access the slots and values contained in a `DBAmmd-class` objects.

### Usage

    ## S4 method for signature 'DBAmmd'
    Genome(x)

    ## S4 method for signature 'DBAmmd'
    Samples(x)

    ## S4 method for signature 'DBAmmd'
    numPeaks(x)

    ## S4 method for signature 'DBAmmd'
    numSamples(x)

    ## S4 method for signature 'DBAmmd'
    metaData(x)

    ## S4 method for signature 'DBAmmd'
    Regions(x)

    ## S4 method for signature 'DBAmmd'
    Reads(x, whichPos = "Center")

    ## S4 method for signature 'DBAmmd'
    Counts(x, whichCounts = "T")

    ## S4 method for signature 'DBAmmd'
    Hists(x, whichPos = "Center")

    ## S4 method for signature 'DBAmmd'
    Dists(x, dist.method = NULL)

    ## S4 method for signature 'DBAmmd'
    Contrast(x, whichContrast = 1)

    ## S4 method for signature 'DBAmmd'
    setRegions(x, Regions)

    ## S4 method for signature 'DBAmmd'
    setContrast(x, contrast)

### Arguments

`x` | a DBAmmd Object. An empty instance can be created using `DBAmmd()`. (See `DBAmmd-class` for more details.)
`whichPos` | specifies which relative positions of mapped fragments should to be considered. Can be one of: 'Left.p', 'Right.p', 'Right.p' and 'Left.n': Start and end positions of fragments mapping to positive or negative strand, respectively ('Right.p' and 'Left.n' are not available for single-end reads). Additionally inferred positions: 'Center.n','Center.p','Center','Left','Right'. (DEFAULT: 'Center')
`whichCounts` | can be 'T': total counts, or 'p','n': counts of reads mapping to positive, negative strand, respectively.
`dist.method` | specify method used for distances between samples. Currently only Maximum Mean Discrepancy (MMD) and Kolmogorov-Smirnov (KS) implemented. (DEFAULT: 'MMD')
`whichContrast` | index determining which of the set contrast should be used. (DEFAULT: 1)
`Regions` | GRanges Object specifying the Regions of Interesst / Peaks.
`contrast` | determines how to set a new contrast for differential analysis. A contrast can be automatically created either 'byCondition', or 'byTissue'. The Contrast can also be manually set (see vignette for details).

### Value

`Genome(x)` returns the name of the used genome version, if set in the metaData.

`Samples(x)` returns the information which was provided in the SampleSheet.csv to describe the data.

`numPeaks(x)` returns the number of Peaks / Regions of Interest that are associated with the DBAmmd object.

`numSamples(x)` returns the number of samples associated with the DBAmmd object.

`metaData(x)` returns the metaData associated with the DBAmmd object.

`Regions(x)` returns the Peaks / Regions of Interest that are associated with the DBAmmd object.

`Reads(x,whichPos)` returns the Reads mapping to the Regions of Interest.

`Counts(x,whichCounts)` returns a m x n matrix containing the Counts of Reads mapping to the Peaks / Regions of Interest. Depending on the value of 'whichCounts', total counts ('T'), or counts of reads mapping to positive ('p'), or negative strand ('n') are returnt. See `getPeakReads` for more details.

`Hists(x,whichPos)` returns a list of matrices of length m (number of Peaks). Each matrix 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(x,dist.method)` returns a matrix containing distances between pairs of samples for each peak. See `compDists` for more details.

`Contrast(x,whichContrast)` returns the specified contrast.

`setRegions(x,Regions)` returns a DBAmmd Object with set Peaks / Regions of Interests.

`setContrast(x,contrast)` returns a DBAmmd Object with a set contrast.

### See Also

`DBAmmd-class`

### Examples

    data("MMD")

    Samples(MMD)
    Genome(MMD)
    numPeaks(MMD)
    numSamples(MMD)
    metaData(MMD)
    R <- Regions(MMD)
    Pos <- Reads(MMD)
    C <- Counts(MMD)
    H <- Hists(MMD)
    D <- Dists(MMD)
    C1 <- Contrast(MMD)

[Package MMDiff2 version 1.20.0 Index]