Skip to contents
accession <- "GSE158395"

# Get GEO data
gse <- MetaIntegrator::getGEOData(accession)
#> Setting options('download.file.method.GEOquery'='auto')
#> Setting options('GEOquery.inmemory.gpl'=FALSE)
#> Found 1 file(s)
#> GSE158395_series_matrix.txt.gz
#>           Length Class  Mode
#> GSE158395 1      -none- list
#> [1] "GSE158395_series_matrix.txt.gz"
# Need to fix some attributes of MetaIntegrator object for RNAseq compatibility
gse <- fixMetaIntegratorForRNAseq(gse) 

# Get GEO supplemental data, including raw data, and process
## withr used to create a tempdir for supplemental files for purpose of demo
withr::with_tempdir({
  getRNAcountMatrixNCBI(accession)
  reprocess_output <- processRNA(sprintf("./%s", accession))
})
#> Warning: replacing previous import 'S4Arrays::makeNindexFromArrayViewport' by
#> 'DelayedArray::makeNindexFromArrayViewport' when loading 'SummarizedExperiment'

# Add raw and reprocessed expression matrices to original MetaIntegrator
# GEO object
gse <- addRawExprMatrix(gse, reprocess_output$raw_expression, mode = "rnaseq")
gse <- addReprocessedExprMatrix(gse, reprocess_output$normalized_expression, mode = "rnaseq")

# Visualize effect of processing
geoAllBoxplots(gse)