[adegenet-forum] seppop/repool question
Stephen Douglas Petersen
stephenpetersen at trentu.ca
Thu Feb 26 18:10:47 CET 2009
Hello,
I am trying to separate populations and repool them but I am getting an error which I think is due to the information I have stored in the $other slots. Below are the steps I took and the error that was returned. The question ultimately is why do I loose my $other information when I seppop and repool?
Thanks in advance
PCt <- read.structure("PC7Nov20074pop_spca.str", n.ind=151, n.loc=9, onerowperind=T,
col.lab=1, col.pop=2, col.others=NULL, row.marknames=1, NA.char="-9", pop=pop,
missing="mean", ask=F, quiet=F)
PCxy <- read.table("PC7Nov2007xy_spca.txt", header=T)
PCsex <- read.table("PC7Nov2007sex_spca.txt", header=T)
PCs$other$xy <- PCxy #2 column list of x and y coordinates
PCs$other$sex <- PCsex #1 column list of the sex of animals (M,F,U)
PCs
#####################
### Genind object ###
#####################
- genotypes of individuals -
S4 class: genind
@call: read.structure(file = "PC7Nov20074pop_spca.str", n.ind = 151,
n.loc = 9, onerowperind = T, col.lab = 1, col.pop = 2, col.others = NULL,
row.marknames = 1, NA.char = "-9", pop = NULL, missing = "mean",
ask = F, quiet = F)
@tab: 151 x 55 matrix of genotypes
@ind.names: vector of 151 individual names
@loc.names: vector of 9 locus names
@loc.nall: number of alleles per locus
@loc.fac: locus factor for the 55 columns of @tab
@all.names: list of 9 components yielding allele names for each locus
@ploidy: 2
Optionnal contents:
@pop: factor giving the population of each individual
@pop.names: factor giving the population of each individual
@other: a list containing: xy sex
###seems good so far
pop <- c("Central", "NorthEast", "NorthWest", "SouthCentral")
pcs <- seppop(PCs)
pcs
###everything looks fine except the $other slots which now say
#@other: a list containing: elements without names
###and when I try to repool I get the following
pcttt <- repool(pctt$Central, pctt$SouthCentral, pctt$NorthEast)
pcttt
###everything looks fine except the $other slot which now say
#@other: - empty -
Thanks
Stephen
Stephen D. Petersen, M.Sc. Ph.D.
Visiting Fellow, Fisheries & Oceans Canada
Winnipeg, MB
E-mail:
stephen.petersen at dfo-mpo.gc.ca
stephenpetersen at trentu.ca
spetersen at nrdpfc.ca
<http://sites.google.com/site/stephendpetersen/>
<http://people.trentu.ca/stephenpetersen/>
<http://ace.acadiau.ca/science/biol/Stephen/stephen_dp_home.htm>
More information about the adegenet-forum
mailing list