Last data update: 2014.03.03
R: PARSE RTCA OUTPUT FILE
PARSE RTCA OUTPUT FILE
Description
The function parses RTCA output file into RTCA
object
Usage
parseRTCA(file, dec = ".", phenoData, maskWell, ...)
Arguments
file
character, name of the RTCA output file
dec
decimal sign of the file
phenoData
phenoData
maskWell
character, either names or regular expression
pattern(s) for well(s) to mask
...
other parameters passed to read.table
Details
A csv-like format file can be exported from the RTCA device, which can
be fed into this function to set up an instance of
RTCA
object.
In the /extdata/ directory of the package, such a file is
provided as an example. The first line contains the experiment ID,
which is followed by a matrix of recorded data in the tabular
form. The first and second column records the time-interval in the
unit of hour and hour-minute-second format respectively. The rest
columns then record the read-out (‘Cell-Index’, or ‘CI’)
of the device, with each well a role.
phenoData
allows user to annotate the wells.Its usage mimicks
the ExpressionSet
object in the Biobase
package.
maskWell
allows to mask wells in case, for example, they are known to be
contaminated. The values can be either a vector of well names, or a
regular expression pattern for wells to be masked. To learn
regular expression patterns see grep
.
Value
An object of RTCA-class
Author(s)
Jitao David Zhang jitao_david.zhang@roche.com
References
http://www.roche-applied-science.com/proddata/gpip/3_8_9_1_1_1.html
Examples
require(RTCA)
ofile <- system.file("extdata/testOutput.csv", package="RTCA")
pfile <- system.file("extdata/testOutputPhenoData.csv", package="RTCA")
pData <- read.csv(pfile, sep="\t", row.names="Well")
metaData <- data.frame(labelDescription=c(
"Rack number",
"siRNA catalogue number",
"siRNA gene symbol",
"siRNA EntrezGene ID",
"siRNA targeting accession"
))
phData <- new("AnnotatedDataFrame", data=pData, varMetadata=metaData)
x <- parseRTCA(ofile, phenoData=phData)
print(x)
## mask wells, e.g. due to unusual values
x.skip <- parseRTCA(ofile, phenoData=phData, maskWell=c("D09"))
x.skip.multiWells <- parseRTCA(ofile, phenoData=phData, maskWell=c("A01", "B01",
"C02"))
## skip the last row
x.skip.pattern <- parseRTCA(ofile, phenoData=phData,
maskWell=c("H[0-9]{2}"))
## check the number of masked wells
noMasked <- function(x) sum(apply(x, 2, function(x) all(is.na(x))))
noMasked(exprs(x))
noMasked(exprs(x.skip))
noMasked(exprs(x.skip.multiWells))
noMasked(exprs(x.skip.pattern))
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(RTCA)
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:parallel':
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from 'package:stats':
IQR, mad, xtabs
The following objects are masked from 'package:base':
Filter, Find, Map, Position, Reduce, anyDuplicated, append,
as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
rbind, rownames, sapply, setdiff, sort, table, tapply, union,
unique, unsplit
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Loading required package: RColorBrewer
Loading required package: gtools
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/RTCA/parseRTCA.Rd_%03d_medium.png", width=480, height=480)
> ### Name: parseRTCA
> ### Title: PARSE RTCA OUTPUT FILE
> ### Aliases: parseRTCA
> ### Keywords: IO file
>
> ### ** Examples
>
> require(RTCA)
>
> ofile <- system.file("extdata/testOutput.csv", package="RTCA")
> pfile <- system.file("extdata/testOutputPhenoData.csv", package="RTCA")
>
> pData <- read.csv(pfile, sep="\t", row.names="Well")
> metaData <- data.frame(labelDescription=c(
+ "Rack number",
+ "siRNA catalogue number",
+ "siRNA gene symbol",
+ "siRNA EntrezGene ID",
+ "siRNA targeting accession"
+ ))
>
> phData <- new("AnnotatedDataFrame", data=pData, varMetadata=metaData)
> x <- parseRTCA(ofile, phenoData=phData)
Read 245 items
>
> print(x)
Experiment ID: 0811171136P1
RTCAtimeline
================================================
time action
0 start
================================================
Time unit: hour
RTCA-run start time: 2016-07-02 23:50:56
ExpressionSet (storageMode: lockedEnvironment)
assayData: 242 features, 96 samples
element names: exprs
protocolData: none
phenoData
rowNames: A01 A02 ... H12 (96 total)
varLabels: Rack CatalogNumber ... Accession (5 total)
varMetadata: labelDescription
featureData
featureNames: 0 0.93 ... 90.33 (242 total)
fvarLabels: timepoints
fvarMetadata: labelDescription
experimentData: use 'experimentData(object)'
Annotation:
>
> ## mask wells, e.g. due to unusual values
> x.skip <- parseRTCA(ofile, phenoData=phData, maskWell=c("D09"))
Read 245 items
> x.skip.multiWells <- parseRTCA(ofile, phenoData=phData, maskWell=c("A01", "B01",
+ "C02"))
Read 245 items
> ## skip the last row
> x.skip.pattern <- parseRTCA(ofile, phenoData=phData,
+ maskWell=c("H[0-9]{2}"))
Read 245 items
>
> ## check the number of masked wells
> noMasked <- function(x) sum(apply(x, 2, function(x) all(is.na(x))))
> noMasked(exprs(x))
[1] 0
> noMasked(exprs(x.skip))
[1] 1
> noMasked(exprs(x.skip.multiWells))
[1] 3
> noMasked(exprs(x.skip.pattern))
[1] 12
>
>
>
>
>
> dev.off()
null device
1
>