[adegenet-forum] importing from structure file - inconsistent "negative subscripts" error

Andrew Gottscho andrew.gottscho at gmail.com
Sat Jan 23 17:24:46 CET 2016


Hi,

I am trying to run DAPC on my new Sceloporus dataset. I successfully got
this to work before with some other datasets. I am using adegenet 2.0.0.

When I run the following line for my "Uma dataset", I am able to
successfully import:

*library(adegenet)*

*data <-
read.structure("output_western_uma_121214_n60_h5_p75_editnames_2.str",
n.ind=64, n.loc=597, onerowperind=FALSE, col.lab=1, col.pop=0,
col.others=NULL, row.marknames=NULL, NA.char="-9", pop=NULL, ask=FALSE,
quiet=FALSE) *

When I run the same code for the "Sceloporus dataset":

*data <- read.structure("output_sceloporus_032415_n43_h5_p75.str",
n.ind=80, n.loc=1024, onerowperind=FALSE, col.lab=1, col.pop=0,
col.others=NULL, row.marknames=NULL, NA.char="-9", pop=NULL, ask=FALSE,
quiet=FALSE) *

I get the following error:


*Error in mat[, (ncol(mat) - p + 1):ncol(mat)] : *
*  only 0's may be mixed with negative subscripts*

I also tried this with adegenet v 1.4.2 and having the exact same issue.

I attached both input (structure) files to this email. They were both
formatted the same way, from pyRAD v2.1.2. If anyone can figure out why one
file is giving me the error, and the other isn't, I would greatly
appreciate it.

I should point out that I searched the archives, a similar question has
been posted about a year ago, but I didn't see it resolved:

http://lists.r-forge.r-project.org/pipermail/adegenet-forum/2014-December/001049.html

Thanks for your help!

Best, Andy
-- 
Andrew Gottscho, Ph.D.
andrew.gottscho at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20160123/6fa0bdf4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output_western_uma_121214_n60_h5_p75_editnames_2.str
Type: application/octet-stream
Size: 156602 bytes
Desc: not available
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20160123/6fa0bdf4/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output_sceloporus_032415_n43_h5_p75.str
Type: application/octet-stream
Size: 378540 bytes
Desc: not available
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20160123/6fa0bdf4/attachment-0003.obj>


More information about the adegenet-forum mailing list