forked from velocyto-team/velocyto.R
-
Notifications
You must be signed in to change notification settings - Fork 0
/
global.velcoity.estimates.Rd
82 lines (58 loc) · 3.81 KB
/
global.velcoity.estimates.Rd
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/momentum_routines.R
\name{global.velcoity.estimates}
\alias{global.velcoity.estimates}
\title{Structure-based gene velocity estimation}
\usage{
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{
\item{emat}{- spliced (exonic) count matrix}
\item{nmat}{- unspliced (nascent) count matrix}
\item{vel}{- initial gene-relative velocity estimates (output of the gene.relative.velocity.estimates function)}
\item{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)}
\item{deltaT}{- amount of time to project the cell forward}
\item{smat}{- optional spanning read matrix (used in offset calculations)}
\item{kGenes}{- number of genes to use in evaluating trimmed mean of M values}
\item{kGenes.trim}{- number of genes to trim (from both ends)}
\item{smooth.kGenes}{- gene kNN pooling k value (used in the initial gene-relative fit)}
\item{kCells}{- number of k nearest neighbors (NN) to use in slope calculation smoothing}
\item{deltaT2}{- scaling of the projected difference vector (normally should be set to 1)}
\item{min.gene.conuts}{- minimum number of spliced reads/molecules that a gene should have}
\item{min.gene.cells}{- minimum number of cells in which a gene should be expressed}
\item{min.intron.length}{- minimum exon length}
\item{min.exon.length}{- minimum exon length}
\item{top.global.pearson.deviance}{- maximum deviance threshold to filter out genes with very high unsplied counts (likely due to other processes)}
\item{cellKNN}{- optional pre-calculated cell KNN matrix}
\item{cell.dist}{- cell distance to use in cell kNN pooling calculations}
\item{fit.quantile}{perform gamma fit on a top/bottom quantiles of expression magnitudes}
\item{zero.offset}{force gene offsets to be zero (default if smat is not supplied), otherwise estimated from the lower quantile or quantile fit}
\item{diagonal.quantiles}{whether diagonal quantile determination should be used (if fit.quantile is specified)}
\item{m.pcount}{- pseudocount to be used in M value calculations (defaults to 5)}
\item{plot.model.fit}{plot gamma values predicted by the structure-bsaed model as a function of gene-relative gamma estimates.}
\item{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)
}
\description{
Structure-based gene velocity estimation
}
\examples{
\dontrun{
# 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)
}
}