knnn: K-Nearest Neighbour Network

View source: R/knnn.R

knnnR Documentation

K-Nearest Neighbour Network

Description

This function creates a network with the k best neigbours of each genome (or pangenome). The network can be buid with the best neigbours with or without repetitions. The option repeats establish if the best k neigbours includes bi-directional links or not. Let be G_i and G_j two genomes, if G_i is one of the best k-neighbours of G_j and G_j is one of the best k-neighbours of G_i if the repeats option is TRUE then G_i is removed from the k-neighbour and substituted be the next best neighbour in other case G_i keeps in the list.

Usage

knnn(data, n_neigh, repeats = TRUE, threshold = 1)

Arguments

data

An Accnet or Mash object

n_neigh

The number of best K-Neighbours

repeats

Boolean Include repetitions?

threshold

Minimum value to create an edge.

Value

Returns an igraph object.


irycisBioinfo/PATO documentation built on Oct. 19, 2023, 3:07 p.m.