VLF.reduced: Reduced VLF Matrix

View source: R/VLF.reduced.R

VLF.reducedR Documentation

Reduced VLF Matrix

Description

Reduces a matrix of very low frequency variants (VLFs) so that only those specimen that contain VLFs remain in the matrix.

Usage

VLF.reduced(NA.matrix, sCount, seqlength)

Arguments

NA.matrix

A matrix with values for very low frequency variants (VLFs) for each specimen and NAs in all other positions of the sequence.

sCount

A vector of the very low frequency variant (VLF) counts for each specimen in the NA.matrix.

seqlength

The length of the sequences.

Details

The argument NA.matrix can be calculated using the function VLF.convert.matrix and VLF.nucleotides. The argument sCount can be calculated using the function VLF.count.spec.

Value

A matrix containing only those specimen that have VLFs, and only VLFs in their positions in the sequence, all other positions contain NAs.

Author(s)

Taryn B. T. Athey and Paul D. McNicholas

Examples

## Not run: data(birds)
species.names <- birds[,2]
specimen.Number <- nrow(birds)
rownames(birds) <- species.names
Nuc.count <- count.function(birds, specimen.Number, 648)
frequency.matrix <- ffrequency.matrix.function(Nuc.count, 648)
birdSpec.freq <- specimen.frequencies(frequency.matrix, birds, specimen.Number, species.names, 648)
Bird_specimen_VLFcount <- VLF.count.spec(birdSpec.freq, 0.001, 648)
bird_VLFconvert <- VLF.convert.matrix(birds, birdSpec.freq, 0.001, 648)
bird_VLFnuc <- VLF.nucleotides(bird_VLFconvert, birds, 648)
bird_VLFreduced <- VLF.reduced(bird_VLFnuc, Bird_specimen_VLFcount, 648)
## End(Not run)

VLF documentation built on Aug. 18, 2022, 5:06 p.m.