create_study: Study Factory

View source: R/Study.R

create_studyR Documentation

Study Factory

Description

Intanciates an object that extends the epimedtools internal class Study_abstract.

Usage

create_study(cache_filename, ...)

Arguments

cache_filename

A character string that describes the study cache file name.

...

Parameters that are given to the Study contructor

Details

This function intanciates an object that extends the epimedtools internal abstract class Study_abstract. You can learn more about Study_abstract class by typing ?epimedtools::Study_abstract

Value

It returns an object that extends the Study_abstract class.

Examples

# create study and load data from GSE57831_series_matrix.txt.gz contained in the package
study = create_study()
study$series_matrix_filename = system.file(
   "extdata/GSE26471", 
   "GSE26471_series_matrix.txt.gz", 
   package = "epimedtools"
 )  
# str(study$get_gset(dest_dir="data"))

# load data from GEO
study = create_study()
study$gse = "GSE26471" # 1 sample, expression
# study$gse = "GSE42707" # 1 sample
# study$gse = "GSE56382" # 2 samples
# study$gse = "GSE49585" # 2 samples
# str(study$get_gset(dest_dir="data"))

# cache study
study$save("/tmp/tmp_cached_study.rds")
# load a cached study
study = create_study("/tmp/tmp_cached_study.rds")

fchuffar/epimedtools documentation built on Feb. 3, 2024, 2:21 a.m.