InputFrame-class {ddCt} | R Documentation

## Working with SDM files

### Description

The class InputFrame provides core functionalities to read gene and sample information from SDM files and calculate them with a ddCt algorithm.

The function `InputFrame` reads the data given in the colums 'Detector','Sample' and 'Ct' of the specified SDM output files and stores them as a data.frame. An additional column including the respective filename is added.

### Slots

`coreData`:

  Object of class `"data.frame"`: Holds all the required data extracted from the SDM file

`files`:

  Object of class `"character"` contains the source SDM files

### Methods

[,[[,\$

  `signature(x = "InputFrame")`: primitive accessors. Returns an object of `InputFrame-class` with the subset data.

names

  `signature(x = "InputFrame")`: returns the column names in this SDM object

ddCtExpression

  `signature(object = "InputFrame")`: runs a ddCt algorithm with this SDM object and returns a object of class `ddCtExpression`

fileNames

  `signature(object="InputFrame")`: returns the source SDM file names.

detectorNames

  `signature(object = "InputFrame")`: returns the detector names in this SDM object

detectorNames<-

  `signature(object = "InputFrame", value = "character")`: replaces the detector names in this SDM object

sampleNames

  `signature(object = "InputFrame")`: returns the sample names in this SDM object

sampleNames<-

  `signature(object = "InputFrame", value = "character")`: replaces the sample names in this SDM object

uniqueDetectorNames

  `signature(object = "InputFrame")`: returns a vector of unique detector names in this SDM object

uniqueDetectorNames<-

  `signature(object = "InputFrame", target = "missing", value = "character")`: replaces all detector names given by the 'names' attribute in 'value' with new detector names

uniqueDetectorNames<-

  `signature(object = "InputFrame", target = "character", value = "character")`: replaces all detector names given by 'target' with new detector names

uniqueSampleNames<-

  `signature(object = "InputFrame", target = "missing", value = "character")`: replaces all sample names given by the 'names' attribute in 'value' with new sample names

uniqueSampleNames<-

  `signature(object = "InputFrame", target = "character", value = "character")`: replaces all sample names given by 'target' with new sample names

uniqueSampleNames

  `signature(object = "InputFrame")`: returns a vector of unique sample names in this SDM object

removeSample

  `signature(object = "InputFrame", sample="character")`: removes the sample(s) specified from the InputFrame object

replaceDetector

  `signature(object = "InputFrame", target="character", value="character")`: replace the detectors equal to the target with the value. Both `target` and `value` can be vectors of the same length, then the replace takes place iteratively.

replaceSample

  `signature(object = "InputFrame", target="character", value="character")`: replace the samples equal to the target with the value. Both `target` and `value` can be vectors of the same length, then the replace takes place iteratively.

show

  `signature(object="InputFrame")`: pretty print of the InputFrame instance.

rightCensoring

  `signature(object="InputFrame", threshold="numeric")`: Right censoring the Ct value, which targets the data points above a certain value (`threshold`). High Ct values (higher than 40 or 45 by the rule of thumb) are often not accurate and may indicate too weak expression. The function performs the right censoring on the data and set the value above the threshold as `NA` (by default) or a given value. See the example.

coreData

  `signature(object="InputFrame")`: returns the data frame read from SDM file.

coreData<-

  `signature(object="InputFrame")`: replace the data frame read from SDM file.

Ct

  `signature(object="InputFrame")`: returns the Ct value of the SDM file.

Ct

  `signature(object="InputFrame", value="numeric")`: replace the Ct value in the object with the new values, and return the object.

### Author(s)

Rudolf Biczok mailto:r.biczok@dkfz.de, Jitao David Zhang mailto:jitao_david.zhang@roche.com

### See Also

`SDMFrame` function reads in data from SDM files. Data from SDM files is used to construct `ddCtExpression` objects to analyze differetial expression.

### Examples

    ## read a SDM file
    sampdat <- SDMFrame(system.file("extdata", "Experiment1.txt",
                                    package="ddCt"))
    ## you can also write
    ## sampdat <- new("SDMFrame",system.file("extdata", "Experiment1.txt",
    ##                                       package="ddCt"))

    ## use the getter methods
    sampleNames(sampdat)

    ## or the overloaded primitive accessors
    sampdat[1:3,"Sample"]

    ## see all unique samples
    uniqueSampleNames(sampdat)

    ## replace all sample names 'Sample1' and 'Sample2' in sampdat
    ## with 'NewSample1' and 'NewSample2'
    uniqueSampleNames(sampdat,c("Sample1","Sample2")) <- c("NewSample1","NewSample2")
    uniqueSampleNames(sampdat)

    ## or use this syntax to replace the gene names
    uniqueDetectorNames(sampdat) <- c(Gene1="NewGene1", Gene2="NewGene2")
    uniqueDetectorNames(sampdat)

    ## remove sample or detector
    removeSample(sampdat, "Sample1")
    removeDetector(sampdat, "Gene1")

    ## replace sample or detector
    replaceSample(sampdat, "Sample1", "Sample0")
    replaceDetector(sampdat, "Gene1", "PLCG1")

    ## right censoring the data
    rightCensoring(sampdat, 35)
    rightCensoring(sampdat, 35, 35)

[Package ddCt version 1.44.0 Index]