[adegenet-forum] select loci with specific genotype in genind object

Sara Bonanomi bonanomi.sara85 at gmail.com
Thu Apr 10 16:26:18 CEST 2014


Hi all,

In my genind object I would like to select only the loci with a certain
genotype (e.g. 0102). Then I wanna check the allele contribution
($var.contr).

 If I digit: mygenindobject$all.names I get a list with xx components
yielding allele names for each locus.

For instance:



$L262

   1    2

"01" "02"



Then, to get the loci only the loci with a certain genotype (e.g. 0102) , I
have tried with the subset function: selectLoci<-subset(mydata$all.names,
1=="01" & 2=="02", select=c(1,2)) But then I get: named list ()

 Is there a specific function in adegenet to subset the data? Could you
please help me?


Thank you very much,


Best


Jasmine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20140410/c8bb71b3/attachment.html>


More information about the adegenet-forum mailing list