# NOT RUN {
# }
# NOT RUN {
## EXAMPLE 1:
## Internal dataset format01.txt (in 'add01' directory)
## with 384 runs.
## Tab delimited, 30 cycles, only reporter dye,
## data in rows, and some unneeded columns and rows.
## This is the example data path, but could be any path
## with data such as c:/temp.
PATH <- path.package("qpcR")
PATHall <- paste(PATH, "/add01/", sep = "")
res <- pcrimport(PATHall)
## Answer queries with the following parameters and
## verify the effects in the 'View' windows:
## 1 => data is tab delimited
## 1 => decimal separator is "."
## c(1, 3) => remove columns 1 + 3
## 1:2 => remove rows 1 + 2
## 2 => data is in rows
## 0 => all data is from reporter dye
## 1 => sample names are in row #1
## 0 => reporter data goes until end of table
## Data is stored as dataframe list items and can
## then be analyzed:
ml <- modlist(res[[1]], model = l5)
plot(ml, which = "single")
## Alternative without query:
res <- pcrimport(PATHall, sep = "\t", dec = ".",
delCol = c(1, 3), delRow = 1:2,
format = "row", sampleDat = 0,
names = 1, sampleLen = 0,
check = FALSE)
## Do something useful with the data:
ml <- modlist(res[[1]], model = l5)
plot(ml, which = "single")
## EXAMPLE 2:
## Internal datasets format02a.txt - format02d.txt
## (in 'add02' directory) with 96 runs.
## Tab delimited, 40 cycles, reporter dye + reference dye,
## data in columns, and some unneeded columns and rows.
PATH <- path.package("qpcR")
PATHall <- paste(PATH, "/add02/", sep = "")
res <- pcrimport(PATHall)
## Answer queries with the following parameters and
## verify the effects in the 'View' windows:
## 1 => data is tab delimited
## 1 => decimal separator is "."
## 1 => remove column 1 with cycle data
## c(1, 43, 44) => remove rows 1, 43, 44
## 1 => data is in columns
## 1:96 => data columns for reporter dye
## -2 => reference dye stacked under reporter dye
## 1 => sample names are in row #1
## 1:40 => reporter data is in rows 1-40
## -1 => reference data is stacked under samples
## Data is stored as dataframe list items and can
## then be analyzed.
## Alternative without query:
res2 <- pcrimport(PATHall, sep = "\t", dec = ".",
delCol = 1, delRow = c(1, 43, 44),
format = "col", sampleDat = 1:96,
refDat = -2, names = 1,
sampleLen = 1:40, refLen = -1,
check = FALSE)
## Do something useful with the data:
ml2 <- modlist(res2[[1]], model = l5)
plot(ml2)
# }
Run the code above in your browser using DataLab