Learn R Programming

PhenStat (version 2.6.0)

PhenList: Method "PhenList"

Description

Function to create data object from the data frame. In addition to dependent variable column (the variable of interest) mandatory columns that should present in the data frame are "Genotype" and "Sex". The "Assay.Date" column is used to model "Batch" effect if not specified differently. "Weight" column is used to model body weight effect. Function creates PhenList object, checks data integrity, renames columns when requested, provides simple statistics about dataset. Returns an instance of the PhenList object created from the data file. Dataset is cleaned to ensure there is a maximum two sex levels and there are exactly two levels for genotype. Data cleaning can be switched off by defining the argument "dataset.clean" as FALSE.

Usage

PhenList(dataset, testGenotype, refGenotype="+/+", hemiGenotype=NULL, outputMessages=TRUE, dataset.clean=TRUE, dataset.colname.batch=NULL, dataset.colname.genotype=NULL, dataset.colname.sex=NULL, dataset.colname.weight=NULL, dataset.values.missingValue=" ", dataset.values.male=NULL, dataset.values.female=NULL)

Arguments

dataset
data frame created from file or from another source; mandatory argument
testGenotype
defines the test genotype to be compared to the reference genotype; mandatory argument
refGenotype
defines the reference genotype; assigned default value is "+/+"
hemiGenotype
defines the genotype value for hemizygous that will be changed to test genotype value
outputMessages
flag: "FALSE" value to suppress output messages; "TRUE" value to show output messages; assigned default value is TRUE
dataset.clean
flag: "FALSE" value for no modification of the dataset; "TRUE" value to clean dataset if needed; assigned default value is TRUE
dataset.colname.batch
column name within dataset for the batch effect
dataset.colname.genotype
column name within dataset for the genotype info
dataset.colname.sex
column name within dataset for the sex info
dataset.colname.weight
column name within dataset for the weight info
dataset.values.missingValue
value used as missing value in the dataset
dataset.values.male
value used to label "males" in the dataset
dataset.values.female
value used to label "females" in the dataset

Value

Returns an instance of the PhenList class.

References

Karp N, Melvin D, Sanger Mouse Genetics Project, Mott R (2012): Robust and Sensitive Analysis of Mouse Knockout Phenotypes. PLoS ONE 7(12): e52410. doi:10.1371/journal.pone.0052410 West B, Welch K, Galecki A (2007): Linear Mixed Models: A practical guide using statistical software New York: Chapman & Hall/CRC 353 p.

See Also

PhenList

Examples

Run this code
    file <- system.file("extdata", "test1.csv", package="PhenStat")
    test <- PhenList(dataset=read.csv(file),
            testGenotype="Sparc/Sparc")
    
    file <- system.file("extdata", "test2.csv", package="PhenStat")
    test2 <- PhenList(dataset=read.csv(file),
            testGenotype="Arid4a/Arid4a",
            refGenotype="+/+",
            hemiGenotype="Arid4a/+",
            dataset.colname.weight="Weight.Value")
    
    file <- system.file("extdata", "test3.csv", package="PhenStat")
    test3 <- PhenList(dataset=read.csv(file),
            dataset.clean=TRUE, 
            dataset.values.female=1, 
            dataset.values.male=2, 
            testGenotype="Mysm1/+")
    

Run the code above in your browser using DataLab