simSimpleCounts: Simulate simple counts matrix for the empty and...

View source: R/simulation.R

simSimpleCountsR Documentation

Simulate simple counts matrix for the empty and cell-containing droplets.

Description

Simulate simple counts matrix for the empty and cell-containing droplets.

Usage

simSimpleCounts(
  total_gene = 30000,
  nempty = 20000,
  nlarge = 2000,
  nsmall = 200,
  empty_prof = NULL,
  empty_ngene_rate = 0.05,
  empty_rate = 1/100,
  large_prof = NULL,
  large_ngene_rate = 0.8,
  large_shape = 6,
  large_scale = 500,
  small_prof = NULL,
  small_ngene_rate = 0.6,
  small_shape = 10,
  small_scale = 100,
  remove_zero_drop = TRUE,
  remove_zero_feature = TRUE,
  seed = 0
)

Arguments

total_gene

Total gene number for all the simulated counts.

nempty

Empty, large cell and small cell droplets number. If remove_zero_drop is TRUE, the final number may be smaller beacuse droplets that have all zero-valued counts will be removed.

nlarge

Empty, large cell and small cell droplets number. If remove_zero_drop is TRUE, the final number may be smaller beacuse droplets that have all zero-valued counts will be removed.

nsmall

Empty, large cell and small cell droplets number. If remove_zero_drop is TRUE, the final number may be smaller beacuse droplets that have all zero-valued counts will be removed.

empty_prof

The overall gene expression profile distribution. If provided, must be the same length with total_gene.

empty_ngene_rate

Rate of total genes expressed in each type of droplets.

empty_rate

Rate parameter of exponential distribution for 'Empty'.

large_prof

The overall gene expression profile distribution. If provided, must be the same length with total_gene.

large_ngene_rate

Rate of total genes expressed in each type of droplets.

large_shape

shape parameters in the GammaDist. shape*scale control the expected mean value of counts in large or small cells.

large_scale

scale parameters in the GammaDist. shape*scale^2 control the expected variance of counts in large or small cells.

small_prof

The overall gene expression profile distribution. If provided, must be the same length with total_gene.

small_ngene_rate

Rate of total genes expressed in each type of droplets.

small_shape

shape parameters in the GammaDist. shape*scale control the expected mean value of counts in large or small cells.

small_scale

scale parameters in the GammaDist. shape*scale^2 control the expected variance of counts in large or small cells.

remove_zero_drop

Whether to remove all zero-valued droplets.

remove_zero_feature

Whether to remove all zero-valued features.

seed

Random seed used in simulation. Default is 0.

Value

A sparse Matrix of class "dgCMatrix".

Examples

counts <- simSimpleCounts()
counts

zh542370159/dropSplit documentation built on June 19, 2022, 2:49 p.m.