16 lines
22 KiB
Plaintext
16 lines
22 KiB
Plaintext
|
|
{
|
||
|
|
"contents" : "#Copyright 2012 The Board of Regents of the University of Wisconsin System.\n#Contributors: Jason Shao, James McCurdy, Enhai Xie, Adam G.W. Halstead, \n#Michael H. Whitney, Nathan DiPiazza, Trey K. Sato and Yury V. Bukhman\n#\n#This file is part of GCAT.\n#\n#GCAT is free software: you can redistribute it and/or modify\n#it under the terms of the GNU Lesser General Public License as published by\n#the Free Software Foundation, either version 3 of the License, or\n#(at your option) any later version.\n#\n#GCAT is distributed in the hope that it will be useful,\n#but WITHOUT ANY WARRANTY; without even the implied warranty of\n#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n#GNU Lesser General Public License for more details.\n#\n#You should have received a copy of the GNU Lesser General Public License \n#along with GCAT. If not, see <http://www.gnu.org/licenses/>.\n\n# Notes by Jason\n# 9/07/11\n\n\n########################################################################\n# #\n# Function for loading data from tabular format into an object array #\n# #\n########################################################################\n#' Load tabular data\n#'\n#' This function handles loading data from tabular format (.csv, tab-delimited text or R data frame object)\n#' and returns an array of well objects, each filled with raw Time vs. OD data. \n#' It takes single-plate or multiple-plate format data. For single-plate data, \n#'it calls on the function \\code{gcat.reorganize.single.plate.data} to rearrange the table before creating the output object. \n#'\n#' @param file.name Complete path and file name of a comma-separated values (.csv) file containing growth curve data \n#' in the multiple-plate (long) format. \n#' @param input.data A list of tables representing input files read with \\code{read.table}. Used to save time in cases\n#' of running multiple analyses on the same dataset. If used, the function will ignore \\code{file.name} entirely.\n#' @param load.type .csv by default. \n#' @param plate.laout Specifies the layout of the given plate.\n#' @param single.plate.ID specifies a plate name for a single-plate read. If NULL, this is derived from the file name. \n#' @param blank.value Blank OD measurement for uninoculated wells. By default(NULL), the value of the first OD\n#' measurement in each well is used.\n#' @param add.constant A value for r in the log(OD + r) transformation.\n#' @param plate.nrow The number of rows in the input files.\n#' @param plate.ncol The number of columns in the input files.\n#' @param input.skip.lines specifies a plate name for a single-plate read. If NULL, this is derived from the file name. \n#' @param multi.column.headers The headers of the column when analyzing multiple plates.\n#' @param single.column.headers The headers of the column when analyzing a single plate.\n#' @param layout.sheet.headers The headers of the layout file.\n#' @param silent Surpress all messages.\n#' @param verbose Display all messages when analyzing each well.\n#' \n#' @return A list of well objects.\ngcat.load.data = function(file.name = NULL, load.type = \"csv\", input.data = NULL, single.plate.ID = NULL, \n plate.layout = NULL,plate.nrow = 8, plate.ncol = 12, input.skip.lines = 0,\n multi.column.headers = c(\"Plate.ID\", \"Well\", \"OD\", \"Time\"), single.column.headers = c(\"\",\"A1\"), \n layout.sheet.headers = c(\"Strain\", \"Media Definition\"),\n blank.value = NULL, start.index = 2, single.plate = F, silent = T){\n\n ########################################################################\n # Read from .csv, tab-delimited text file or data frame object #\n ########################################################################\n \n\tif(is.null(input.data)){\n\t\t# Either read from .csv.\n\t\tinput.data = read.csv(file.name, stringsAsFactors=F, skip = input.skip.lines, fileEncoding='UTF-8')\n\n\t\t# Determin
|
||
|
|
"created" : 1425413240737.000,
|
||
|
|
"dirty" : false,
|
||
|
|
"encoding" : "UTF-8",
|
||
|
|
"folds" : "",
|
||
|
|
"hash" : "2796681086",
|
||
|
|
"id" : "2FF709FD",
|
||
|
|
"lastKnownWriteTime" : 1428438949,
|
||
|
|
"path" : "~/Documents/GCAT4/trunk/R/GCAT/R/table2well.R",
|
||
|
|
"project_path" : "R/table2well.R",
|
||
|
|
"properties" : {
|
||
|
|
},
|
||
|
|
"source_on_save" : false,
|
||
|
|
"type" : "r_source"
|
||
|
|
}
|