[adegenet-commits] r897 - pkg/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue May 31 15:23:17 CEST 2011
Author: jombart
Date: 2011-05-31 15:23:17 +0200 (Tue, 31 May 2011)
New Revision: 897
Modified:
pkg/R/glHandle.R
Log:
alleles were lost too
Modified: pkg/R/glHandle.R
===================================================================
--- pkg/R/glHandle.R 2011-05-31 13:21:27 UTC (rev 896)
+++ pkg/R/glHandle.R 2011-05-31 13:23:17 UTC (rev 897)
@@ -72,15 +72,16 @@
old.other <- other(x)
old.ind.names <- indNames(x)
- ## handle loc.names, chromosome and position
+ ## handle ind.names, loc.names, chromosome, position, and alleles
new.loc.names <- locNames(x)[j]
new.chr <- chr(x)[j]
new.position <- position(x)[j]
+ new.alleles <- alleles(x)[j]
new.gen <- lapply(x at gen, function(e) e[j])
##x <- as.matrix(x)[, j, drop=FALSE] # maybe need to process one row at a time
x <- new("genlight", gen=new.gen, pop=ori.pop, ploidy=ori.ploidy,
ind.names=old.ind.names, loc.names=new.loc.names,
- chromosome=new.chr, position=new.position, other=old.other)
+ chromosome=new.chr, position=new.position, alleles=new.alleles, other=old.other)
}
return(x)
More information about the adegenet-commits
mailing list