| Title: | Search, download and visualise datasets from EMBL-EBI Expression Atlas and Single-Cell Expression Atlas |
|---|---|
| Description: | This package is for searching for datasets in EMBL-EBI Expression Atlas, and downloading them into R for further analysis. Each Expression Atlas dataset is represented as a SimpleList object with one element per platform. Sequencing data is contained in a SummarizedExperiment object, while microarray data is contained in an ExpressionSet or MAList object. SingleCellExperiment object is used for Single-Cell Expression Atlas datasets. |
| Authors: | Maria Keays [aut] (ORCID: <https://orcid.org/0000-0003-2034-601X>), Pedro Madrigal [aut] (ORCID: <https://orcid.org/0000-0003-1959-8199>), Anil Thanki [aut] (ORCID: <https://orcid.org/0000-0002-8941-444X>), Iris Yu [aut, cre] (ORCID: <https://orcid.org/0000-0003-3627-2393>), Renata Borisova [aut] (ORCID: <https://orcid.org/0009-0008-2011-3412>) |
| Maintainer: | Iris Yu <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 2.7.0 |
| Built: | 2026-11-24 03:06:04 UTC |
| Source: | https://github.com/bioc/ExpressionAtlas |
This is a SimpleList object containing dummy data from some Expression Atlas
experiments, to demonstrate a typical example of the reesults of using the
getAtlasData() function. The dummy data objects only contain the
first 10 rows of the real data, to save disk space. To get the real data,
download it using getAtlasData().
data( "allExps" )data( "allExps" )
A SimpleList with one element per Expression Atlas dataset.
This is a DataFrame object listing some Expression Atlas experiments, to
demonstrate a typical example of the results of using the
searchAtlasExperiments() function.
data( "atlasRes" )data( "atlasRes" )
A DataFrame with one row per Expression Atlas dataset.
This function generates a Dot-Plot from a SingleCellExperiment object coming from a Single-Cell Expression Atlas experiment.
dotPlotSCAtlasExperiment( singleCellExperiment, genes, sel.K=NULL, scaleNormExp=FALSE, geneLabel = c('name', 'id'), filename = 'sc-dotplot', save_pdf = FALSE, dot_theme = NULL )dotPlotSCAtlasExperiment( singleCellExperiment, genes, sel.K=NULL, scaleNormExp=FALSE, geneLabel = c('name', 'id'), filename = 'sc-dotplot', save_pdf = FALSE, dot_theme = NULL )
singleCellExperiment |
A SingleCellExperiment object from Single Cell Expression Atlas |
genes |
Vector of gene IDs to include in the dot-plot. |
sel.K |
Number of clusters for Single Cell Expression Atlas Experiment. If both |
scaleNormExp |
Logical indicating whether to scale normalized expression values, which adjusts the data to have a mean of zero and a standard deviation of one. Default is |
geneLabel |
Whether to plot with Gene IDs = 'id' or Gene names = 'name'. Default is 'name'. |
filename |
File name or path for the heatmap PDF. Defaults to
|
save_pdf |
Save PDF file with the heatmap. Default is |
dot_theme |
Allows user to put a list of ggplot2 components, such as themes, to be added before saving and returning the dot plot. e.g. dot_theme = list(ggplot2::theme_classic()) |
A Heatmap-class object from the ComplexHeatmap package. This object can be further customized or combined with other heatmaps using the ComplexHeatmap package's functions.
egeod6552 <- getAtlasSCExperiment( "E-GEOD-36552" ) dotPlotSCAtlasExperiment(egeod6552, genes=c('ENSG00000166681','ENSG00000178928', 'ENSG00000142182' , 'ENSG00000160282' ), sel.K=4, save_pdf = FALSE, dot_theme = NULL)egeod6552 <- getAtlasSCExperiment( "E-GEOD-36552" ) dotPlotSCAtlasExperiment(egeod6552, genes=c('ENSG00000166681','ENSG00000178928', 'ENSG00000142182' , 'ENSG00000160282' ), sel.K=4, save_pdf = FALSE, dot_theme = NULL)
This function downloads and returns differential expression analytics data for an Expression Atlas experiment, based on the ArrayExpress accession of the experiment.
getAnalyticsDifferentialAtlasExpression( experimentAccession )getAnalyticsDifferentialAtlasExpression( experimentAccession )
experimentAccession |
ArrayExpress experiment accession e.g. "E-MTAB-10104" |
A dataframe with p.value and log2foldchange values of the genes for each assay group contrast.
# Download the differential expression analytics data for experiment E-MTAB-10104 mtab10104_dea <- getAnalyticsDifferentialAtlasExpression( "E-MTAB-10104" ) # See the entries available dim(mtab10104_dea) # Prints out the following: # [1] 56748 10# Download the differential expression analytics data for experiment E-MTAB-10104 mtab10104_dea <- getAnalyticsDifferentialAtlasExpression( "E-MTAB-10104" ) # See the entries available dim(mtab10104_dea) # Prints out the following: # [1] 56748 10
This function downloads Expression Atlas experiment summary SimpleList objects based on a vector of ArrayExpress/BioStudies experiment accessions, and returns a list containing these objects.
getAtlasData( experimentAccessions )getAtlasData( experimentAccessions )
experimentAccessions |
Vector of ArrayExpress/BioStudies accessions for experiments to be downloaded. |
A list with one entry per experiment summary SimpleList object. Entries are named using the ArrayExpres/BioStudies accession of the respective experiment.
# Download some Expression Atlas data into a list. myExperimentSummaries <- getAtlasData( c( "E-GEOD-11175", "E-MTAB-3007", "E-GEOD-21070" ) )# Download some Expression Atlas data into a list. myExperimentSummaries <- getAtlasData( c( "E-GEOD-11175", "E-MTAB-3007", "E-GEOD-21070" ) )
This function downloads and returns a SimpleList object representing a single Expression Atlas experiment, based on the ArrayExpress accession of the experiment.
getAtlasExperiment( experimentAccession )getAtlasExperiment( experimentAccession )
experimentAccession |
ArrayExpress experiment accession e.g. "E-GEOD-11175" |
A SimpleList object representing a single Expression Atlas experiment. The SimpleList contains one entry per platform used in the experiment. For sequencing experiments, there is a single entry in the list. For microarray experiments, there is one entry per array design used. Currently Expression Atlas does not support multi-technology (e.g. microarray and RNA-seq) experiments.
For a single-channel microarray experiment, each entry of the list is an ExpressionSet object. For a sequencing experiment, the single entry is a SummarizedExperiment object. Please refer to the relevant documentation on these classes for more information about them.
RNA-seq data
Each SummarizedExperiment object contains the following:
Matrix of raw counts (not normalized), in the assays slot, in a counts element.
Sample annotations, in the colData slot.
Brief outline of methods, from QC of FASTQ files to production of raw counts, in the exptData slot.
Single-channel microarray data
Each ExpressionSet object contains the following:
Matrix of normalized intensity values, in the assayData, accessed via: exprs( expressionSet )
Sample annotations, in the phenoData, accessed via: pData( expressionSet )
Brief outline of normalization method applied, in the experimentData slot, accessed via: preproc( experimentData( expressionSet ) )
# Download the experiment summary for E-GEOD-11175 geod11175 <- getAtlasExperiment( "E-GEOD-11175" ) # See the entries available (in this case array design accessions) names( geod11175 ) # Prints out the following: # [1] "A-AFFY-126" # Get the only ExpressionSet object from this experiment. eset <- geod11175[[ "A-AFFY-126" ]]# Download the experiment summary for E-GEOD-11175 geod11175 <- getAtlasExperiment( "E-GEOD-11175" ) # See the entries available (in this case array design accessions) names( geod11175 ) # Prints out the following: # [1] "A-AFFY-126" # Get the only ExpressionSet object from this experiment. eset <- geod11175[[ "A-AFFY-126" ]]
This function downloads and returns a SingleCellExperiment object representing a Single-Cell Expression Atlas experiment. Windows users: Importing single-cell .h5ad files with getAtlasSCExperiment() may fail when setting up or using the Python environment required by zellkonverter. This can happen even if the file downloads successfully.
getAtlasSCExperiment( experimentAccession )getAtlasSCExperiment( experimentAccession )
experimentAccession |
Single-cell experiment accession e.g. "E-ENAD-19" |
A SingleCellExperiment object representing a single-Cell Expression Atlas experiment.
Each SCE object contains the following:
Assays, containing the raw counts (X), filtered counts (filtered), and normalised and filtered counts (normalised).
Column data (cell-level metadata)
Different dimensionality reductions (e.g. PCA, t-SNE, UMAP)
# Download the experiment summary for E-GEOD-11175 enad19 <- getAtlasSCExperiment( "E-ENAD-19" ) enad19 # Prints out the following: # # class: SingleCellExperiment # dim: 3644 26 # metadata(0): # assays(3): X filtered normalised # rownames: NULL # rowData names(1): PCs # colnames(26): ERR2192535 ERR2192536 ... ERR2192559 ERR2192560 # colData names(27): age cell_type ... louvain_resolution_1.0 # louvain_resolution_2.0 # reducedDimNames(21): X_pca X_tsne_perplexity_1 ... # X_umap_neighbors_n_neighbors_5 X_umap_neighbors_n_neighbors_50 # mainExpName: NULL # altExpNames(0):# Download the experiment summary for E-GEOD-11175 enad19 <- getAtlasSCExperiment( "E-ENAD-19" ) enad19 # Prints out the following: # # class: SingleCellExperiment # dim: 3644 26 # metadata(0): # assays(3): X filtered normalised # rownames: NULL # rowData names(1): PCs # colnames(26): ERR2192535 ERR2192536 ... ERR2192559 ERR2192560 # colData names(27): age cell_type ... louvain_resolution_1.0 # louvain_resolution_2.0 # reducedDimNames(21): X_pca X_tsne_perplexity_1 ... # X_umap_neighbors_n_neighbors_5 X_umap_neighbors_n_neighbors_50 # mainExpName: NULL # altExpNames(0):
This function downloads and returns normalised expression data for an Expression Atlas experiment, based on the ArrayExpress accession of the experiment. It also downloads markers file for an Expression Atlas experiment and takes ranking from there for marker genes.
getNormalisedAtlasExpression( experimentAccession, normalisation )getNormalisedAtlasExpression( experimentAccession, normalisation )
experimentAccession |
ArrayExpress experiment accession e.g. "E-MTAB-4045" |
normalisation |
Normalisation method type e.g. "tpm", "cpm" |
A dataframe with expression values of the genes for each assay group from normalised expressed data , mark gene rank amd tssue from markers file. Entries are mean values of replicates.
# Download the TPM Expression values for experiment E-MTAB-4045 mtab4045_tpm <- getNormalisedAtlasExpression( "E-MTAB-4045", "tpm" ) # See the entries available dim(mtab4045_tpm) # Prints out the following: # [1] 57147 45 # Download the CPM Expression values for experiment E-MTAB-4045 mtab4045_cpm <- getNormalisedAtlasExpression( "E-MTAB-4045", "cpm" ) # See the entries available dim(mtab4045_cpm) # Prints out the following: # [1] 57147 275# Download the TPM Expression values for experiment E-MTAB-4045 mtab4045_tpm <- getNormalisedAtlasExpression( "E-MTAB-4045", "tpm" ) # See the entries available dim(mtab4045_tpm) # Prints out the following: # [1] 57147 45 # Download the CPM Expression values for experiment E-MTAB-4045 mtab4045_cpm <- getNormalisedAtlasExpression( "E-MTAB-4045", "cpm" ) # See the entries available dim(mtab4045_cpm) # Prints out the following: # [1] 57147 275
This function generates a heatmap for an Expression Atlas experiment, from normalised expression data.
heatmapAtlasExperiment( df, filename = "heatmap", save_pdf = FALSE, show_plot = TRUE, palette = "viridis", markers = TRUE, gene_list = NULL, top_n = 100, scaled=FALSE, show_heatmap_title = TRUE, geneLabel = c('name', 'id'))heatmapAtlasExperiment( df, filename = "heatmap", save_pdf = FALSE, show_plot = TRUE, palette = "viridis", markers = TRUE, gene_list = NULL, top_n = 100, scaled=FALSE, show_heatmap_title = TRUE, geneLabel = c('name', 'id'))
df |
Dataframe in the output format of getNormalisedAtlasExpression. |
filename |
Filename for the output heatmap file. Default is "heatmap.pdf". |
save_pdf |
Save PDF file with the heatmap. Default is |
show_plot |
Show plot in the R console. Default is |
palette |
Viridis colour palette for the heatmap. Default is "viridis". Other options are: magma, plasma, inferno, cividis, rocket, mako, turbo |
markers |
Top ranked genes per tissue. Default is |
gene_list |
Gene list of user's choise. Can be ploted with top ranked genes when markers = TRUE. If markers = FALSE, will be plotting only genes from gene list. |
top_n |
Number of top most variable genes to be shown in the heatmap. Default is 100. |
scaled |
Scale the normalised gene expression data. Default is |
show_heatmap_title |
Whether to show a title in the heatmap. Default is |
geneLabel |
Whether to plot with GeneID = 'id' or Gene names = 'name'. Default is 'name'. |
A PDF file with the generated heatmap.
# Download the TPM Expression values for experiment E-MTAB-1733 mtab1733_tpm <- getNormalisedAtlasExpression( "E-MTAB-1733", "tpm" ) # Generate heatmap with default parameters heatmapAtlasExperiment( mtab1733_tpm, "heatmap", TRUE, FALSE, "viridis", TRUE, NULL, 100, FALSE, TRUE, 'name' ) # Check if the PDF file was created file.exists("heatmap.pdf") # Download the CPM Expression values for experiment E-MTAB-1733 with custom parameters mtab1733_cpm <- getNormalisedAtlasExpression( "E-MTAB-1733", "cpm" ) # Generate heatmap with default parameters heatmapAtlasExperiment( mtab1733_cpm, "E-MTAB-1733-cpm-heatmap", TRUE, FALSE, "viridis", TRUE, NULL, 100, FALSE, TRUE, 'name' ) # Check if the PDF file was created file.exists("E-MTAB-1733-cpm-heatmap.pdf")# Download the TPM Expression values for experiment E-MTAB-1733 mtab1733_tpm <- getNormalisedAtlasExpression( "E-MTAB-1733", "tpm" ) # Generate heatmap with default parameters heatmapAtlasExperiment( mtab1733_tpm, "heatmap", TRUE, FALSE, "viridis", TRUE, NULL, 100, FALSE, TRUE, 'name' ) # Check if the PDF file was created file.exists("heatmap.pdf") # Download the CPM Expression values for experiment E-MTAB-1733 with custom parameters mtab1733_cpm <- getNormalisedAtlasExpression( "E-MTAB-1733", "cpm" ) # Generate heatmap with default parameters heatmapAtlasExperiment( mtab1733_cpm, "E-MTAB-1733-cpm-heatmap", TRUE, FALSE, "viridis", TRUE, NULL, 100, FALSE, TRUE, 'name' ) # Check if the PDF file was created file.exists("E-MTAB-1733-cpm-heatmap.pdf")
This function plots a heatmap from a SingleCellExperiment object coming from a Single-Cell Expression Atlas experiment.
heatmapSCAtlasExperiment( singleCellExperiment, genes=NULL, sel.K=NULL, scaleNormExp=FALSE, show_row_names=FALSE, geneLabel = c('name', 'id'), filename = 'sc-heatmap', save_pdf = FALSE)heatmapSCAtlasExperiment( singleCellExperiment, genes=NULL, sel.K=NULL, scaleNormExp=FALSE, show_row_names=FALSE, geneLabel = c('name', 'id'), filename = 'sc-heatmap', save_pdf = FALSE)
singleCellExperiment |
A |
genes |
Vector of gene IDs to include in the heatmap. If |
sel.K |
Number of clusters for Single Cell Expression Atlas Experiment. If |
scaleNormExp |
Logical indicating whether to scale normalized expression values, which adjusts the data to have a mean of zero and a standard deviation of one. Default is |
show_row_names |
Logical indicating whether to show gene names in rows. Default is |
geneLabel |
Whether to plot with Gene IDs = 'id' or Gene names = 'name'. Default is 'name'. |
filename |
File name or path for the heatmap PDF. Defaults to
|
save_pdf |
Save the heatmap as a PDF. Defaults to |
A Heatmap-class object from the ComplexHeatmap package. This object can be further customized or combined with other heatmaps using the ComplexHeatmap package's functions.
egeod6552 <- getAtlasSCExperiment( "E-GEOD-36552" ) heatmap6552 <- heatmapSCAtlasExperiment( egeod6552, genes=NULL, sel.K=NULL, geneLabel = 'name', scaleNormExp=FALSE, show_row_names=FALSE ) # Example with a specific gene list heatmap6552_genes <- heatmapSCAtlasExperiment( egeod6552, genes=c('ENSG00000151611','ENSG00000020577', 'ENSG00000188869' ), sel.K=NULL, geneLabel = 'name', scaleNormExp=FALSE, show_row_names=TRUE, save_pdf = FALSE )egeod6552 <- getAtlasSCExperiment( "E-GEOD-36552" ) heatmap6552 <- heatmapSCAtlasExperiment( egeod6552, genes=NULL, sel.K=NULL, geneLabel = 'name', scaleNormExp=FALSE, show_row_names=FALSE ) # Example with a specific gene list heatmap6552_genes <- heatmapSCAtlasExperiment( egeod6552, genes=c('ENSG00000151611','ENSG00000020577', 'ENSG00000188869' ), sel.K=NULL, geneLabel = 'name', scaleNormExp=FALSE, show_row_names=TRUE, save_pdf = FALSE )
This function plots dimensionality reduction (PCA, t-sne, UMAP) of a SingleCellExperiment object representing a Single-Cell Expression Atlas experiment.
plotDimRedSCAtlasExperiment( sceObject, dimRed, colorby, filename = 'sc-dimred', save_pdf = FALSE, plot_layers = NULL)plotDimRedSCAtlasExperiment( sceObject, dimRed, colorby, filename = 'sc-dimred', save_pdf = FALSE, plot_layers = NULL)
sceObject |
Single-cell experiment object, representing a Single-Cell Expression Atlas experiment, obtained with the function |
dimRed |
Dimensionality reduction to plot. Options are: "X_pca", "X_tsne_perplexity_10", "X_umap_neighbors_20", etc. |
colorby |
Column name in |
filename |
File name or path for the heatmap PDF. Defaults to
|
save_pdf |
Save PDF file with the heatmap. Default is |
plot_layers |
Allows user to put a list of ggplot2 components, such as themes, to be added before saving and returning the dot plot. e.g. plot_layers = list(ggplot2::theme_classic()) |
A ggplot2 geom point visualisation, which can be further customised by the user.
# Example of plotting PCA dimensionality reduction colored by age # Download the experiment summary for E-ENAD-19 enad19 <- getAtlasSCExperiment( "E-ENAD-19" ) plotDimRedSCAtlasExperiment(enad19, dimRed = "X_pca", colorby = "age" )# Example of plotting PCA dimensionality reduction colored by age # Download the experiment summary for E-ENAD-19 enad19 <- getAtlasSCExperiment( "E-ENAD-19" ) plotDimRedSCAtlasExperiment(enad19, dimRed = "X_pca", colorby = "age" )
This is a SimpleList object containing dummy data from an RNA-seq Expression
Atlas experiment, to demonstrate a typical example of the results of using
the getAtlasData() function for a subset of results obtained using
searchAtlasExperiments. This object contains the first 10 rows of
the original data, to save disk space. To get the full dataset, download it
using getAtlasData().
data( "rnaseqExps" )data( "rnaseqExps" )
A SimpleList with one element per Expression Atlas dataset.
This function accepts a query, and optionally a secondary filter, and then searches for matching Expression Atlas experiments in the EBI RESTful Web Services API
searchAtlasExperiments( query, secondaryFilter = NULL, detailed = FALSE )searchAtlasExperiments( query, secondaryFilter = NULL, detailed = FALSE )
query |
Character of sample properties to search Atlas for. These can be biological characteristics, experimental treatments, species, etc. |
secondaryFilter |
Optional, a second filter. |
detailed |
If |
A DataFrame containing the Expression Atlas accessions, the species, experiment types, and titles of Expression Atlas experiments matching the query.
# Search for endoderm experiments (4 results) atlasRes_1 <- searchAtlasExperiments( query="endoderm") # Search for endoderm experiments in human (2 results) atlasRes_2 <- searchAtlasExperiments( query="endoderm", secondaryFilter = "human" ) # it produces same results as: # atlasRes_2 <- searchAtlasExperiments( query="human", secondaryFilter = "endoderm" ) # Download data for first experiment found. if ( nrow( atlasRes_2 ) == 1 ) { atlasData <- getAtlasData( atlasRes_2$Accession ) } else { atlasData <- getAtlasData( atlasRes_2$Accession[1] ) }# Search for endoderm experiments (4 results) atlasRes_1 <- searchAtlasExperiments( query="endoderm") # Search for endoderm experiments in human (2 results) atlasRes_2 <- searchAtlasExperiments( query="endoderm", secondaryFilter = "human" ) # it produces same results as: # atlasRes_2 <- searchAtlasExperiments( query="human", secondaryFilter = "endoderm" ) # Download data for first experiment found. if ( nrow( atlasRes_2 ) == 1 ) { atlasData <- getAtlasData( atlasRes_2$Accession ) } else { atlasData <- getAtlasData( atlasRes_2$Accession[1] ) }
This function accepts a query, and optionally a secondary filter, and then searches for matching Single-Cell Expression Atlas experiments in the EBI RESTful Web Services API. The function also performs ontology-based query search against the Single Cell Expression Atlas cell-type wheel.
searchSCAtlasExperiments( query, secondaryFilter = NULL )searchSCAtlasExperiments( query, secondaryFilter = NULL )
query |
Character of sample properties to search Atlas for. These can be biological characteristics, experimental treatments, species, etc. |
secondaryFilter |
Optional, a second filter. For instance, if the query is "lung", the secondary filter can be "human" to search for human lung experiments. |
A DataFrame containing the Expression Atlas accessions, the species, experiment types, and titles of Expression Atlas experiments matching the query.
# Search for pancreas experiments atlasRes_pancreas <- searchSCAtlasExperiments( query="pancreas") # Search for human lung experiments atlasRes_human_lung <- searchSCAtlasExperiments( query="lung", secondaryFilter = "human")# Search for pancreas experiments atlasRes_pancreas <- searchSCAtlasExperiments( query="pancreas") # Search for human lung experiments atlasRes_human_lung <- searchSCAtlasExperiments( query="lung", secondaryFilter = "human")
This function generates a volcano plots for an Expression Atlas experiment, from analytics data.
volcanoDifferentialAtlasExperiment( df, filename_prefix = "volcano-plot", save_png = FALSE, show_plot = TRUE, low_fc_colour = "gray", high_fc_colour = "blue", cutoff = 1, show_volcanoplot_title = TRUE )volcanoDifferentialAtlasExperiment( df, filename_prefix = "volcano-plot", save_png = FALSE, show_plot = TRUE, low_fc_colour = "gray", high_fc_colour = "blue", cutoff = 1, show_volcanoplot_title = TRUE )
df |
Dataframe in the output format of |
filename_prefix |
Filename for the output volcano plot images. Default is "volcano". |
save_png |
Save png file with the heatmap. Default is |
show_plot |
Show plot in the R console. Default is |
low_fc_colour |
Colour palette for the low foldchange. Default is "gray". |
high_fc_colour |
Colour palette for the high foldchange. Default is "blue". |
cutoff |
cutoff for the foldchange. Default is 1. |
show_volcanoplot_title |
Whether to show a title in the volcano plot. Default is |
Image file(s) with the generated volcano plots.
# Download the differential expression analytics data for experiment E-MTAB-10104 mtab10104_dea <- getAnalyticsDifferentialAtlasExpression( "E-MTAB-10104" ) # Generate volcano plots with default parameters volcanoDifferentialAtlasExperiment( mtab10104_dea ) # Generate volcano plots with custom parameters volcanoDifferentialAtlasExperiment( mtab10104_dea, "E-MTAB-10104", FALSE, TRUE, "Gray", "Blue", 1, TRUE )# Download the differential expression analytics data for experiment E-MTAB-10104 mtab10104_dea <- getAnalyticsDifferentialAtlasExpression( "E-MTAB-10104" ) # Generate volcano plots with default parameters volcanoDifferentialAtlasExperiment( mtab10104_dea ) # Generate volcano plots with custom parameters volcanoDifferentialAtlasExperiment( mtab10104_dea, "E-MTAB-10104", FALSE, TRUE, "Gray", "Blue", 1, TRUE )