get.pdata: Reads phenotypic data from a tab-delimited file

Description Usage Arguments Value See Also Examples

Description

get.pdata reads in a tab-delimited file containing sample annotation, such as a phenotypic data table, and creates variables useful for making graphs later on. The input file must have as many rows as replicates included in the study, and as many columns as phenotype variables, which must include at least a variable containing replicate names (the same as given in the data file), one including cell line ids and one including a condition or treatment.

Usage

1
2
3
get.pdata(filename, mydir = NULL, sep = "\t", check_names = FALSE,
  names_var = "names", clines_var = "clines", treat_var = "treat",
  sample_ids = NULL)

Arguments

filename

string; the name of the tab-delimited file containing the data to be read, including the file extension.

mydir

string; the complete folder path where the data file is to be found. It is assumed it ends without any (forward or backward) slashes, for example '/home/projects' instead of '/home/projects/'. If NULL, it will get the current work directory via getwd.

sep

the separator to be used while reading in the data file, containing a value accepted by read.delim.

check_names

logical, indicating whether or not the column names in the data file need to be checked for consistency or not. To be used while reading in the data file. Defaults to FALSE, when column names are left unaltered by R.

names_var

string; name of the variable containing the replicate names, corresponding to the same names given in the data file.

clines_var

string; name of the variable containing the cell line names. This may be used later on for graph annotation. This argument is expected to be declared. Of course, the user can instead declare here any variable considered interesting to distinguish sets of replicates, such as the replicate number.

treat_var

string; name of the variable containing the treatment or condition to the well annotation column. Optional.

sample_ids

a character vector containing sample ids yielded by the data file. This is typically the result of colnames of data_only, a slot of the result of read.screen.data. The function checks if the ids given in sample_ids are the same, and are in the same order, as those in names_var. If they are the same but not in the same order, the pdata table has rows re-ordered so that they match the order in sample_ids. If values in sample_ids are not a permutation of those in names_bar, the function yields an error. We strongly suggest users make use of this variable, but they may ignore it and no check is made.

Value

A list containing the pdata read with all variables, a colour variable coding for the cell line variable, as well as a vector of the variable names

See Also

read.screen.data to read in screen data, combine.pdata to combine pdata from multiple screens into a single object, and get.leth.scores to compute scores that make observations in different screens comparable.

Examples

1
# See vignette

rxmenezes/rscreenorm documentation built on May 15, 2019, 1:19 p.m.