-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathregistration_stats_pairwise.Rd
72 lines (65 loc) · 2.55 KB
/
registration_stats_pairwise.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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/registration_stats_pairwise.R
\name{registration_stats_pairwise}
\alias{registration_stats_pairwise}
\title{Spatial registration: compute pairwise statistics}
\usage{
registration_stats_pairwise(
sce_pseudo,
registration_model,
block_cor,
var_registration = "registration_variable",
var_sample_id = "registration_sample_id",
gene_ensembl = NULL,
gene_name = NULL
)
}
\arguments{
\item{sce_pseudo}{The output of \code{registration_pseudobulk()}.}
\item{registration_model}{The output from \code{registration_model()}.}
\item{block_cor}{A \code{numeric(1)} computed with \code{registration_block_cor()}.}
\item{var_registration}{A \code{character(1)} specifying the \code{colData(sce_pseudo)}
variable of interest against which will be used for computing the relevant
statistics.}
\item{var_sample_id}{A \code{character(1)} specifying the \code{colData(sce_pseudo)}
variable with the sample ID.}
\item{gene_ensembl}{A \code{character(1)} specifying the \code{rowData(sce_pseudo)}
column with the ENSEMBL gene IDs. This will be used by \code{layer_stat_cor()}.}
\item{gene_name}{A \code{character(1)} specifying the \code{rowData(sce_pseudo)}
column with the gene names (symbols).}
}
\value{
A \code{data.frame()} with the pairwise statistical results. This is
similar to \code{fetch_data("modeling_results")$pairwise}.
}
\description{
This function computes the gene pairwise t-statistics (one group > another,
for all combinations). These t-statistics can be used for spatial
registration with \code{layer_stat_cor()} and related functions. Although, they
are more typically used for identifying pairwise-marker genes.
}
\examples{
example("registration_block_cor", package = "spatialLIBD")
results_pairwise <- registration_stats_pairwise(sce_pseudo,
registration_mod, block_cor,
gene_ensembl = "ensembl", gene_name = "gene_name"
)
head(results_pairwise)
## Specifying `block_cor = NaN` then ignores the correlation structure
results_pairwise_nan <- registration_stats_pairwise(sce_pseudo,
registration_mod,
block_cor = NaN,
gene_ensembl = "ensembl", gene_name = "gene_name"
)
head(results_pairwise_nan)
}
\seealso{
Other spatial registration and statistical modeling functions:
\code{\link{registration_block_cor}()},
\code{\link{registration_model}()},
\code{\link{registration_pseudobulk}()},
\code{\link{registration_stats_anova}()},
\code{\link{registration_stats_enrichment}()},
\code{\link{registration_wrapper}()}
}
\concept{spatial registration and statistical modeling functions}