global.velcoity.estimates: Structure-based gene velocity estimation

Description Usage Arguments Value Examples

View source: R/momentum_routines.R

Description

Structure-based gene velocity estimation

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
global.velcoity.estimates(
  emat,
  nmat,
  vel,
  base.df,
  deltaT = 1,
  smat = NULL,
  kGenes = 15,
  kGenes.trim = 5,
  smooth.kGenes = 0,
  kCells = 10,
  deltaT2 = 1,
  min.gene.conuts = 100,
  min.gene.cells = 20,
  min.intron.length = 10^3.5,
  min.exon.length = 10^2.7,
  top.global.pearson.deviance = 3,
  cellKNN = NULL,
  cell.dist = NULL,
  fit.quantile = NULL,
  zero.offset = NULL,
  diagonal.quantiles = FALSE,
  m.pcount = 5,
  plot.model.fit = FALSE,
  n.cores = defaultNCores()
)

Arguments

emat

- spliced (exonic) count matrix

nmat

- unspliced (nascent) count matrix

vel

- initial gene-relative velocity estimates (output of the gene.relative.velocity.estimates function)

base.df

gene structure information data frame ($gene.df in output of read.gene.mapping.info()), containing the following columns ($il - total intronic length in log10(length+1) scale; $el - total exonic length; $nex - number of expressed (above some low threshold) exons; as well as optional $nipconc/$nipdisc giving number of concordant and discordant internal priming sites)

deltaT

- amount of time to project the cell forward

smat

- optional spanning read matrix (used in offset calculations)

kGenes

- number of genes to use in evaluating trimmed mean of M values

kGenes.trim

- number of genes to trim (from both ends)

smooth.kGenes

- gene kNN pooling k value (used in the initial gene-relative fit)

kCells

- number of k nearest neighbors (NN) to use in slope calculation smoothing

deltaT2

- scaling of the projected difference vector (normally should be set to 1)

min.gene.conuts

- minimum number of spliced reads/molecules that a gene should have

min.gene.cells

- minimum number of cells in which a gene should be expressed

min.intron.length

- minimum exon length

min.exon.length

- minimum exon length

top.global.pearson.deviance

- maximum deviance threshold to filter out genes with very high unsplied counts (likely due to other processes)

cellKNN

- optional pre-calculated cell KNN matrix

cell.dist

- cell distance to use in cell kNN pooling calculations

fit.quantile

perform gamma fit on a top/bottom quantiles of expression magnitudes

zero.offset

force gene offsets to be zero (default if smat is not supplied), otherwise estimated from the lower quantile or quantile fit

diagonal.quantiles

whether diagonal quantile determination should be used (if fit.quantile is specified)

m.pcount

- pseudocount to be used in M value calculations (defaults to 5)

plot.model.fit

plot gamma values predicted by the structure-bsaed model as a function of gene-relative gamma estimates.

n.cores

- number of cores to use

Value

a list with velocity results, including the current normalized expression state ($current), projected ($projected), unscaled transcriptional change ($deltaE), fit results ($ko, $sfit), optional cell pooling parameters ($cellKNN, $kCells), kNN-convolved normalized matrices (conv.nmat.norm and conv.emat.norm)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
 # emat / nmat are the spliced/unpsliced matrices respectively
 # rvel is a gene-relative velocity estimate
 # base.df (here dat$base.df) is a gene information table.
 #   For SMART-seq2, it is part of the \code{\link{read.smartseq2.bams}} output.
 #   For droplet data, this info can be obtained \code{\link{}}
 gvel <- global.velcoity.estimates(emat, nmat, rvel, dat$base.df, deltaT=1, kCells=5,
       kGenes = 15, kGenes.trim = 5, min.gene.cells = 0, min.gene.conuts = 500)


## End(Not run)

sqjin/nlvelo documentation built on Feb. 11, 2021, 8:09 a.m.