Package 'phantasus'

Title: Visual and interactive gene expression analysis
Description: Phantasus is a web-application for visual and interactive gene expression analysis. Phantasus is based on Morpheus – a web-based software for heatmap visualisation and analysis, which was integrated with an R environment via OpenCPU API. Aside from basic visualization and filtering methods, R-based methods such as k-means clustering, principal component analysis or differential expression analysis with limma package are supported.
Authors: Maxim Kleverov [aut], Daria Zenkova [aut], Vladislav Kamenev [aut], Margarita Sablina [ctb], Maxim Artyomov [aut], Alexey Sergushichev [aut, cre]
Maintainer: Alexey Sergushichev <[email protected]>
License: MIT + file LICENSE
Version: 1.27.0
Built: 2024-10-30 09:26:15 UTC
Source: https://github.com/bioc/phantasus

Help Index


Example dataset

Description

Small slice from GSE27112-GPL6103 for runnable examples.

Usage

data(es)

Format

An object of class ExpressionSet with 20 rows and 5 columns.

Examples

## Not run: 
data(es)
performKmeans(es, k = 2)

## End(Not run)

Example pathway data.frame for fgsea tool

Description

Example pathway data.frame for fgsea tool


Generate files for preloaded session from a session link.

Description

Generate files for preloaded session from a session link.

Usage

generatePreloadedSession(sessionURL, preloadedName, preloadedDir)

Arguments

sessionURL

String with session link produced by phantasus.

preloadedName

String with name that should be assigned to the session.

preloadedDir

Path to the directory with preloaded datasets and sessions.

Value

Function produces two files (preloadedName.rda with ExpressionSet and preloadedName.json with session features) in preloadedDir folder.

Examples

## Not run: 
sessionURL <- "https://ctlab.itmo.ru/phantasus/?session=x063c1b365b9211" # link from 'Get dataset link...' tool in phantasus
newName <- "my_session" # user defined name
preloadedDir <- "./preloaded" # directory where files will be stored. In order too get access through phantasus web-app should be preloadedDir
dir.create(preloadedDir, showWarnings = FALSE)
generatePreloadedSession(sessionURL= sessionURL,
                         preloadedName = newName,
                         preloadedDir = preloadedDir)

servePhantasus(preloadedDir=preloadedDir, openInBrowser=FALSE)
# open browser manually at http://0.0.0.0:8000/phantasus/index.html?preloaded=my_session

## End(Not run)

Load ExpressionSet by GEO identifier

Description

getES return the ExpressionSet object(s) corresponding to GEO identifier.

Usage

getES(
  name,
  type = NA,
  destdir = getPhantasusConf("cache_folders")$geo_path,
  mirrorPath = getPhantasusConf("geo_mirrors")
)

Arguments

name

String, containing GEO identifier of the dataset. It should start with 'GSE' or 'GDS' and can include exact GPL to annotate dataset, separated with dash ('-') from the identifier.

type

Type of the dataset: 'GSE' or 'GDS'. If not specified, the function will take first three letters of name variable as type.

destdir

Directory for caching loaded Series and GPL files from GEO database.

mirrorPath

URL string which specifies the source of matrices.

Value

List of ExpressionSet objects, that were available by given in name variable GEO identifier.

Examples

## Not run: 
    getES('GSE14308', type = 'GSE', destdir = 'cache')
    getES('GSE27112')
    getES('GDS4922')

## End(Not run)

Load ExpressionSet from GEO Datasets

Description

getGDS return the ExpressionSet object corresponding to GEO Dataset identifier.

Usage

getGDS(
  name,
  destdir = getPhantasusConf("cache_folders")$geo_path,
  mirrorPath = getPhantasusConf("geo_mirrors")
)

Arguments

name

String, containing GEO identifier of the dataset. It should start with 'GSE' or 'GDS' and can include exact GPL to annotate dataset, separated with dash ('-') from the identifier.

destdir

Directory for caching loaded Series and GPL files from GEO database.

mirrorPath

URL string which specifies the source of matrices.

Value

ExpressionSet object wrapped in list, that was available by given in name variable GEO identifier.

Examples

## Not run: 
   getGDS('GDS4922', destdir = tempdir(), mirrorPath = "https://ftp.ncbi.nlm.nih.gov")

## End(Not run)

Load ExpressionSet from GEO Series

Description

getGSE return the ExpressionSet object(s) corresponding to GEO Series Identifier.

Usage

getGSE(
  name,
  destdir = getPhantasusConf("cache_folders")$geo_path,
  mirrorPath = getPhantasusConf("geo_mirrors")
)

Arguments

name

String, containing GEO identifier of the dataset. It should start with 'GSE' or 'GDS' and can include exact GPL to annotate dataset, separated with dash ('-') from the identifier.

destdir

Directory for caching loaded Series and GPL files from GEO database.

mirrorPath

URL string which specifies the source of matrices.

Value

List of ExpressionSet objects, that were available by given in name variable GEO identifier.

Examples

## Not run: 
    getGSE('GSE14308', destdir = 'cache')
    getGSE('GSE27112')
    getGSE('GSE53986')

## End(Not run)

Read Phantasus Config

Description

Read Phantasus Config

Usage

getPhantasusConf(
  value = NULL,
  configName = Sys.getenv("R_CONFIG_ACTIVE"),
  file = file.path(tools::R_user_dir(package = "phantasus", which = "config"),
    "user.conf")
)

Arguments

value

Value to retrieve from the config file.

configName

R_CONFIG_ACTIVE value. If unset, "default".

file

Location of the config file


Reads ExpressionSet from a GCT file. Function is deprecated, please use phantasusLite:::readGct() instead

Description

Reads ExpressionSet from a GCT file. Function is deprecated, please use phantasusLite:::readGct() instead

Usage

read.gct(...)

Arguments

...

parameters for phantasusLite:::readGct() call

Value

ExpressionSet object


Reparse cached expression sets from GEO.

Description

The function should be used on phantasus version updates that change behavior of loading datasets from GEO. It finds all the datasets that were cached and runs 'getES' for them again. The function uses cached Series and other files from GEO.

Usage

reparseCachedESs(destdir, mirrorPath = getPhantasusConf("geo_mirrors"))

Arguments

destdir

Directory used for caching loaded Series files from GEO database.

mirrorPath

URL string which specifies the source of matrices.

Value

vector of previously cached GSE IDs

Examples

reparseCachedESs(destdir=tempdir(), "https://ftp.ncbi.nlm.nih.gov")

Serve phantasus.

Description

servePhantasus starts http server handling phantasus static files and opencpu server.

Usage

servePhantasus(
  host = getPhantasusConf("host"),
  port = getPhantasusConf("port"),
  staticRoot = getPhantasusConf("static_root"),
  preloadedDir = getPhantasusConf("preloaded_dir"),
  openInBrowser = TRUE,
  quiet = TRUE,
  background = FALSE
)

Arguments

host

Host to listen.

port

Port to listen.

staticRoot

Path to static files with phantasus.js (on local file system).

preloadedDir

Full path to directory with preloaded files.

openInBrowser

Boolean value which states if application will be automatically loaded in default browser.

quiet

Boolean value which states whether the connection log should be hidden (default: TRUE)

background

Boolean value which states whether the server should be started in background (default: FALSE)

Value

A handle to the server as returned by 'httpuv::startServer'

Examples

## Not run: 
s <- servePhantasus(background=FALSE)
s$stop()

## End(Not run)

httpuv::stopAllServers() # can be used if handle is lost

Setup phantasus. Read user config file ( or create default one) and fill cache_root using sources in file.

Description

Setup phantasus. Read user config file ( or create default one) and fill cache_root using sources in file.

Usage

setupPhantasus(setup_name = "default", file = confFile("setup.yml"))

Arguments

setup_name

name of config from file. If unset or not existed, "default".

file

Location of the setup.yml file with setup parameters. If not existed use file from package


Saves ExpressionSet to a GCT file (version 1.3). Function is deprecated, please use phantasusLite:::writeGct() instead

Description

Saves ExpressionSet to a GCT file (version 1.3). Function is deprecated, please use phantasusLite:::writeGct() instead

Usage

write.gct(...)

Arguments

...

parameters for phantasusLite:::writeGct() call

Value

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