From elisabetta.piazza at studenti.unitn.it Tue Apr 9 15:41:36 2019 From: elisabetta.piazza at studenti.unitn.it (Elisabetta Piazza) Date: Tue, 9 Apr 2019 15:41:36 +0200 Subject: [adegenet-forum] method of computation Hobs Message-ID: Hi adegenet-forum members, I'm using the package for my thesis work and I have a question. I know that using the function summary() on a genind object it is possible to get the numerical values of Hobs and Hexp but I'd like to understand how Hobs is computed. Indeed, the values of Hobs from adegenet don't match the one that I've calculated using the original dataframe and I'd like to compare the two methods of calculation. Thank you in advanced, Elisabetta -------------- next part -------------- An HTML attachment was scrubbed... URL: From elisabetta.piazza at studenti.unitn.it Tue Apr 9 17:22:51 2019 From: elisabetta.piazza at studenti.unitn.it (Elisabetta Piazza) Date: Tue, 9 Apr 2019 17:22:51 +0200 Subject: [adegenet-forum] method of computation Hobs In-Reply-To: References: Message-ID: Hi again, I've solved my problem, sorry for troubling you. So I suppose that I've computed the Hobs in the same way as the function of the package did. Bye, Elisabetta Il giorno mar 9 apr 2019 alle ore 15:41 Elisabetta Piazza < elisabetta.piazza at studenti.unitn.it> ha scritto: > Hi adegenet-forum members, > I'm using the package for my thesis work and I have a question. > > I know that using the function summary() on a genind object it is possible > to get the numerical values of Hobs and Hexp but I'd like to understand how > Hobs is computed. > Indeed, the values of Hobs from adegenet don't match the one that I've > calculated using the original dataframe and I'd like to compare the two > methods of calculation. > > Thank you in advanced, > Elisabetta > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsimison at calacademy.org Tue Apr 23 21:03:35 2019 From: bsimison at calacademy.org (Brian Simison) Date: Tue, 23 Apr 2019 12:03:35 -0700 Subject: [adegenet-forum] length of 'dimnames' [1] not equal to array extent Message-ID: 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: [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: [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: 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: Warning: Error in <-: length of 'dimnames' [1] not equal to array extent 101: Warning: Error in <-: length of 'dimnames' [1] not equal to array extent 101: Warning: Error in <-: length of 'dimnames' [1] not equal to array extent 101: 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: From kamvarz at science.oregonstate.edu Wed Apr 24 12:21:12 2019 From: kamvarz at science.oregonstate.edu (Zhian Kamvar) Date: Wed, 24 Apr 2019 11:21:12 +0100 Subject: [adegenet-forum] adegenet-forum Digest, Vol 127, Issue 2 In-Reply-To: References: Message-ID: 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 > To: adegenet-forum at lists.r-forge.r-project.org > Subject: [adegenet-forum] length of 'dimnames' [1] not equal to array > extent > Message-ID: > 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: [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: [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: > 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: > Warning: Error in <-: length of 'dimnames' [1] not equal to array extent > 101: > Warning: Error in <-: length of 'dimnames' [1] not equal to array extent > 101: > Warning: Error in <-: length of 'dimnames' [1] not equal to array extent > 101: > > 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: From bsimison at calacademy.org Thu Apr 25 00:47:34 2019 From: bsimison at calacademy.org (Brian Simison) Date: Wed, 24 Apr 2019 15:47:34 -0700 Subject: [adegenet-forum] adegenet-forum Digest, Vol 127, Issue 2 In-Reply-To: References: Message-ID: Thank you Zhian, >From your description of dimnames, I was able to edit marker and genotype labels until it worked. And yes, I had the DAPC web running in the background. FYI - Stacks2 processes and analyzes RADseq data. The 'populations ' script does many things including exporting SNP data into various formats. On Wed, Apr 24, 2019 at 3:21 AM Zhian Kamvar < kamvarz at science.oregonstate.edu> wrote: > 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 >> To: adegenet-forum at lists.r-forge.r-project.org >> Subject: [adegenet-forum] length of 'dimnames' [1] not equal to array >> extent >> Message-ID: >> > 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: [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: [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: >> 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: >> Warning: Error in <-: length of 'dimnames' [1] not equal to array extent >> 101: >> Warning: Error in <-: length of 'dimnames' [1] not equal to array extent >> 101: >> Warning: Error in <-: length of 'dimnames' [1] not equal to array extent >> 101: >> >> 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 >> ********************************************** >> > _______________________________________________ > 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: