[adegenet-forum] 'hybridization' problem
AVIK RAY
avik.ray.kol at gmail.com
Fri Nov 18 12:06:17 CET 2011
Dear all
I've built two ref groups (ref1.csv, ref2.csv) and genind objects (x1,
x2) as following, now when I am trying to simulate hybridization with
these two the error coming as appended at last; moreover in '@tab:' it
showing different size matrix for x1 and x2 (20 X 32 for x1 and 20 X50
for x2) whereas both having 20 individuals, six loci and four alleles
(per locus) each (sorry not in the script here)
Can anyone suggest me what is going wrong in it....
Thanks
( attaching ref1 and ref2)
......
> obj1<-read.table("ref1.csv")
> obj1
...
.....
> dat1<-data.frame(obj1, sep=",", ploidy=4)
> dat1
....
> dat1<-data.frame(obj1)
> dat1
.....
> x1=df2genind(dat1, sep=",", ploidy=4)
> x1
#####################
### Genind object ###
#####################
- genotypes of individuals -
S4 class: genind
@call: df2genind(X = dat1, sep = ",", ploidy = 4)
@tab: 20 x 32 matrix of genotypes
@ind.names: vector of 20 individual names
@loc.names: vector of 6 locus names
@loc.nall: number of alleles per locus
@loc.fac: locus factor for the 32 columns of @tab
@all.names: list of 6 components yielding allele names for each locus
@ploidy: 4
@type: codom
Optionnal contents:
@pop: - empty -
@pop.names: - empty -
@other: - empty -
> hybridize(x1, x2, 40, pop=NULL, res.type=c("genind"),file=NULL,
quiet=FALSE, sep=",", hyb.label="h")
*Error in Ops.data.frame(tab1, tab2) :
+ only defined for equally-sized data frames
In addition: Warning messages:
1: In if (x at loc.nall == 1) tabfreq <- t(tabfreq) :
the condition has length > 1 and only the first element will be used
2: In if (x at loc.nall == 1) tabfreq <- t(tabfreq) :
the condition has length > 1 and only the first element will be used
*
--
AVIK RAY
Visiting Fellow
National Center for Biological Sciences
Tata Institute of Fundamental Research
GKVK Campus
Bellary Road
Bangalore-560065
India
Ph 91-80-23666340
Fax 91-80-2363 6662
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20111118/3d5048c2/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ref1.csv
Type: application/vnd.ms-excel
Size: 1939 bytes
Desc: not available
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20111118/3d5048c2/attachment.xlb>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ref2.csv
Type: application/vnd.ms-excel
Size: 1935 bytes
Desc: not available
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20111118/3d5048c2/attachment.xls>
More information about the adegenet-forum
mailing list