svGene: Report spatially variable genes

View source: R/CTSV.R

svGeneR Documentation

Report spatially variable genes

Description

Report spatially variable genes

Usage

svGene(Q_val, thre.alpha = 0.05)

Arguments

Q_val

A G by 2K q-value matrix, where G is the number of genes and K is the number of cell types.

thre.alpha

numeric, a q-value threshold to control FDR less than thre.alpha.

Value

A list with a G by 2K 0-1 matrix and a list with names of SV genes in each cell type. The first K columns of the 0-1 matrix correspond to the coordinate of S_1, and the last K columns to the coordinate of S_2.

SV

A G by 2K 0-1 matrix. The first K columns correspond to the coordinate of S_1, the last K columns to the coordinate of S_2.

SVGene

A list with names of SV genes in each cell type.

Examples

library(CTSV)
# Simulate a Q value matrix
K <- 2 # cell-type number
G <- 10 # gene number
set.seed(1)
Q_val <-matrix(runif(G*K,0,0.1),G,K)
rownames(Q_val) <- paste0("gene",seq_len(G))
# detect SV genes
re <- svGene(Q_val,0.05)
#SV genes in each cell type:
re$SVGene

jingeyu/CTSV documentation built on July 11, 2022, 4:54 a.m.