[adegenet-forum] PCA for microsat data

Roman Luštrik roman.lustrik at biolitika.si
Wed Feb 24 08:50:49 CET 2016


Hi, 

the `data(fish)` won't work because this is a command that fetches a dataset that is shipped with R or a package. 

As for the rest of the errors, can you type `traceback()` after an error and send us the output? Or ideally, if you are allowed to share the dataset, that would be great so that it can be debugged directly. 

Cheers, 
Roman 

---- 
In god we trust, all others bring data. 

----- Original Message -----

From: "Spencer Bruce" <goatsrunfaster at gmail.com> 
To: adegenet-forum at lists.r-forge.r-project.org 
Sent: Tuesday, February 23, 2016 11:20:38 PM 
Subject: [adegenet-forum] PCA for microsat data 

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 

_______________________________________________ 
adegenet-forum mailing list 
adegenet-forum at lists.r-forge.r-project.org 
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum 

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


More information about the adegenet-forum mailing list