createPositionSummary: Summarize variants and frequencies at a genome position

View source: R/createPositionSummary.R

createPositionSummaryR Documentation

Summarize variants and frequencies at a genome position

Description

This function is used internally by getEntropySignature(). It creates a vector (aminoAcids) listing the amino acids observed in a virome at a particular position under analysis, including the reference amino acid, another vector (frequencies) with the corresponding frequencies, and returns them combined in a data frame.

Usage

createPositionSummary(variants, ref_aa, alt_aa, alt_aa_freq)

Arguments

variants

A data frame, similar to the polymorphisms argument of getEntropySignature, but containing information on a single genome position.

ref_aa

Name of the column that carries reference amino acids.

alt_aa

Name of the column carrying alternative amino acids observed in the metagenome.

alt_aa_freq

Name of the column giving the frequencies of alternative amino acids.

Value

A data frame describing the variability (different amino acids its frequencies) observed at a specific locus.

See Also

getEntropySignature.


MetaEntropy documentation built on March 3, 2026, 5:08 p.m.