Last data update: 2014.03.03

R: Method "PhenList"
PhenListR Documentation

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.

Author(s)

Natalja Kurbatova, Natasha Karp, Jeremy Mason

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

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

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(PhenStat)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/PhenStat/PhenList.Rd_%03d_medium.png", width=480, height=480)
> ### Name: PhenList
> ### Title: Method "PhenList"
> ### Aliases: PhenList
> 
> ### ** Examples
> 
>     file <- system.file("extdata", "test1.csv", package="PhenStat")
>     test <- PhenList(dataset=read.csv(file),
+             testGenotype="Sparc/Sparc")
Warning:
Dataset's column 'Assay.Date' has been renamed to 'Batch' and will be used for the batch effect modelling.

Information:
Dataset's 'Genotype' column has following values: '+/+', 'Sparc/Sparc'

Information:
Dataset's 'Sex' column has following value(s): 'Female', 'Male'

>     
>     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")
Warning:
Dataset's column 'Assay.Date' has been renamed to 'Batch' and will be used for the batch effect modelling.

Warning:
Hemizygotes 'Arid4a/+' have been relabelled to test genotype 'Arid4a/Arid4a'.
If you don't want this behaviour then don't define 'hemiGenotype' argument.

Information:
Dataset's 'Genotype' column has following values: '+/+', 'Arid4a/Arid4a'

Information:
Dataset's 'Sex' column has following value(s): 'Female', 'Male'

>     
>     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/+")
Warning:
Dataset's column 'Assay.Date' has been renamed to 'Batch' and will be used for the batch effect modelling.

Information:
Dataset's 'Genotype' column has following values: '+/+', 'Mysm1/+'

Information:
Dataset's 'Sex' column has following value(s): 'Female', 'Male'

>     
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>