knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of DeconvoBuddies
is to provide helper functions for the deconvolution process
Get the latest stable R
release from CRAN. Then install DeconvoBuddies
using from Bioconductor the following code:
if (!requireNamespace("BiocManager", quietly = TRUE)) { install.packages("BiocManager") } BiocManager::install("DeconvoBuddies")
And the development version from GitHub with:
BiocManager::install("LieberInstitute/DeconvoBuddies")
library("DeconvoBuddies") library("dplyr") library("ggplot2") library("SingleCellExperiment")
Get mean ratios for each gene x cell type
ratios <- get_mean_ratio2(sce.test) fc <- findMarkers_1vAll(sce.test) (marker_stats <- left_join(ratios, fc, by = c("gene", "cellType.target")))
cell_types <- levels(sce.test$cellType) cell_colors <- create_cell_colors(cell_types = cell_types, pallet = "classic", split = "\\.", preview = TRUE)
sce_symbol <- sce.test rownames(sce_symbol) <- rowData(sce.test)$Symbol plot_gene_express(sce = sce_symbol, genes = c("RNF220", "CSF3R"))
plot_marker_express(sce.test, marker_stats, "Astro", n_genes = 5, rank_col = "rank_ratio", anno_col = "anno_ratio", color_pal = cell_colors )
pd <- SummarizedExperiment::colData(rse_bulk_test) %>% as.data.frame() est_prop_long <- est_prop %>% tibble::rownames_to_column("RNum") %>% tidyr::pivot_longer(!RNum, names_to = "cell_type", values_to = "prop") %>% dplyr::left_join(pd %>% dplyr::select(RNum, Dx)) %>% dplyr::mutate(a = "a") plot_composition_bar(est_prop_long) plot_composition_bar(est_prop_long, x_col = "Dx") plot_composition_bar(est_prop_long, x_col = "Dx", min_prop_text = 0.1)
Below is the citation output from using citation('DeconvoBuddies')
in R. Please
run this yourself to check for any updates on how to cite DeconvoBuddies.
print(citation("DeconvoBuddies"), bibtex = TRUE)
Please note that the DeconvoBuddies
was only made possible thanks to many other R and bioinformatics software authors, which are cited either in the vignettes and/or the paper(s) describing this package.
Please note that the DeconvoBuddies
project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
r BiocStyle::CRANpkg('usethis')
, r BiocStyle::CRANpkg('remotes')
, and r BiocStyle::CRANpkg('rcmdcheck')
customized to use Bioconductor's docker containers and r BiocStyle::Biocpkg('BiocCheck')
.r BiocStyle::CRANpkg('covr')
.r BiocStyle::CRANpkg('pkgdown')
.r BiocStyle::CRANpkg('styler')
.r BiocStyle::CRANpkg('devtools')
and r BiocStyle::CRANpkg('roxygen2')
.For more details, check the dev
directory.
This package was developed using r BiocStyle::Biocpkg('biocthis')
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.