DNA.dist: Matrix of DNA distances given an alignment

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

View source: R/DNA.dist.R

Description

Function to compute a matrix of pairwise distances from DNA sequences using a model of DNA evolution. It relies on the dist.dna() function in the APE package.

Usage

1
DNA.dist(seqs, model = "raw", gamma = FALSE, pairwise.deletion = FALSE)

Arguments

seqs

DNAStringSet object with the aligned haplotypes.

model

Evolutionary model to compute genetic distance by default "raw", but "N", "TS", "TV", "JC69", "K80", "F81", "K81", "F84", "BH87", "T92","TN93", "GG95", "logdet", "paralin", "indel", or "indelblock" can also be used.

gamma

Gamma parameter possibly used to apply a correction to the distances or FALSE (by default).

pairwise.deletion

A logical indicating whether to delete sites with missing data (gaps) in a pairwise manner. The default is to delete sites with at least one missing datum in all sequences.

Value

Object of class "dist" with pairwise distances.

Author(s)

Mercedes Guerrero-Murillo and Josep Gregori

References

Paradis E., Claude J. and Strimmer K., APE: analyses of phylogenetics and evolution in R language. Bioinformatics. 2004, 20, 289-290

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

dist.dna

Examples

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

dst <- DNA.dist(lst$hseqs,model="N")
dst

Example output

Loading required package: Biostrings
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package:BiocGenericsThe following objects are masked frompackage:parallel:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked frompackage:stats:

    IQR, mad, sd, var, xtabs

The following objects are masked frompackage:base:

    anyDuplicated, append, as.data.frame, basename, cbind, colnames,
    dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which.max, which.min

Loading required package: S4Vectors
Loading required package: stats4

Attaching package:S4VectorsThe following object is masked frompackage:base:

    expand.grid

Loading required package: IRanges
Loading required package: XVector

Attaching package:BiostringsThe following object is masked frompackage:base:

    strsplit

                    Hpl_0_0001|464|46.4 Hpl_1_0001|62|6.2 Hpl_1_0002|39|3.9
Hpl_1_0001|62|6.2                     1                                    
Hpl_1_0002|39|3.9                     1                 2                  
Hpl_1_0003|27|2.7                     1                 2                 2
Hpl_2_0001|37|3.7                     2                 1                 3
Hpl_4_0001|16|1.6                     4                 3                 5
Hpl_5_0001|33|3.3                     5                 4                 6
Hpl_8_0001|54|5.4                     8                 7                 9
Hpl_9_0001|248|24.8                   9                 8                10
Hpl_10_0001|20|2                     10                 9                11
                    Hpl_1_0003|27|2.7 Hpl_2_0001|37|3.7 Hpl_4_0001|16|1.6
Hpl_1_0001|62|6.2                                                        
Hpl_1_0002|39|3.9                                                        
Hpl_1_0003|27|2.7                                                        
Hpl_2_0001|37|3.7                   3                                    
Hpl_4_0001|16|1.6                   5                 4                  
Hpl_5_0001|33|3.3                   6                 5                 5
Hpl_8_0001|54|5.4                   9                 8                 8
Hpl_9_0001|248|24.8                 8                 9                 9
Hpl_10_0001|20|2                    9                10                10
                    Hpl_5_0001|33|3.3 Hpl_8_0001|54|5.4 Hpl_9_0001|248|24.8
Hpl_1_0001|62|6.2                                                          
Hpl_1_0002|39|3.9                                                          
Hpl_1_0003|27|2.7                                                          
Hpl_2_0001|37|3.7                                                          
Hpl_4_0001|16|1.6                                                          
Hpl_5_0001|33|3.3                                                          
Hpl_8_0001|54|5.4                   3                                      
Hpl_9_0001|248|24.8                 4                 1                    
Hpl_10_0001|20|2                    5                 2                   1

QSutils documentation built on Nov. 8, 2020, 7:42 p.m.