Learn R Programming

VIProDesign (version 0.1.0)

phyl_tree_distance_k: Calculate Phylogenetic Tree Distances

Description

This function calculates the pairwise distances between sequences in a phylogenetic tree and returns a numeric vector of 5th smallest distances for each leaf in the tree.

Usage

phyl_tree_distance_k(input_obj)

Value

A numeric vector containing the 5th smallest distances (`Distances_k`) for each leaf in the phylogenetic tree.

Arguments

input_obj

A `AAStringSet` object containing sequences.

Details

The function uses the `ape` package to construct a phylogenetic tree and calculate pairwise distances between sequences. The results are returned as a numeric vector.

Examples

Run this code
# Input file
input_file <- system.file("extdata", "input.fasta", package = "VIProDesign")
seqs <- Biostrings::readAAStringSet(input_file)
distances_k <- phyl_tree_distance_k(seqs)

Run the code above in your browser using DataLab