Title: | Plots used in the chevreulPlot package |
---|---|
Description: | Tools for plotting SingleCellExperiment objects in the chevreulPlot package. Includes functions for analysis and visualization of single-cell data. Supported by NIH grants R01CA137124 and R01EY026661 to David Cobrinik. |
Authors: | Kevin Stachelek [aut, cre] |
Maintainer: | Kevin Stachelek <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.99.34 |
Built: | 2025-02-28 03:03:52 UTC |
Source: | https://github.com/bioc/chevreulPlot |
cell cycle genes with paired expression represented by HGNC symbol
cc.genes.cyclone
cc.genes.cyclone
a list of dataframes with G1, G2, and S gene expression
G1 gene symbols
G2 gene symbols
S gene symbols
...
cyclone
Enframe Cluster Markers
enframe_markers(tbl)
enframe_markers(tbl)
tbl |
a tibble of marker genes |
a pivoted tibble of marker genes
Ensembl version used for build
ensembl_version
ensembl_version
An object of class character
of length 1.
# ensembl_version
# ensembl_version
Human (Homo sapiens) annotations based on genome assembly GRCH38 from Ensembl.
grch38
grch38
An object of class tbl_df
(inherits from tbl
, data.frame
) with 76062 rows and 9 columns.
Variables:
ensgene
entrez
symbol
chr
start
end
strand
biotype
description
http://ensembl.org/homo_sapiens
data("grch38") head(grch38)
data("grch38") head(grch38)
Lookup table for converting Human (Homo sapiens) Ensembl transcript IDs to gene IDs based on genome assembly GRCH38 from Ensembl.
grch38_tx2gene
grch38_tx2gene
An object of class tbl_df
(inherits from tbl
, data.frame
) with 277081 rows and 2 columns.
Variables:
enstxp
ensgene
http://ensembl.org/homo_sapiens
data(grch38_tx2gene) head(grch38_tx2gene)
data(grch38_tx2gene) head(grch38_tx2gene)
Homologs drawn from Biomart
human_to_mouse_homologs
human_to_mouse_homologs
A data frame with 23188 rows and 2 columns
human gene symbols
mouse gene symbols
...
bioMart
Plot Annotated Complexheatmap from SingleCellExperiment object
make_complex_heatmap( object, features = NULL, group.by = "ident", cells = NULL, assayName = "logcounts", experiment = NULL, group.bar.height = 0.01, column_split = NULL, col_arrangement = "ward.D2", mm_col_dend = 30, ... )
make_complex_heatmap( object, features = NULL, group.by = "ident", cells = NULL, assayName = "logcounts", experiment = NULL, group.bar.height = 0.01, column_split = NULL, col_arrangement = "ward.D2", mm_col_dend = 30, ... )
object |
A SingleCellExperiment object |
features |
Vector of features to plot. Features can come |
group.by |
Name of one or more metadata columns to annotate columns by (for example, orig.ident) |
cells |
Cells to retain |
assayName |
"counts" for raw data "scale.data" for log-normalized data |
experiment |
experiment to display |
group.bar.height |
height for group bars |
column_split |
whether to split columns by metadata value |
col_arrangement |
how to arrange columns whether with a dendrogram (Ward.D2, average, etc.) or exclusively by metadata category |
mm_col_dend |
height of column dendrogram |
... |
additional arguments passed to Heatmap |
a complexheatmap
data("tiny_sce") make_complex_heatmap(tiny_sce)
data("tiny_sce") make_complex_heatmap(tiny_sce)
plot expression all transcripts for an input gene superimposed on embedding
plot_all_transcripts( object, features, embedding = "UMAP", from_gene = TRUE, ... )
plot_all_transcripts( object, features, embedding = "UMAP", from_gene = TRUE, ... )
object |
A object |
features |
gene or vector of transcripts |
embedding |
umap |
from_gene |
whether to look up transcripts for an input gene |
... |
additional arguments passed to plot_feature_on_embedding |
a list of embedding plots colored by a feature of interest
data("tiny_sce") plot_all_transcripts(tiny_sce, "NRL", from_gene = TRUE)
data("tiny_sce") plot_all_transcripts(tiny_sce, "NRL", from_gene = TRUE)
Draw a box plot for read count data of a metadata variable
plot_colData_histogram( object, group_by = NULL, fill_by = NULL, yscale = "linear", return_plotly = FALSE )
plot_colData_histogram( object, group_by = NULL, fill_by = NULL, yscale = "linear", return_plotly = FALSE )
object |
A object |
group_by |
Metadata variable to plot. Default set to "nCount_RNA" |
fill_by |
Variable to color bins by. Default set to "batch" |
yscale |
Scale of y axis. Default set to "linear" |
return_plotly |
whether to return an interactive plotly plot |
a histogram of read counts
data(small_example_dataset) small_example_dataset <- sce_calcn(small_example_dataset) # static plot plot_colData_histogram((small_example_dataset), return_plotly = FALSE)
data(small_example_dataset) small_example_dataset <- sce_calcn(small_example_dataset) # static plot plot_colData_histogram((small_example_dataset), return_plotly = FALSE)
Plots static or interactive plot where each point represents a cell metadata variable whose position on the map depends on cell embeddings determined by the reduction technique used
plot_colData_on_embedding( object, group = "batch", embedding = "UMAP", dims = c(1, 2), highlight = NULL, return_plotly = FALSE, ... )
plot_colData_on_embedding( object, group = "batch", embedding = "UMAP", dims = c(1, 2), highlight = NULL, return_plotly = FALSE, ... )
object |
A SingleCellExperiment object |
group |
Name of one or more metadata columns to group (color) cells by |
embedding |
The dimensional reduction technique to be used |
dims |
Dimensions to plot, must be a two-length numeric vector |
highlight |
A list of vectors of cells to highlight |
return_plotly |
Convert plot to interactive web-based graph |
... |
extra parameters passed to ggplot |
a ggplot
data(small_example_dataset) # static mode plot_colData_on_embedding(small_example_dataset, "Mutation_Status", return_plotly = FALSE)
data(small_example_dataset) # static mode plot_colData_on_embedding(small_example_dataset, "Mutation_Status", return_plotly = FALSE)
Plots gene or transcript expression overlaid on a given embedding.
plot_feature_on_embedding( object, embedding = c("UMAP", "PCA", "TSNE"), features, dims = c(1, 2), return_plotly = FALSE, ... )
plot_feature_on_embedding( object, embedding = c("UMAP", "PCA", "TSNE"), features, dims = c(1, 2), return_plotly = FALSE, ... )
object |
A SingleCellExperiment object |
embedding |
Dimensional reduction technique to be used |
features |
Feature to plot |
dims |
Dimensions to plot, must be a two-length numeric vector |
return_plotly |
return plotly object |
... |
additional arguments passed to plotReduceDim |
an embedding colored by a feature of interest
data(small_example_dataset) plot_feature_on_embedding(small_example_dataset, embedding = "UMAP", features = "Gene_0001")
data(small_example_dataset) plot_feature_on_embedding(small_example_dataset, embedding = "UMAP", features = "Gene_0001")
Plot BigWig coverage for genes of interest colored by a given variable
plot_gene_coverage_by_var( genes_of_interest = "NRL", cell_metadata, bigwig_tbl, group_by = "batch", values_of_interest = NULL, organism = c("human", "mouse"), edb = NULL, heights = c(3, 1), scale_y = "log10", reverse_x = FALSE, start = NULL, end = NULL, summarize_transcripts = FALSE, ... )
plot_gene_coverage_by_var( genes_of_interest = "NRL", cell_metadata, bigwig_tbl, group_by = "batch", values_of_interest = NULL, organism = c("human", "mouse"), edb = NULL, heights = c(3, 1), scale_y = "log10", reverse_x = FALSE, start = NULL, end = NULL, summarize_transcripts = FALSE, ... )
genes_of_interest |
Gene of interest |
cell_metadata |
a dataframe with cell metadata from object |
bigwig_tbl |
a tibble with colnames "name", "bigWig", and "sample_id" matching the filename, absolute path, and sample name of each cell in the cell_metadata |
group_by |
Variable to color by |
values_of_interest |
values of interest |
organism |
human (default) or mouse |
edb |
ensembldb object |
heights |
The heights of each row in the grid of plot |
scale_y |
whether to scale coverage |
reverse_x |
whether to reverse x axis |
start |
start coordinates |
end |
end coordinates |
summarize_transcripts |
whether to summarize transcript counts |
... |
extra arguments passed to plotCoverageFromEnsembldb |
a ggplot with coverage faceted by group_by
Plot a dot plot of n marker features grouped by cell metadata available methods are wilcoxon rank-sum test
plot_marker_features( object, group_by = "batch", num_markers = 5, selected_values = NULL, return_plotly = FALSE, marker_method = "wilcox", experiment = "gene", hide_technical = NULL, unique_markers = FALSE, p_val_cutoff = 1, ... )
plot_marker_features( object, group_by = "batch", num_markers = 5, selected_values = NULL, return_plotly = FALSE, marker_method = "wilcox", experiment = "gene", hide_technical = NULL, unique_markers = FALSE, p_val_cutoff = 1, ... )
object |
a object |
group_by |
the metadata variable from which to pick clusters |
num_markers |
default is 5 |
selected_values |
selected values to display |
return_plotly |
whether to return an interactive plotly plot |
marker_method |
"wilcox" |
experiment |
experiment to plot default gene |
hide_technical |
whether to exclude mitochondrial or ribosomal genes |
unique_markers |
whether to plot only unique marker genes for group |
p_val_cutoff |
cutoff for p value display |
... |
extra parameters passed to ggplot2 |
a ggplot with marker genes from group_by
data(small_example_dataset) plot_marker_features(small_example_dataset, group_by = "gene_snn_res.1")
data(small_example_dataset) plot_marker_features(small_example_dataset, group_by = "gene_snn_res.1")
plot the proportion of reads of a given gene map to each transcript
plot_transcript_composition( object, gene_symbol, group.by = "batch", standardize = FALSE, drop_zero = FALSE )
plot_transcript_composition( object, gene_symbol, group.by = "batch", standardize = FALSE, drop_zero = FALSE )
object |
A object |
gene_symbol |
Gene symbol of gene of interest |
group.by |
Name of one or more metadata columns to annotate columns by (for example, orig.ident) |
standardize |
whether to standardize values |
drop_zero |
Drop zero values |
a stacked barplot of transcript counts
data(tiny_sce) plot_transcript_composition(tiny_sce, "NRL")
data(tiny_sce) plot_transcript_composition(tiny_sce, "NRL")
Plots a Violin plot of a single data (gene expression, metrics, etc.) grouped by a metadata variable
plot_violin( object, group_by = "batch", plot_vals = NULL, features = "NRL", experiment = "gene", ... )
plot_violin( object, group_by = "batch", plot_vals = NULL, features = "NRL", experiment = "gene", ... )
object |
A SingleCellExperiment object |
group_by |
Variable to group (color) cells by |
plot_vals |
plot values |
features |
Features to plot |
experiment |
Name of experiment to use, defaults to active experiment |
... |
extra parameters passed to ggplot2 |
a violin plot
data("tiny_sce") plot_violin(tiny_sce, "Prep.Method", features = "NRL")
data("tiny_sce") plot_violin(tiny_sce, "Prep.Method", features = "NRL")
Change settings of a plotly plot
plotly_settings(plotly_plot, width = 600, height = 700)
plotly_settings(plotly_plot, width = 600, height = 700)
plotly_plot |
A plotly plot |
width |
Default set to '600' |
height |
Default set to '700' |
a plotly plot with altered settings
created with scuttle::mockSCE
small_example_dataset
small_example_dataset
An SCE with 200 cells and 1000 genes
scuttle::mockSCE
subset to only NRL from chevreuldata::human_gene_transcript_sce()
tiny_sce
tiny_sce
An SCE with only expression of NRL gene and NRL transripts
chevreuldata::human_gene_transcript_sce()