[adegenet-forum] Error when converting STRUCTURE file to genind

Vikram Chhatre crypticlineage at gmail.com
Wed Dec 17 23:08:37 CET 2014


I use this:

Bird_genind <- import2genind('Bird.str', missing='missing', onerowperind=1,
n.ind=10, n.loc=20, col.lab=1, col.pop=2, ask=FALSE)

This assumes you have data coded as one row per individual, with 10
individuals, 20 loci, individual labels in column 1, population labels in
column 2.  Also, I code missing data with a '-9'.

V

On Wed, Dec 17, 2014 at 4:09 PM, Spencer Bruce <goatsrunfaster at gmail.com>
wrote:
>
> I get the following Error Message when I attempt to convert a STRUCTURE
> file to a genind object:
>
> Converting data from a STRUCTURE .stru file to a genind object...
>
> Error in mat[, (ncol(mat) - p + 1):ncol(mat)] :
>   only 0's may be mixed with negative subscripts
> > traceback()
> 2: read.structure(file, missing = missing, quiet = quiet, ...)
> 1: import2genind("Bird.str")
>
> I've looked through the data and everything is in order, this runs fine in
> STRUCTURE and I've never had problems importing STRUCTURE files before.
>
> Just for the record this is SNP data in haploid format where G,C,A,T is
> coded for as 1,2,3,4 respectively.
>
> Any help would be greatly appreciated!
>
> -Spencer
>
> --
> 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/20141217/1ee89b38/attachment.html>


More information about the adegenet-forum mailing list