[adegenet-forum] PCA for microsat data
Spencer Bruce
goatsrunfaster at gmail.com
Tue Feb 23 23:20:38 CET 2016
I've done everything in the DAPC tutorial using this data set over and over
no problem, but now I'm attempting to do a simple PCA and I seem to keep
running into problems with my genind object.
I'm sure ill get some backlash for being a self-taught beginner here, but
any help is really greatly appreciated.
I've imported my STRUCTURE file as a Gendind object no problem.
Right off the bat its as if adgenet does not recognize the data in the
object, see object and following code below...
>fish
#####################
### Genind object ###
#####################
- genotypes of individuals -
S4 class: genind
@call: read.structure(file = file, missing = missing, quiet = quiet)
@tab: 391 x 172 matrix of genotypes
@ind.names: vector of 391 individual names
@loc.names: vector of 11 locus names
@loc.nall: number of alleles per locus
@loc.fac: locus factor for the 172 columns of @tab
@all.names: list of 11 components yielding allele names for each locus
@ploidy: 2
@type: codom
Optional contents:
@pop: factor giving the population of each individual
@pop.names: factor giving the population of each individual
@other: - empty -
> data(fish)
Warning message:
In data(fish) : data set ‘fish’ not found
> sum(is.na(fish$tab))
[1] 166
> X <- scaleGen(fish, NA.method="mean")
Error in .local(x, ...) : unused argument (NA.method = "mean")
> class(X)
Error: object 'X' not found
I also tried this:
> X <- scaleGen(fish$tab, NA.method="mean")
Error in (function (classes, fdef, mtable) : unable to find an inherited
method for function ‘scaleGen’ for signature ‘"matrix"’
Am i missing something wildly simple here? Any help is greatly greatly
appreciated...
--
Spencer A Bruce
113 Hill St.
Troy, NY 12180
518 225 0787
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20160223/df444912/attachment.html>
More information about the adegenet-forum
mailing list