[adegenet-forum] Genotypes assignment to clusters
Sébastien Puechmaille
s.puechmaille at gmail.com
Mon Mar 21 14:15:04 CET 2011
Dear Thibaut and Adegenet users,
I have a data set with 3 groups of samples (see below), 2 with samples of
known origin (pop1 and pop2) and one (popx) with samples that I would like
to assign to one of the 2 known populations (pop1 or pop2). For this, I want
to run a DAPC with 'pop1' and 'pop2' data set and then, assign individuals
from 'popx' to either 'pop1' or 'pop2'.
However, individuals from the group to be assigned have some private alleles
that are neither in 'pop1' nor in 'pop2' and therefore, the assignment
cannot work. What would be the best solution to get around this problem?
Shall I create dummies individuals in 'pop1' and 'pop2' having the private
alleles of 'popx'?
Hereafter is a reduced data set to illustrate the problem:
indiv pop L1 L2 L3
Indiv1 pop1 222224 232224 120122
Indiv2 pop1 222226 232226 118120
Indiv3 pop1 222222 232232 120120
Indiv4 pop1 222224 232224 124124
Indiv5 pop2 224224 224224 122122
Indiv6 pop2 224224 224224 124124
Indiv7 pop2 224226 224226 120120
Indiv8 pop2 222224 232224 122124
Indiv9 popx 220222 220232 116118
Indiv10 popx 222224 232224 118120
Indiv11 popx 222226 232226 120120
Indiv12 popx 224224 224224 124124
geno<-read.table("three-pop.txt",h=T)
trial<-df2genind(geno[,3:5],missing=NA,ploidy=2,sep=NULL,ncode=6,ind.names=geno[,1],
loc.names=colnames(geno[1,3:5]),pop=geno[,2])
trial at pop.names
split<- seppop(trial)
pop12 <- repool(split$pop1, split$pop2)
pop12 @all.names
split$popx at all.names
In this case, 'pop12' has 10 columns of '@tab' while 'split$popx' has 13
columns of '@tab'.
Would anyone have a solution or any advice?
Thanks for your help,
Sébastien.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20110321/fc8ffd6a/attachment.htm>
More information about the adegenet-forum
mailing list