Description Usage Arguments Author(s) References See Also Examples
This function calculates distIUPAC
based distances
comparing two populations (x: receiver; y: donor).
1 2 | dist.xyStats(tmpSEQ, x.pos, y.pos, x.name = "x", y.name = "y",
dist = "IUPAC", ncores = 1)
|
tmpSEQ |
|
x.pos |
population X positions [mandatory] |
y.pos |
population Y positions [mandatory] |
x.name |
population X name [default: "x"] |
y.name |
population Y name [default: "y"] |
dist |
distance to use, choose one model as in dist.dna or [default: "IUPAC"] |
ncores |
number of parallel cores to process pairwise distance calculation [default: 1] |
Kristian K Ullrich
Slatkin, M. (1991). Inbreeding coefficients and coalescence times. Genetics Research, 58(2), 167-175.
Beerli, P. (1998). Structured Populations. Advances in molecular ecology, 306, 39.
Reich, D., Thangaraj, K., Patterson, N., Price, A. L., & Singh, L. (2009). Reconstructing Indian population history. Nature, 461(7263), 489.
Patterson, N., Moorjani, P., Luo, Y., Mallick, S., Rohland, N., Zhan, Y., ... & Reich, D. (2012). Ancient admixture in human history. Genetics, 192(3), 1065-1093.
Peter, B. M. (2016). Admixture, population structure, and F-statistics. Genetics, 202(4), 1485-1501.
Paradis, E., & Schliep, K. (2018). ape 5.0: an environment for modern phylogenetics and evolutionary analyses in R. Bioinformatics, 35(3), 526-528.
xyStats
,
distIUPAC
,
rcpp_distIUPAC
,
dist.dna
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | ##Use the 'xyStats' function to handle population assignment automatically
##load sequence data
data("MySequences", package="distIUPAC")
CAS.pos<-5:34
AFG.pos<-82:87
##Here, one needs to consider the changed x and y positions due
##to sub-sampling.
CAS.pos_<-seq_along(CAS.pos)
AFG.pos_<-seq(from=length(CAS.pos_)+1, to=length(c(CAS.pos,AFG.pos)))
##pairwise deletion
CAS_AFG.pairwiseDeletion.dist<-distIUPAC(
as.character(MySequences[c(CAS.pos,AFG.pos)]))
CAS_AFG.pairwiseDeletion.xyStats<-dist.xyStats(
CAS_AFG.pairwiseDeletion.dist,
x.pos=CAS.pos_, y.pos=AFG.pos_,
x.name="CAS", y.name="AFG")
##global deletion
CAS_AFG.globalDeletion.dist<-distIUPAC(
as.character(globalDeletion(MySequences[c(CAS.pos,AFG.pos)])))
CAS_AFG.globalDeletion.xyStats<-dist.xyStats(CAS_AFG.globalDeletion.dist,
x.pos=CAS.pos_, y.pos=AFG.pos_, x.name="CAS", y.name="AFG")
##compare results
rbind(CAS_AFG.pairwiseDeletion.xyStats, CAS_AFG.globalDeletion.xyStats)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.