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 |
Small slice from GSE27112-GPL6103 for runnable examples.
data(es)
data(es)
An object of class ExpressionSet
with 20 rows and 5 columns.
## Not run: data(es) performKmeans(es, k = 2) ## End(Not run)
## Not run: data(es) performKmeans(es, k = 2) ## End(Not run)
Generate files for preloaded session from a session link.
generatePreloadedSession(sessionURL, preloadedName, preloadedDir)
generatePreloadedSession(sessionURL, preloadedName, preloadedDir)
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. |
Function produces two files (preloadedName.rda
with ExpressionSet
and preloadedName.json
with session features) in preloadedDir
folder.
## 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)
## 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)
getES
return the ExpressionSet object(s) corresponding
to GEO identifier.
getES( name, type = NA, destdir = getPhantasusConf("cache_folders")$geo_path, mirrorPath = getPhantasusConf("geo_mirrors") )
getES( name, type = NA, destdir = getPhantasusConf("cache_folders")$geo_path, mirrorPath = getPhantasusConf("geo_mirrors") )
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 |
destdir |
Directory for caching loaded Series and GPL files from GEO database. |
mirrorPath |
URL string which specifies the source of matrices. |
List of ExpressionSet objects, that were available by given
in name
variable GEO identifier.
## Not run: getES('GSE14308', type = 'GSE', destdir = 'cache') getES('GSE27112') getES('GDS4922') ## End(Not run)
## Not run: getES('GSE14308', type = 'GSE', destdir = 'cache') getES('GSE27112') getES('GDS4922') ## End(Not run)
getGDS
return the ExpressionSet object corresponding
to GEO Dataset identifier.
getGDS( name, destdir = getPhantasusConf("cache_folders")$geo_path, mirrorPath = getPhantasusConf("geo_mirrors") )
getGDS( name, destdir = getPhantasusConf("cache_folders")$geo_path, mirrorPath = getPhantasusConf("geo_mirrors") )
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. |
ExpressionSet object wrapped in list, that was available by given
in name
variable GEO identifier.
## Not run: getGDS('GDS4922', destdir = tempdir(), mirrorPath = "https://ftp.ncbi.nlm.nih.gov") ## End(Not run)
## Not run: getGDS('GDS4922', destdir = tempdir(), mirrorPath = "https://ftp.ncbi.nlm.nih.gov") ## End(Not run)
getGSE
return the ExpressionSet object(s) corresponding
to GEO Series Identifier.
getGSE( name, destdir = getPhantasusConf("cache_folders")$geo_path, mirrorPath = getPhantasusConf("geo_mirrors") )
getGSE( name, destdir = getPhantasusConf("cache_folders")$geo_path, mirrorPath = getPhantasusConf("geo_mirrors") )
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. |
List of ExpressionSet objects, that were available by given
in name
variable GEO identifier.
## Not run: getGSE('GSE14308', destdir = 'cache') getGSE('GSE27112') getGSE('GSE53986') ## End(Not run)
## Not run: getGSE('GSE14308', destdir = 'cache') getGSE('GSE27112') getGSE('GSE53986') ## End(Not run)
Read Phantasus Config
getPhantasusConf( value = NULL, configName = Sys.getenv("R_CONFIG_ACTIVE"), file = file.path(tools::R_user_dir(package = "phantasus", which = "config"), "user.conf") )
getPhantasusConf( value = NULL, configName = Sys.getenv("R_CONFIG_ACTIVE"), file = file.path(tools::R_user_dir(package = "phantasus", which = "config"), "user.conf") )
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
read.gct(...)
read.gct(...)
... |
parameters for phantasusLite:::readGct() call |
ExpressionSet object
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.
reparseCachedESs(destdir, mirrorPath = getPhantasusConf("geo_mirrors"))
reparseCachedESs(destdir, mirrorPath = getPhantasusConf("geo_mirrors"))
destdir |
Directory used for caching loaded Series files from GEO database. |
mirrorPath |
URL string which specifies the source of matrices. |
vector of previously cached GSE IDs
reparseCachedESs(destdir=tempdir(), "https://ftp.ncbi.nlm.nih.gov")
reparseCachedESs(destdir=tempdir(), "https://ftp.ncbi.nlm.nih.gov")
servePhantasus
starts http server handling phantasus static files
and opencpu server.
servePhantasus( host = getPhantasusConf("host"), port = getPhantasusConf("port"), staticRoot = getPhantasusConf("static_root"), preloadedDir = getPhantasusConf("preloaded_dir"), openInBrowser = TRUE, quiet = TRUE, background = FALSE )
servePhantasus( host = getPhantasusConf("host"), port = getPhantasusConf("port"), staticRoot = getPhantasusConf("static_root"), preloadedDir = getPhantasusConf("preloaded_dir"), openInBrowser = TRUE, quiet = TRUE, background = FALSE )
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) |
A handle to the server as returned by 'httpuv::startServer'
## Not run: s <- servePhantasus(background=FALSE) s$stop() ## End(Not run) httpuv::stopAllServers() # can be used if handle is lost
## Not run: s <- servePhantasus(background=FALSE) s$stop() ## End(Not run) httpuv::stopAllServers() # can be used if handle is lost
cache_root
using sources in file
.Setup phantasus.
Read user config file ( or create default one) and fill cache_root
using sources in file
.
setupPhantasus(setup_name = "default", file = confFile("setup.yml"))
setupPhantasus(setup_name = "default", file = confFile("setup.yml"))
setup_name |
name of config from |
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
write.gct(...)
write.gct(...)
... |
parameters for phantasusLite:::writeGct() call |
Result of the closing file (as in 'close()' function')