compare.clines {introgress} | R Documentation |
This function contrasts patterns of introgression between two hybrid zones.
compare.clines(cline.data1=NULL,cline.data2=NULL)
cline.data1 |
a list that is the product of the
genomic.clines function. |
cline.data2 |
a list that is the product of the
genomic.clines function. |
This function estimates that likelihood of the count data from
cline.data2
given the regression models from cline.data1
and cline.data2
and returns the log ratio of the
latter to the former. cline.data1
and cline.data2
are
lists returned by genomic.clines
each based on a different hybrid
zone between the same parental populations or species; the molecular
markers and parental allele frequencies should be the same for both
hybrid zones. The range of hybrid index estimates for individuals
comprising cline.data2
should exceed the range of hybrid index
estimated for individuals comprising cline.data1
to avoid
predicting allele counts using the regression model from
cline.data1
beyond the range of hybrid indexes that were included
in the original model. The log likelihood ratios returned by this
function can be used to determine the degree of congruence for marker
specific patterns of introgression between the analyzed hybrid
zones. This function does not include estimation of a null distribution
of log likelihood ratios for significance testing.
See Gompert and Buerkle (2009a, 2009b) for additional details and examples.
A matrix with log likelihood ratios for each marker (row).
Zachariah Gompert zgompert@uwyo.edu, C. Alex Buerkle buerkle@uwyo.edu
Gompert Z. and Buerkle C. A. (2009) A powerful regression-based method for admixture mapping of isolation across the genome of hybrids. Molecular Ecology, 18, 1207-1224.
Gompert Z. and Buerkle C. A. (2009) introgress: a software package for mapping components of isolation in hybrids. Molecular Ecology Resources, in preparation.
genomic.clines
, prepare.data
, est.h
## Not run: ## load simulated data ## markers have fixed differences, with ## alleles coded as 'P1' and 'P2' data(AdmixDataSim1) data(LociDataSim1) ## use prepare.data to produce introgress.data introgress.data<-prepare.data(admix.gen=AdmixDataSim1, loci.data=LociDataSim1, parental1="P1", parental2="P2", pop.id=FALSE, ind.id=FALSE, fixed=TRUE) ## estimate hybrid index hi.index<-est.h(introgress.data=introgress.data, loci.data=LociDataSim1, p1.allele="P1", p2.allele="P2") ## random sampling to divide data into two sets of 100 individuals, ## this creates two admixed populations (hybrid zones) numbs<-sample(1:200,200,replace=FALSE) sam1<-numbs[1:100] sam2<-numbs[101:200] ## estimate genomic clines for each data set, ## significance testing is not conducted clines.out1<-genomic.clines(introgress.data=introgress.data, hi.index=hi.index,loci.data=LociDataSim1, sig.test=FALSE, ind.touse=sam1) clines.out2<-genomic.clines(introgress.data=introgress.data, hi.index=hi.index,loci.data=LociDataSim1, sig.test=FALSE, ind.touse=sam2) ## compare clines between data sets comp.out<-compare.clines(clines.out1,clines.out2) write.table(comp.out, file="compareClines.txt", quote=FALSE, sep=",") ## End(Not run)