Package 'phantasusLite'

Title: Loading and annotation RNA-seq counts matrices
Description: PhantasusLite – a lightweight package with helper functions of general interest extracted from phantasus package. In parituclar it simplifies working with public RNA-seq datasets from GEO by providing access to the remote HSDS repository with the precomputed gene counts from ARCHS4 and DEE2 projects.
Authors: Rita Sablina [aut], Maxim Kleverov [aut], Alexey Sergushichev [aut, cre]
Maintainer: Alexey Sergushichev <[email protected]>
License: MIT + file LICENSE
Version: 1.5.0
Built: 2024-11-18 03:54:55 UTC
Source: https://github.com/bioc/phantasusLite

Help Index


Returns list of all HDF5-files on HSDS-server

Description

Returns list of all HDF5-files on HSDS-server

Usage

getHSDSFileList(
  url = "https://alserglab.wustl.edu/hsds/?domain=/counts",
  directory = NULL
)

Arguments

url

containing url of the server and root domain.

directory

containing name of the directory

Value

List of all HDF5-files on the server or all files of the collection

Examples

url <- 'https://alserglab.wustl.edu/hsds/?domain=/counts'
getHSDSFileList(url)

Adds condition to the annotation.

Description

Adds condition to the annotation.

Usage

inferCondition(es)

Arguments

es

contains ExpressionSet object

Value

Annotated ExpressionSet with conditions and replicates

Examples

ess <- GEOquery::getGEO("GSE143903")
es <- ess[[1]]
es <- inferCondition(es)
es$condition # contains inferred groups
es$replicate # contains inferred replicate numbers

Load count matrix from remote HDF5-file

Description

Load count matrix from remote HDF5-file

Usage

loadCountsFromH5FileHSDS(
  es,
  url = "https://alserglab.wustl.edu/hsds/?domain=/counts",
  file,
  sampleIndexes = NULL
)

Arguments

es

containing ExpressionSet loaded from GEO. Contains empty expression matrix.

url

containing url of the server and root domain.

file

containing name of the file (relative to the root domain)

sampleIndexes

containing sample indexes list

Value

ExpressionSet object with loaded count matrix

Examples

ess <- GEOquery::getGEO("GSE53053")
es <- ess[[1]]
url <- 'https://alserglab.wustl.edu/hsds/?domain=/counts'
file <- "/dee2/mmusculus_star_matrix_20240409.h5"
es <- loadCountsFromH5FileHSDS(es, url, file)

Load count matrix from HDF5-files.

Description

Load count matrix from HDF5-files.

Usage

loadCountsFromHSDS(
  es,
  url = "https://alserglab.wustl.edu/hsds/?domain=/counts"
)

Arguments

es

containing ExpressionSet loaded from GEO. Contains empty expression matrix.

url

containing url of the server and root domain.

Value

ExpressionSet with loaded count matrix

Examples

ess <- GEOquery::getGEO("GSE85653")
es <- ess[[1]]
url <- 'https://alserglab.wustl.edu/hsds/?domain=/counts'
es <- loadCountsFromHSDS(es, url)

Reads ExpressionSet from a GCT file.

Description

Only versions 1.2 and 1.3 are supported.

Usage

readGct(gct)

Arguments

gct

Path to gct file

Value

ExpressionSet object

Examples

es <- readGct(system.file("extdata/testdata/gct/test.gct", package="phantasusLite"))

Saves ExpressionSet to a GCT file (version 1.3).

Description

Saves ExpressionSet to a GCT file (version 1.3).

Usage

writeGct(es, file, gzip = FALSE)

Arguments

es

ExpresionSet obeject to save

file

Path to output gct file

gzip

Whether to gzip apply gzip-compression for the output file#'

Value

Result of the closing file (as in 'close()' function')

Examples

es <- readGct(system.file("extdata/testdata/gct/test.gct", package="phantasusLite"))
out <- tempfile(fileext = ".gct.gz")
writeGct(es, out, gzip=TRUE)