readCSVDataFrame {twoddpcr} | R Documentation |
Bio-Rad's QuantaSoft can export droplet amplitude data from multiple wells into CSV files for each well. This function can read these CSV files into a list. Note that empty wells will be ignored.
readCSVDataFrame(path, wellCol = FALSE, sortByLetter = FALSE)
path |
The path containing the CSV files (can be a combination of
directories and individual CSV file paths). Each file will have
a |
wellCol |
If |
sortByLetter |
If |
A list of data frames, each containing the data from a CSV file with the corresponding well name.
Anthony Chiu, anthony.chiu@cruk.manchester.ac.uk
## Read all of the droplet amplitudes from CSV files in a directory. moreAmpsDir <- system.file("extdata", "more-amplitudes", package="twoddpcr") someWells <- readCSVDataFrame(moreAmpsDir) ## We can read files from directories and files at the same time. ampFile <- system.file("extdata", "amplitudes", "sample_B03_Amplitude.csv", package="twoddpcr") someWells <- readCSVDataFrame(c(moreAmpsDir, ampFile)) ## If samples have been ordered by "A01", "A02", "A03", etc. instead of ## "A01", "B01", "C01", etc., we can set the sortByLetter flag to TRUE. someWells <- readCSVDataFrame(moreAmpsDir, sortByLetter=TRUE) ## Setting wellCol to TRUE adds an extra column with the well name. If we ## bind the data frames together, we can track where the droplets came from. someWells <- readCSVDataFrame(moreAmpsDir, wellCol=TRUE) someWells <- do.call(rbind, someWells) head(someWells) tail(someWells)