[adegenet-forum] sPCA: Error in if (nf > rank) nf <- rank message

King, Jonathan Jonathan.King at unthsc.edu
Thu Jul 2 22:59:48 CEST 2015


Hello all,

I'm attempting to recreate a similar figure to the one seen in Sarno et al. (http://www.plosone.org/article/fetchObject.action?uri=info:doi/10.1371/journal.pone.0096074&representation=PDF). To do so, I create the attached matrix (HGF.txt) that contains populations (rows) and Y-STR haplogroups (columns). Additionally, due to my inexperience with adegenet, I created the attached coordinates list in a separate file (XY.txt). I then did the following.

Function:

mydata <- genpop(HGF,ploidy=1)

Result:
Object created

Function:

spca(mydata,xy=xy,d1=0,d2=5)

Result:
Plot created
[cid:image003.jpg at 01D0B4E0.1EA1AB50]

Now comes the problem.

Function:

myspca<-spca(mydata,xy=xy,type=5,d1=0,d2=5)

Result:
No "myspca" list is created and I get the following error

Error in if (nf > rank) nf <- rank :

  missing value where TRUE/FALSE needed

I feel that if I can obtain the eig values for the dataset the rest will be smooth sailing; however, I am unable to find any similar instances on the forum (some people have mentioned this general error in regard to clustering but not spca).

Any help is greatly appreciated. Thanks in advance

Jonathan King
Research and Development Lab Manager
Institute of Applied Genetics
UNT Health Science Center
3500 Camp Bowie Blvd
Fort Worth, TX 76107
Office: 817-735-2773
Phone: 817-735-2940
Research and Development Lab<https://www.unthsc.edu/graduate-school-of-biomedical-sciences/molecular-and-medical-genetics/laboratory-faculty-and-staff/>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20150702/195fe5b7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.jpg
Type: image/jpeg
Size: 4611 bytes
Desc: image003.jpg
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20150702/195fe5b7/attachment-0001.jpg>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: HGF.txt
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20150702/195fe5b7/attachment-0002.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xy.txt
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20150702/195fe5b7/attachment-0003.txt>


More information about the adegenet-forum mailing list