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

Roman Luštrik roman.lustrik at biolitika.si
Thu Mar 17 12:44:21 CET 2016


Hi Andrew, 

if you have an account on GitHub, could you please report this issue there ( https://github.com/thibautjombart/adegenet/issues )? If not, let me know and I'll do it. 

Cheers, 
Roman 

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

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

From: "Andrew Gottscho" <andrew.gottscho at gmail.com> 
To: adegenet-forum at lists.r-forge.r-project.org 
Sent: Saturday, January 23, 2016 5:24:43 PM 
Subject: [adegenet-forum] importing from structure file - inconsistent "negative subscripts" error 

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 

_______________________________________________ 
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/20160317/e4a5e406/attachment.html>


More information about the adegenet-forum mailing list