Learn R Programming

DIEM

Remove debris-contaminated droplets from single-cell based data.

Installation

diem requires the following packages to be installed:

The diem package also makes use of the ggplot2 and scales packages for plotting.

Currently, we only support installation of the diem R package through devtools

library(devtools)
devtools::install_github("marcalva/diem")

Usage

Check out the vignette for a thorough tutorial on using diem.

Shown below is a quick workflow for reading 10X data, filtering droplets using default parameters, and converting to a seurat object

library(diem)
library(Seurat)
counts <- read_10x("path/to/10x")
sce <- create_SCE(counts)
sce <- diem(sce)
seur <- convert_to_seurat(sce)

Copy Link

Version

Install

install.packages('diem')

Monthly Downloads

5

Version

1.0

License

GPL-3

Maintainer

Marcus Alvarez

Last Published

November 15th, 2019

Functions in diem (1.0)

create_SCE

Create an SCE object from a sparse matrix
SCE-class

SCE
barcode_rank_plot

Create a barcode rank plot
e_step_mn

Computed expected log likelihood of multinomial mixture
dmultinom_sparse

Get log multinomial density of columns in a sparse matrix.
fill_counts

Fill information from raw counts
droplet_data

Return the droplet data from an SCE object
mb_small

Single-nucleus RNA-seq of mouse brain
em

EM function
read_10x

Read 10X counts data
norm_counts

Normalize counts of a sparse matrix
run_em

Run EM on counts to estimate multinomial mixture model
init_param

Initialize EM parameters given group assignments
get_var_genes

Get variable genes
filter_genes

Filter out lowly expressed genes
call_targets

Call clean droplets after running EM
get_knn

Get k-nearest neighbor graph
convert_to_seurat

Convert an SCE object to Seurat
get_removed_ids

Return IDs of removed droplets
plot_umi_gene_call

Scatterplot of genes vs. UMI counts, colored by call
initialize_clusters

Initialize clustering for EM
raw_counts

Return raw counts
set_cluster_set

Set droplets for cluster initialization
plot_umi_gene

Scatterplot of genes vs. UMI counts, colored by posterior probability
normalize_data

Normalize raw counts.
dmmn

Compute density of multinomial mixture for a matrix
get_gene_pct

Get percent of reads align to given gene(s)
divide_by_colsum

Divide elements of a column by the column's sum in a sparse matrix
get_clean_ids

Return IDs of clean droplets
m_step_mn

Maximize multinomial parameters in EM
set_debris_test_set

Set debris and test droplets
sum_log

sum of logs
gene_data

Return the gene data from an SCE object
fraction_log

fraction of logs
diem

Run DIEM pipeline