MutsTbl: Table of mutation frequencies by position

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/MutsTbl.R

Description

Computes the table of mutation frequencies by position with respect to the alignment consensus.

Usage

1
MutsTbl(hseqs,nr=NULL)

Arguments

hseqs

DNAStringSet or AAStringSet with the aligned haplotype sequences.

nr

An optional numeric vector with the haplotype counts. When nr is NULL, the same weight is given to each haplotype.

Value

Matrix of mutation counts by position. A (4 x n) or (20 x n) matrix, where n is the alignment length.

Author(s)

Mercedes Guerrero-Murillo and Josep Gregori

References

Gregori J, Perales C, Rodriguez-Frias F, Esteban JI, Quer J, Domingo E. Viral quasispecies complexity measures. Virology. 2016 Jun;493:227-37. doi: 10.1016/j.virol.2016.03.017. Epub 2016 Apr 6. Review. PubMed PMID: 27060566.

Gregori J, Salicrú M, Domingo E, Sanchez A, Esteban JI, Rodríguez-Frías F, Quer J. Inference with viral quasispecies diversity indices: clonal and NGS approaches. Bioinformatics. 2014 Apr 15;30(8):1104-1111. Epub 2014 Jan 2. PubMed PMID: 24389655.

See Also

ReadAmplSeqs

Examples

1
2
3
4
5
6
7
8
9
# Load the haplotypes alignment with abundances.
filepath<-system.file("extdata","ToyData_10_50_1000.fna", package="QSutils")
lst <- ReadAmplSeqs(filepath,type="DNA")

# Table of mutations in the alignment, regardless of haplotype abundance. 
MutsTbl(lst$hseqs)

# Table of mutations taking into account abundance.
MutsTbl(lst$hseqs,lst$nr)

VHIRHepatiques/QSutils documentation built on Oct. 24, 2018, 12:06 p.m.