Returns summed counts of weighted.nn for each landmark cell within each sample.
GenerateSampleObject(
object,
nn.name = NULL,
k.nn = 5,
sketch.assay = "LANDMARK",
return.seurat = TRUE,
new_assay_name = "LMC",
group.by = "ident",
normalization.method = "ChiSquared",
scale.factor = 10000,
rename.group.by = NULL,
add.meta.data = TRUE,
cells.use = NULL,
verbose = TRUE,
...
)return a Seurat object that contains a count matrix with number of landmark as rows, sample as columns
Seurat object
Name of the Neighbor object to use for the calculation
(e.g. "weighted.nn" as produced by FindmmNN /
PrepareSampleObject, or "single.nn" as produced by
FindsmNN). If NULL (default), the function auto-detects
a Neighbor object named "weighted.nn" or "single.nn"; if both
are present it errors and asks you to specify this parameter.
the number of nearest neighbors to perform the summing
the name of the sketch.assay you used to perform the FindmmNN()
Whether to return the data as a Seurat object. Default is TRUE
Name for the new assay containing landmark counts
A single meta-data column to group cells by (e.g. Donor ID); 'ident' by default.
To group on a combination of columns, add a merged column to the object beforehand and pass
that, e.g. object$batch_rep <- paste(object$batch, object$replicate, sep = "_").
Method for normalization. Supports LogNormalize and ChiSquared. see details at
NormalizeData and NormalizeChiSquared
Scale factor for Log-Normalization, see NormalizeData
if rename.group.by is NULL, the rownames of the landmark matrix will used the original cell IDs. But, user can indicate which meta-data column to use to rename the rows. A suffix of "_LM" + order number will be added automatically.
if TRUE, the function will automatically detect sample-level meta-data (based on 'group.by') and append it to the sample-level object; if FALSE, it will not do so.
An optional character vector of cell names to subset before building the sample-level matrix. When non-NULL, only cells in this vector (that are also present in the NN object) are retained. Default is NULL (use all cells).
Print progress and diagnostic messages
Arguments to be passed to methods such as CreateSeuratObject