PairCells.Rd
This function will create the pairs of cells between different modalities based on
the integrated data generated by CoembedData
.
It was modified from https://github.com/buenrostrolab/stimATAC_analyses_code/blob/master/R/optMatching_functions.R
to use Seurat object as input.
Author: Vinay Kartha, Yan Hu
Contact: <vinay_kartha@g.harvard.edu>
Affiliation: Buenrostro Lab, Department of Stem Cell and Regenerative Biology, Harvard University
PairCells(
object,
reduction = NULL,
pair.by = NULL,
ident1 = "ATAC",
ident2 = "RNA",
assay = "RNA",
pair.mode = "greedy",
tol = 1e-04,
search.range = 0.2,
max.multimatch = 5,
min_subgraph_size = 50,
seed = 42,
k = 300
)
The integrated Seurat object generated by the function CoembedData
Dimensional reduction to use for the pairing cells
Name of one metadata column to split the object for pairing;
Specify how to split the object, must be an value of pair.by
Specify how to split the object, must be an value of pair.by
Assay name based on which a KNN graph is constructed
Pair mode. Available options are: "greedy" and "geodesic".
Tol times the number of subjects to be matched specifies the extent to which fullmatch's
This determines the size of the search knn. search_range * total number of cells = size of knn.
Maximum number of cells allowed to be matched to each cell
Minimum number of cells (ATAC/RNA each) needed for pairing in a given subgraph. Will skip subgraphs with fewer than these cells
Random seed
k-NN parameter used for applying constraints on ATAC-RNA pairs
A data frame containing the cell pairs
if (FALSE) {
df.pair <- PairCells(
object = obj.coembed,
reduction = "harmony",
pair.by = "tech",
ident1 = "ATAC",
ident2 = "RNA"
)
}