Description Usage Arguments Details Value Author(s) Examples
Extracts Cq data from a data frame (optionally read from a file) and (optionally) creates cqdat object.
1 2 3 4 5 6 7 8 | fetch(data=NULL,panel=NA,dir=NULL,sep="\t",skip=11,
header=TRUE,check.names=FALSE,cq.xlim=NA,out=c(3.5,5),
cols=NULL,vals=NULL,Rep=NA,
colx="Chamber ID",coly="Chamber ID",colpan="Panel ID",
colcq="Value",colh="Threshold",colfail="Call",
funx=function(x) substr(x,6, 7),
funy=function(x) substr(x,10,11),
funfail=function(x) x=="Fail",h=NA,raw=FALSE)
|
data |
either data frame or filename. |
panel |
the panel number (alternatively use |
dir |
directory of file (if not working directory). |
sep |
if |
skip |
the number of lines of the data file (excluding any header) to skip before beginning to read data. |
header |
logical. Whether the file or data frame contains the names of the variables as its first line. |
check.names |
logical. If |
cq.xlim |
if |
out |
vector of 2 positive numbers defining distance from mean (after detrending) for excluding low and high outliers respectively. |
cols |
vector of indices and/or character strings identifying the panel to get the data for data (not used if pan specified). |
vals |
vector of indices and/or character strings (in order of cols) identifying the values taken by the data in the columns designated by cols for the desired panel (not used if |
Rep |
if cols and vals reduce the data to more than 1 panel, then the Rep'th panel is used (not used if |
colx, coly, colpan, colcq, colh |
integers and/or character strings identifying columns for x-location, y-location, panel number, Cq values, h, fail condition respectively. |
colfail |
integer and/or character string (or possibly vector of such) identifying columns used by funfail to identify negative partitions. |
funx, funy |
functions to extract x- and y-values from the columns specified by colx and coly. |
funfail |
function from entries of column(s) specified by colfail with logical as output to identify negative partitions. |
h |
threshold value (can also be extracted by specifying colh) |
raw |
logical. If |
This function creates a data frame of x-location data, y-location data and Cq values and either returns just it (if raw is TRUE) or passes it to prep which returns it within a cqdat object.
The function extracts data for a single panel, which can either be identified by the parameter panel, or by specifying vectors cols, vals and if necessary Rep.
If the values of cq.xlim are not within the range of x-location values then Cq data will be excluded, but with the associated positive and negative counts retained instead.
Either a matrix of Cq data with locations (if raw is TRUE), or an object of class cqdat (by running prep).
Philip Wilson
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 | # Select panel directly. Trim data for columns 1-10 and 60-70
# (there are 70 columns).
#Data is from Fluidigm output, so defaults are appropriate.
dat1<-fetch(Exp37a,panel=1,cq.xlim=c(11,60))
# Plot raw data
with(data.frame(fetch(Exp37a,panel=1,raw=TRUE)),plot(x,cq))
## Not run:
# Extract data from a named tab-delimited file
dat<-fetch("dpcr.txt",sep="\t",panel=1)
# Extract data from a named comma separated values file
dat<-fetch("dpcr.csv",sep=",",panel=1)
# Select panel indirectly. Select negative partitions
# to be those with Cq coded as 999.
data(dpcr2)
dat2<-fetch(dpcr,
cols=c("Master Mix","Sample Name","Assay Name"),
vals=c("GE","P2A","Jiang_16S"),
Rep=1,colfail="Cq",funfail=function(x) x==999)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.