PGEXContainerProto-fun: Construct a PGEX Container Prototype

Description Usage Arguments Value Functions Examples

Description

A PGEXContainerProto is a PGEXContainer that has not had its fields validated for consistency and validity. This allows step-wise construction.

Usage

1
2
3
4
5
PGEXContainerProto(summarizedExperiment = NULL, pgex_experiment = NULL,
  pgex_sample = NULL, geo_soft = NULL, ae_idf = NULL, ae_sdrf = NULL,
  fdata = NULL, exprs = NULL)

PGEX_promote(obj)

Arguments

summarizedExperiment

SummarizedExperiment, currently mandatory

pgex_experiment

mandatory experiment data

pgex_sample

optional experiment data to populate colData(summarizedExperiment)

geo_soft

optional GEO data

ae_idf

optional ArrayExpress

ae_sdrf

optional ArrayExpress

fdata

feature data (ignored)

exprs

expression data (ignored)

obj

PGEXContainerProto

Value

object of class PGEXContainerProto

Functions

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
27
28
29
30
31
32
## library(GEOquery)
## geoexp <- getGEO('GSE42268')
## se <- makeSummarizedExperimentFromExpressionSet(geoexp[[1]])
library(SummarizedExperiment)
se <- readRDS(system.file("tests", "testthat", "GSE42268_SummarizedExperiment.rds",
                          package='PenultimateGEXContainer'))
dats <- split_invariant(colData(se))
colData(se)<- dats$variant
## No batch info available
## Note that we need to be careful to set the right data types.
## No coercion is attempted
batch  <- rep(NA_character_, ncol(se))
## NA by default is logical, which violates schema

## Would be a factor by default
biosample <- as.character(colData(se)$characteristics_ch1)
rna_pg <-  colData(se)$characteristics_ch1.2
ncells_maybe  <- colData(se)$characteristics_ch1.1
ncells <- rep(NA_real_, length(ncells_maybe))
ncells[grepl('single cell', ncells_maybe)] <- 1
ncells[grepl('50 cells', ncells_maybe) ] <- 50
ncells[grepl('12 cells', ncells_maybe)] <- 12
ncells[grepl('10 pg', rna_pg) & grepl('total RNA', ncells_maybe)] <- 1.2
ncells[grepl('1 ug', rna_pg) & grepl('total RNA', ncells_maybe)] <- 120
ncells[grepl('averaged single cell lysis', rna_pg) & grepl('LIMprep', ncells_maybe)] <- 1
cell_cycle_maybe <- colData(se)$characteristics_ch1.3
pgex_sample <- DataFrame(pgex_batch=batch, pgex_biosample=biosample, pgex_ncells=ncells, pgex_filter_study_pass=TRUE)
pgex_experiment <- list(pgex_platform='cell_ina_well', pgex_chemistry='3prime polyA tailing',
                        pgex_has_umi=FALSE, pgex_ercc_version=NA, pgex_molecule='polyA RNA',
                        pgex_is_public=TRUE, pgex_transformation=NA)
proto <- PGEXContainerProto(se, geo_soft=colData(se), pgex_sample=pgex_sample, pgex_experiment=pgex_experiment)
PGEX_promote(proto)

amcdavid/PenultimateGEXContainer documentation built on May 12, 2019, 2:35 a.m.