get_nonself: Get self-nonself distances

View source: R/get_nonself.R

get_nonselfR Documentation

Get self-nonself distances

Description

Return the distance matrix with all self-self distances replaced with NAs (and so just containing the self-self distances).

Usage

get_nonself(d)

Arguments

d

A distance matrix

Value

The input distance matrix with all self-self distances replaced with NAs.

See Also

get_self(), get_best(), get_2ndbest()

Examples

# align rows in the provided dataset, lineup2ex
aligned <- align_matrix_rows(lineup2ex$gastroc, lineup2ex$islet)
# find correlated columns
selected_genes <- (corr_betw_matrices(aligned[[1]], aligned[[2]], "paired") > 0.75)
# calculate correlation between rows
similarity <- corr_betw_matrices(t(lineup2ex$gastroc[,selected_genes]),
                                 t(lineup2ex$islet[,selected_genes]), "all")
# pull out the non-self similarities
nonself <- get_nonself(similarity)


kbroman/lineup2 documentation built on May 16, 2023, 12:18 p.m.