Learn R Programming

PhenStat (version 2.6.0)

checkDataset: Method "checkDataset"

Description

Checks dataset for the minimum required info: 1. Column names should present 2. Genotype column should present 3. Sex column should present 4. Two data points for each Genotype/Sex combination 5. Number of Genotype levels should be 2 6. Number of Sex levels should be 1 or 2 7. Sex levels have to be "Female" and/or "Male" 8. Records with reference genotype should be in the dataset 9. Records with test genotype should be in the dataset Perform the following additional checks: - presence of Weight column, - presence of Batch column (Assay.Date). Warning given in case of missed data indicating that you can only fit a glm or to use MM equation "withoutWeight". Function checkDataset is called from PhenList function.

Usage

checkDataset(dataset, testGenotype, refGenotype="+/+", outputMessages=TRUE, dataset.clean=TRUE)

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 "+/+"
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

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

PhenTestResult

Examples

Run this code
    # "checkDataset" is called internally from "PhenList" function
    file <- system.file("extdata", "test1.csv", package="PhenStat")
    test <- PhenList(dataset=read.csv(file),
            testGenotype="Sparc/Sparc")    
    

Run the code above in your browser using DataLab