Append projects to database
append_to_project_db( new_project_path, cache_location = "~/.cache/chevreul", sqlite_db = "single-cell-projects.db", verbose = TRUE )
append_to_project_db( new_project_path, cache_location = "~/.cache/chevreul", sqlite_db = "single-cell-projects.db", verbose = TRUE )
new_project_path |
new project path |
cache_location |
Path to cache "~/.cache/chevreul" |
sqlite_db |
sqlite db |
verbose |
print messages |
a sqlite database with SingleCellExperiment objects
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
Create a shiny app for a project on disk
chevreulApp( preset_project, appTitle = "chevreul", organism_type = "human", futureMb = 13000, db_name = "single-cell-projects.db" )
chevreulApp( preset_project, appTitle = "chevreul", organism_type = "human", futureMb = 13000, db_name = "single-cell-projects.db" )
preset_project |
A preloaded project to start the app with |
appTitle |
A title of the App |
organism_type |
human or mouse |
futureMb |
amount of Mb allocated to future package |
db_name |
sqlite database with list of saved SingleCellExperiment objects |
a shiny app
Uses a list of projects to create a matrix of single cell projects
create_proj_matrix(proj_list)
create_proj_matrix(proj_list)
proj_list |
List of projects |
a tibble of single cell projects
Create a database containing chevreulShiny projects
create_project_db( cache_location = "~/.cache/chevreul", sqlite_db = "single-cell-projects.db", verbose = TRUE )
create_project_db( cache_location = "~/.cache/chevreul", sqlite_db = "single-cell-projects.db", verbose = TRUE )
cache_location |
Path to cache "~/.cache/chevreul" |
sqlite_db |
Database to be created |
verbose |
print messages |
a sqlite database with SingleCellExperiment objects
Ensembl version used for build
ensembl_version
ensembl_version
An object of class character
of length 1.
# ensembl_version
# ensembl_version
Get transcript ids in objects for one or more gene of interest
get_transcripts_from_sce(object, gene)
get_transcripts_from_sce(object, gene)
object |
A SingleCellExperiment object |
gene |
Gene of interest |
transcripts constituting a gene of interest in a SingleCellExperiment object
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
Collate list of variables to be plotted
list_plot_types(object)
list_plot_types(object)
object |
a SingleCellExperiment object |
plot_types a list of category_vars or continuous_vars
data(small_example_dataset) list_plot_types(small_example_dataset)
data(small_example_dataset) list_plot_types(small_example_dataset)
Load SingleCellExperiment Files from a single project path
load_alabaster_from_proj(proj_dir, ...)
load_alabaster_from_proj(proj_dir, ...)
proj_dir |
project directory |
... |
extra args passed to load_alabaster_path |
a SingleCellExperiment object
Read in Gene and Transcript SingleCellExperiment Objects
load_alabaster_path(proj_dir = getwd(), prefix = "unfiltered")
load_alabaster_path(proj_dir = getwd(), prefix = "unfiltered")
proj_dir |
path to project directory |
prefix |
default "unfiltered" |
a SingleCellExperiment object
Load a tibble of bigwig file paths by cell id
load_bigwigs(object, bigwig_db = "~/.cache/chevreul/bw-files.db")
load_bigwigs(object, bigwig_db = "~/.cache/chevreul/bw-files.db")
object |
A object |
bigwig_db |
Sqlite database of bigwig files |
a vector of bigwigs file paths
Make Bigwig Database
make_bigwig_db( new_project = NULL, cache_location = "~/.cache/chevreul/", sqlite_db = "bw-files.db" )
make_bigwig_db( new_project = NULL, cache_location = "~/.cache/chevreul/", sqlite_db = "bw-files.db" )
new_project |
Project directory |
cache_location |
Path to cache "~/.cache/chevreul" |
sqlite_db |
sqlite db containing bw files |
a sqlite database of bigwig files for cells in a SingleCellExperiment object
Cleans names of objects provided in a vector form
make_chevreul_clean_names(myvec)
make_chevreul_clean_names(myvec)
myvec |
A vector of object names |
a clean vector of object names
data(small_example_dataset) make_chevreul_clean_names(colnames( get_colData(small_example_dataset)))
data(small_example_dataset) make_chevreul_clean_names(colnames( get_colData(small_example_dataset)))
Retrieve Metadata from Batch
metadata_from_batch( batch, projects_dir = "/dataVolume/storage/single_cell_projects", db_path = "single-cell-projects.db" )
metadata_from_batch( batch, projects_dir = "/dataVolume/storage/single_cell_projects", db_path = "single-cell-projects.db" )
batch |
batch |
projects_dir |
path to project dir |
db_path |
path to .db file |
a tibble with cell level metadata from a SingleCellExperiment object
Create a minimal chevreulShiny app using SingleCellExperiment input
minimalChevreulApp( single_cell_sce = NULL, appTitle = NULL, organism_type = "human", futureMb = 13000, db_name = "single-cell-projects.db" )
minimalChevreulApp( single_cell_sce = NULL, appTitle = NULL, organism_type = "human", futureMb = 13000, db_name = "single-cell-projects.db" )
single_cell_sce |
a singlecell object |
appTitle |
a title for the app |
organism_type |
human or mouse |
futureMb |
the megabytes available for the future package |
db_name |
a database of bigwig files |
a minimal chevreulShiny app
if (interactive() ) { data("tiny_sce") minimalChevreulApp(tiny_sce) }
if (interactive() ) { data("tiny_sce") minimalChevreulApp(tiny_sce) }
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
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 settings changed
Reads database of chevreulShiny projects to a data frame
read_project_db( cache_location = "~/.cache/chevreul", sqlite_db = "single-cell-projects.db", verbose = TRUE )
read_project_db( cache_location = "~/.cache/chevreul", sqlite_db = "single-cell-projects.db", verbose = TRUE )
cache_location |
Path to cache "~/.cache/chevreul" |
sqlite_db |
sqlite db |
verbose |
print messages |
a tibble with SingleCellExperiment objects
Save object to
save_sce(object, prefix = "unfiltered", proj_dir = getwd())
save_sce(object, prefix = "unfiltered", proj_dir = getwd())
object |
a SingleCellExperiment object |
prefix |
a prefix for saving |
proj_dir |
path to a project directory |
a path to an rds file containing a SingleCellExperiment object
created with scuttle::mockSCE
small_example_dataset
small_example_dataset
An SCE with 200 cells and 1000 genes
scuttle::mockSCE
Subset the object using new colData
subset_by_colData(colData_path, object)
subset_by_colData(colData_path, object)
colData_path |
Path to new colData |
object |
A object |
a SingleCellExperiment object
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()
Unite metadata
unite_metadata(object, group_bys)
unite_metadata(object, group_bys)
object |
A SingleCellExperiment object |
group_bys |
A feature or variable to combine |
a SingleCellExperiment object with Idents formed from concatenation of group_bys
data(small_example_dataset) unite_metadata(small_example_dataset, "Mutation_Status")
data(small_example_dataset) unite_metadata(small_example_dataset, "Mutation_Status")
Add new/update existing projects to the database by recursing fully
update_project_db( projects_dir = NULL, cache_location = "~/.cache/chevreul", sqlite_db = "single-cell-projects.db", verbose = TRUE )
update_project_db( projects_dir = NULL, cache_location = "~/.cache/chevreul", sqlite_db = "single-cell-projects.db", verbose = TRUE )
projects_dir |
The project directory to be updated |
cache_location |
Path to cache "~/.cache/chevreul" |
sqlite_db |
sqlite db |
verbose |
print messages |
a sqlite database with SingleCellExperiment objects