FreqMat: Matrix of nucleotide or amino acid frequencies in alignment...

Description Usage Arguments Value Author(s) Examples

Description

Computes the nucleotide or amino acid frequency at each position in the alignment.

Usage

1
FreqMat(seqs,nr=NULL)

Arguments

seqs

DNAStringSet or AAStringSet with the aligned haplotype sequences.

nr

An optional numeric vector with the haplotype counts.

Value

Matrix with the frequency of each nucleotide or amino acid in each position. A (4 x n) or (20 x n) matrix, where n is the alignment length.

Author(s)

Mercedes Guerrero-Murillo and Josep Gregori

Examples

1
2
3
4
5
6
7
filepath<-system.file("extdata","ToyData_10_50_1000.fna", package="QSutils")
lst <- ReadAmplSeqs(filepath,type="DNA")

# Frequencies only in the alignment.
FreqMat(lst$hseqs)
# Also taking into account haplotype frequencies.
FreqMat(lst$hseqs,lst$nr)

VHIRHepatiques/QSutils documentation built on May 8, 2019, 1:44 p.m.