SDMFrame-class: Working with SDM files

Description Slots Methods Author(s) See Also Examples

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
## 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)

Example output

 [1] "Sample1" "Sample1" "Sample1" "Sample1" "Sample1" "Sample1" "Sample1"
 [8] "Sample1" "Sample1" "Sample2" "Sample2" "Sample2" "Sample2" "Sample2"
[15] "Sample2" "Sample2" "Sample2" "Sample2"
An instance of InputFrame:
==================================================================== 
  Sample
 Sample1
 Sample1
     ...
 Sample1
 Sample1
==================================================================== 
3 Sample-Detector pairs
File:/usr/lib/R/site-library/ddCt/extdata/Experiment1.txt[1] "Sample1" "Sample2"
[1] "NewSample1" "NewSample2"
[1] "Gene3"    "NewGene2" "NewGene1"
An instance of InputFrame:
==================================================================== 
     Sample Detector        Ct       Platename
 NewSample1    Gene3  35.52575 Experiment1.txt
 NewSample1    Gene3 35.083927 Experiment1.txt
        ...      ...       ...             ...
 NewSample2 NewGene1 34.597477 Experiment1.txt
 NewSample2 NewGene1 34.040577 Experiment1.txt
==================================================================== 
18 Sample-Detector pairs
File:/usr/lib/R/site-library/ddCt/extdata/Experiment1.txtAn instance of InputFrame:
==================================================================== 
     Sample Detector        Ct       Platename
 NewSample1    Gene3  35.52575 Experiment1.txt
 NewSample1    Gene3 35.083927 Experiment1.txt
        ...      ...       ...             ...
 NewSample2 NewGene1 34.597477 Experiment1.txt
 NewSample2 NewGene1 34.040577 Experiment1.txt
==================================================================== 
18 Sample-Detector pairs
File:/usr/lib/R/site-library/ddCt/extdata/Experiment1.txtAn instance of InputFrame:
==================================================================== 
     Sample Detector        Ct       Platename
 NewSample1    Gene3  35.52575 Experiment1.txt
 NewSample1    Gene3 35.083927 Experiment1.txt
        ...      ...       ...             ...
 NewSample2 NewGene1 34.597477 Experiment1.txt
 NewSample2 NewGene1 34.040577 Experiment1.txt
==================================================================== 
18 Sample-Detector pairs
File:/usr/lib/R/site-library/ddCt/extdata/Experiment1.txtWarning message:
In replaceVectorByEquality(sampleNames(object), target, value) :
  Following 'targets' are not found in the given vector: Sample1

An instance of InputFrame:
==================================================================== 
     Sample Detector        Ct       Platename
 NewSample1    Gene3  35.52575 Experiment1.txt
 NewSample1    Gene3 35.083927 Experiment1.txt
        ...      ...       ...             ...
 NewSample2 NewGene1 34.597477 Experiment1.txt
 NewSample2 NewGene1 34.040577 Experiment1.txt
==================================================================== 
18 Sample-Detector pairs
File:/usr/lib/R/site-library/ddCt/extdata/Experiment1.txtWarning message:
In replaceVectorByEquality(detectorNames(object), target, value) :
  Following 'targets' are not found in the given vector: Gene1

An instance of InputFrame:
==================================================================== 
     Sample Detector        Ct       Platename
 NewSample1    Gene3      <NA> Experiment1.txt
 NewSample1    Gene3      <NA> Experiment1.txt
        ...      ...       ...             ...
 NewSample2 NewGene1 34.597477 Experiment1.txt
 NewSample2 NewGene1 34.040577 Experiment1.txt
==================================================================== 
18 Sample-Detector pairs
File:/usr/lib/R/site-library/ddCt/extdata/Experiment1.txtAn instance of InputFrame:
==================================================================== 
     Sample Detector        Ct       Platename
 NewSample1    Gene3        35 Experiment1.txt
 NewSample1    Gene3        35 Experiment1.txt
        ...      ...       ...             ...
 NewSample2 NewGene1 34.597477 Experiment1.txt
 NewSample2 NewGene1 34.040577 Experiment1.txt
==================================================================== 
18 Sample-Detector pairs
File:/usr/lib/R/site-library/ddCt/extdata/Experiment1.txt

ddCt documentation built on Nov. 8, 2020, 4:57 p.m.