FreqMat | R Documentation |
Computes the nucleotide or amino acid frequency at each position in the alignment.
FreqMat(seqs,nr=NULL)
seqs |
DNAStringSet or AAStringSet with the aligned haplotype sequences. |
nr |
An optional numeric vector with the haplotype counts. |
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.
Mercedes Guerrero-Murillo and Josep Gregori
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.