construct_new_graph: Construct a new graph for a ClusterSet object

View source: R/gene_clustering.R

construct_new_graphR Documentation

Construct a new graph for a ClusterSet object

Description

This function constructs a new graph for a given ClusterSet object based on selected genes. The graph is constructed using the Density K-Nearest Neighbor (DKNN) method.

Usage

construct_new_graph(object = NULL, k = 5, output_path = NULL, name = NULL)

Arguments

object

A ClusterSet object.

k

The number of nearest neighbors to consider for each gene.

output_path

a character indicating the path where the output files will be stored.

name

a character string giving the name for the output files. If NULL, a random name is generated.

Value

A ClusterSet object.

Examples

# Set verbosity to 1 to display info messages only.
set_verbosity(1)

# Create a matrix with 4 signatures
m <- create_4_rnd_clust()

# Select informative features
res <- select_genes(m[1:600,],
                    distance = "pearson",
                    k = 75,
                    noise_level = 0.3,
                    fdr = 1e-8,
                    row_sum = -Inf)
                    
# Construct a new graph based on genes selected with select_genes()
res <- construct_new_graph(object = res, k = 5)

dputhier/scigenex documentation built on Jan. 29, 2024, 3:40 p.m.