Learn R Programming

rliger (version 1.0.1)

calcAlignmentPerCluster: Calculate alignment for each cluster

Description

Returns alignment for each cluster in analysiss (see documentation for calcAlignment).

Usage

calcAlignmentPerCluster(object, rand.seed = 1, k = NULL, by.dataset = FALSE)

Value

Vector of alignment statistics (with names of clusters).

Arguments

object

liger object. Should call quantile_norm before calling.

rand.seed

Random seed for reproducibility (default 1).

k

Number of nearest neighbors in calculating alignment (see calcAlignment for default). Can pass in single value or vector with same length as number of clusters.

by.dataset

Return alignment calculated for each dataset in cluster (default FALSE).

Examples

Run this code
ligerex <- createLiger(list(ctrl = ctrl, stim = stim))
ligerex <- normalize(ligerex)
ligerex <- selectGenes(ligerex)
ligerex <- scaleNotCenter(ligerex)
# Specification for minimal example run time, not converging
ligerex <- optimizeALS(ligerex, k = 5, max.iters = 1)
ligerex <- quantile_norm(ligerex)
agreement <- calcAlignmentPerCluster(ligerex)

Run the code above in your browser using DataLab