[adegenet-forum] adegenet-forum Digest, Vol 127, Issue 2

Zhian Kamvar kamvarz at science.oregonstate.edu
Wed Apr 24 12:21:12 CEST 2019


The error you get is one of the more common generic R errors out there...
and when it comes from a parsing function like this, it's hard to diagnose,
but I'm going to guess that there is something going on with the names of
the samples in your data (because of step 206). Old genetic data formats
are _terrible_ for storing data because they force you to contort it in
unnatural ways (not your fault at all, just how things are).

The traceback you show is a bit strange... it shows a lot of noise from the
dapcServer function, which shouldn't affect how read.genpop reads a file.
Do you have dapcServer running?

Can you give more detail? Things that are unclear:

What is the Stacks2 'populations' script?
What version of adegenet do you have?
What version of R and RStudio are you running?
Did you have to manually manipulate your data file to get it into genepop
format?



On Wed, Apr 24, 2019 at 11:00 AM <
adegenet-forum-request at lists.r-forge.r-project.org> wrote:

> Send adegenet-forum mailing list submissions to
>         adegenet-forum at lists.r-forge.r-project.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum
>
> or, via email, send a message with subject or body 'help' to
>         adegenet-forum-request at lists.r-forge.r-project.org
>
> You can reach the person managing the list at
>         adegenet-forum-owner at lists.r-forge.r-project.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of adegenet-forum digest..."
>
>
> Today's Topics:
>
>    1. length of 'dimnames' [1] not equal to array extent (Brian Simison)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 23 Apr 2019 12:03:35 -0700
> From: Brian Simison <bsimison at calacademy.org>
> To: adegenet-forum at lists.r-forge.r-project.org
> Subject: [adegenet-forum] length of 'dimnames' [1] not equal to array
>         extent
> Message-ID:
>         <CAM4LYpjCwSUHmn2SZUS_R5dzetc=
> OFnoG4mKoNm8zoz8uZjh8g at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> I have tried to convert various format output by Stacks2 'populations'
> script with no success. I have tried both structure and genepop formats and
> continually get the cryptic error "length of 'dimnames' [1] not equal to
> array extent"
>
> In Rstudio in Win10 I run:
>  >Trach <- read.genepop("populations.gen")
>
>  Converting data from a Genepop .gen file to a genind object...
>
> File description:  2_52, 2_53, 2_74, 4_15, 4_18, 4_39, 4_84, 5_17, 5_35,
> 5_61, 6_24, 6_49, 6_50, 6_88, ... (I deleted the middle of the file
> description for space)
> ... 45, 474683_54, 474839_33, 474839_38, 474839_56, 476311_31, 476311_59,
> 476328_59, 477562_70, 477562_81, 479861_17
> Warning: Error in <-: length of 'dimnames' [1] not equal to array extent
>   206: rownames<-
>   205: read.genepop
>   204: import2genind
>   203: <reactive:getData> [C:\Program
> Files\R\R-3.5.1\library\adegenet\dapcServer/server.R#39]
>   201: .func
>   198: contextFunc
>   197: env$runWith
>   190: ctx$run
>   189: self$.updateValue
>   187: getData
>   186: <reactive:getDapc> [C:\Program
> Files\R\R-3.5.1\library\adegenet\dapcServer/server.R#222]
>   184: .func
>   181: contextFunc
>   180: env$runWith
>   173: ctx$run
>   172: self$.updateValue
>   170: getDapc
>   169: renderPlot [C:\Program
> Files\R\R-3.5.1\library\adegenet\dapcServer/server.R#248]
>   167: func
>   127: drawPlot
>   113: <reactive:plotObj>
>    97: drawReactive
>    84: origRenderFunc
>    83: output$scatterplot
>     3: runApp
>     2: .dapcServer
>     1: adegenetServer
> Warning: Error in <-: length of 'dimnames' [1] not equal to array extent
>   101: <Anonymous>
> Warning: Error in <-: length of 'dimnames' [1] not equal to array extent
>   101: <Anonymous>
> Warning: Error in <-: length of 'dimnames' [1] not equal to array extent
>   101: <Anonymous>
> Warning: Error in <-: length of 'dimnames' [1] not equal to array extent
>   101: <Anonymous>
>
> I have searched for this error and have failed to understand what
> "Dimnames" are.
>
> thank you in advance.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> W. Brian Simison, Ph.D.
> Curator & Director of Comparative Genomics
> California Academy of Sciences
> 55 Music Concourse Dr. SF, CA 94118
> O:415.379.5297
> M:415.310.1686
> bsimison at calacademy.org
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20190423/d3e324f3/attachment-0001.html
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> 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
>
> ------------------------------
>
> End of adegenet-forum Digest, Vol 127, Issue 2
> **********************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20190424/673b9fcb/attachment.html>


More information about the adegenet-forum mailing list