srtsim_count: Generate Data with Estimated Parameters

View source: R/SRTcount.R

srtsim_countR Documentation

Generate Data with Estimated Parameters

Description

Generate Data with Estimated Parameters

Usage

srtsim_count(
  simsrt,
  breaktie = "random",
  total_count_new = NULL,
  total_count_old = NULL,
  rrr = NULL,
  nn_num = 5,
  nn_func = c("mean", "median", "ransam"),
  numCores = 1,
  verbose = FALSE
)

Arguments

simsrt

A object with estimated parameters from fitting step

breaktie

A character string specifying how ties are treated. Same as the "tie.method" in rank function

total_count_new

The (expected) total number of reads or UMIs in the simulated count matrix.

total_count_old

The total number of reads or UMIs in the original count matrix.

rrr

The ratio applies to the gene-specific mean estimate, used for the fixing average sequencing depth simulation. Default is null. Its specification will override the specification of total_count_new and total_count_old.

nn_num

A integer of nearest neighbors, default is 5.

nn_func

A character string specifying how the psedo-count to be generated. options include 'mean','median' and 'ransam'.

numCores

The number of cores to use

verbose

Whether to show running information for srtsim_count

Value

Returns a SRTsim object with a newly generated count matrix

Examples


## Create a simSRT object
toySRT  <- createSRT(count_in=toyData$toyCount,loc_in = toyData$toyInfo)
set.seed(1)
## Estimate model parameters for data generation
toySRT <- srtsim_fit(toySRT,sim_schem="tissue")
## Generate synthetic data with estimated parameters
toySRT <- srtsim_count(toySRT)

## Explore the synthetic count matrix
simCounts(toySRT)[1:3,1:3]

SRTsim documentation built on Jan. 13, 2023, 5:12 p.m.