[adegenet-forum] problems importing structure data

Gibbons, John G. john.g.gibbons at Vanderbilt.Edu
Tue Jun 14 18:31:35 CEST 2011


Hello,
I have been having some problems loading my structure data to a geneid object using the "read.structure" command. I've read through the forum archive and tried everything but am still getting the same error.

Here is the example of my test dataset:

Afum001 3 4 1 2 1 1 3 1 3 1
Afum002 1 3 2 1 1 2 1 1 2 2
Afum003 2 3 1 2 1 1 2 2 2 2
Afum004 1 3 1 2 1 2 1 2 2 2
Afum005 1 1 1 1 1 1 1 2 1 2
Afum006 1 3 2 1 1 1 2 2 1 2
Afum007 1 1 1 2 2 1 1 2 2 2
Afum008 2 1 1 2 2 1 1 1 2 2
Afum009 1 1 1 2 1 1 4 2 2 2
Afum011 1 3 1 1 1 2 4 2 2 1

I then issue the following command:

a <- read.structure("test_data.stru", row.marknames=0, onerowperind=TRUE, n.ind=10, n.loc=10, col.lab=1, col.pop=0, ask=TRUE)

I then get the following promt

Which other optional columns should be read (press 'return' when done)? 1:

When I press return here (as I do not have any other optional columns to be read) I get the following error:

Converting data from a STRUCTURE .stru file to a genind object...

Error in read.structure("test_data.stru ",  :
                                only 0's may be mixed with negative subscripts

I have been struggling with this for a few days now and cannot figure out what the problem is. Any thoughts or advice would be greatly appreciated.

Thanks,

John

----
John G Gibbons
Department of Biological Sciences
VU Station B, Box 35-1634
Vanderbilt University
Nashville TN, 37212
The Rokas Lab
Email: John.G.Gibbons at Vanderbilt.Edu<mailto:John.G.Gibbons at Vanderbilt.Edu>
Tel: (615) 936-3893
http://sitemason.vanderbilt.edu/people/jggibbons

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20110614/8d414217/attachment.htm>


More information about the adegenet-forum mailing list