OpenStatsBuilder: Method "OpenStatsListBuilder"

Description Usage Arguments Value Author(s) See Also Examples

Description

Specifying the age in days, this function creates a 'OpenStatsList' object from a 'PhenList' object from Bioconductor PhenStat package.

Usage

1
2
3
4
5
6
7
OpenStatsListBuilder(
  PhenListobject,
  DOE = NULL,
  DOB = NULL,
  d.threshold = 16 * 7,
  debug = TRUE
 )

Arguments

PhenListobject

Mandatory argument. Instance of the 'PhenList' object from PhenStat package

DOE

Name of the data column for the 'Batch' in the 'PhenList' object. If left NULL then the input 'PhenList' object will be returned. Default NULL

DOB

Name of the data column for the 'date_of_birth' in the 'PhenList' object. If left NULL then the input 'PhenList' object will be returned. Default NULL

d.threshold

The threshold in age (DOE-DOB) to specify LifeStage early/late levels. The function uses as.Date(DOE)-as.Date(DOB) to calculate the age. The default is 16 weeks (16*7 days)

debug

Logical flag. Set to TRUE to see debug messages. Default TRUE

Value

Provided DOE and DOB are not NULL, a 'OpenStatsList' object that is quite similar to 'PhenList' object with an extra column called 'LifeStage' with two levels 'Early' and 'Late'. Otherwise, the output is similar to the input 'PhenList' object.

Author(s)

Hamed Haseli Mashhadi <hamedhm@ebi.ac.uk>

See Also

OpenStatsAnalysis, OpenStatsList

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
	file <- system.file("extdata", "test_continuous.csv", package = "OpenStats")
	####################################################################
	# PhenListObject from PhenStat package
	# The R package PhenStats must be installed in prior
	####################################################################
	PhenListObject <- PhenList(
	  dataset = read.csv(file),
	  testGenotype = "experimental",
	  refGenotype = "control",
	  dataset.colname.batch = "date_of_experiment",
	  dataset.colname.genotype = "biological_sample_group",
	  dataset.colname.sex = "sex",
	  dataset.colname.weight = "weight"
	)
	####################################################################
	# OpenStatsList object
	####################################################################
	OpenStatsListBuilder <- OpenStatsListBuilder(
	  PhenListobject = PhenListObject,
	  DOE = "Batch",
	  DOB = "Birth.Date",
	  d.threshold = 99
	)
	plot(OpenStatsListBuilder)
	class(OpenStatsListBuilder)
	rm(OpenStatsListBuilder)

OpenStats documentation built on Nov. 8, 2020, 5:20 p.m.