read.edges: Makes a graph object based on sequence data and pairwise...

View source: R/graph-setup.R

read.edgesR Documentation

Makes a graph object based on sequence data and pairwise comparisons

Description

Create an implementation of a graph. This is a list, consisting of a node list including metadata (seq.info) and an edge list (edge.info). Any new sequences are resolved as growth ensuring that new sequences are added prospectively without merging clusters. Clusters containing purely new sequences are also ignored for this purpose. At this point, new sequences only connect to the closest non-new neighbour (although other options for growth resolutions may exist and be implemented).

Usage

read.edges(
  seq.info,
  edge.info,
  which.new = numeric(0),
  growth.resolution = minimum.retrospective.edge
)

Arguments

seq.info:

data.table, A set of sequence metadata. Must contain a Header column of sequence labels. If none given, then attempts to extract metadata from headers in edge.info.

edge.info:

data.frame, must contain three columns (ID1, ID2, Distance). ID1 and ID2 must match Header values in seq.info. TN93 generates this format by default.

which.new:

numeric or logical, which sequences in seq.info are "new". If numeric, this is a list of indices.

growth.resolution:

function, The method by which growth is resolved. This ensures new cases don't merge clusters. By default, each new sequence joins a cluster by only it's minimum retrospective edge.

Value

S3 object of class clusData See graph.ex for a more detailed example with annotated data.


PoonLab/clustuneR documentation built on Jan. 29, 2024, 2:40 a.m.