From massimiliano.virgilio at africamuseum.be Mon Apr 6 15:48:32 2015 From: massimiliano.virgilio at africamuseum.be (Virgilio Massimiliano) Date: Mon, 6 Apr 2015 13:48:32 +0000 Subject: [adegenet-forum] conversion genind to loci Message-ID: <702BA0C8-1B27-4C0E-8E1C-41E36FADFB65@africamuseum.be> hi, I?m trying to make a bootstrapped njt on msat data, as far as I can understand, it?s not possible to bootstrap my loci starting from a genind object and this: myBoots <- boot.phylo(NJtree, data_genind at tab, B =100, function(xx) njs(dist(xx))) shouldn?t be correct as it bootstraps alleles (data_genind at tab) So I?m trying to convert my genind data into loci using genind2loci and read.loci : library(adegenet) data <- read.genetix("data.gtx") data_loci<-genind2loci(data) write.csv(data_loci, file = "data_loci.csv") library(pegas) data_pegas<-read.loci(file = "data_loci.csv", loci.sep = ",") and then get the tree (based on Fst, but it doesn?t work either with distances) pairFst <- pairwise.fst(data, res.type="matrix", truenames=TRUE) library(ape) njtreFst_pop <- njs(pairFst) myBoots <- boot.phylo(njtreFst_pop, as.matrix(data_pegas), B = 3, function(xx) njs(dist(xx))) but it doesn?t seem to work (I?m attaching the input file) and I get only error messages no matter what I try... What am I doing wrong? Is there a simpler way of getting bootstrapped msat loci starting form a genind object? greeting and many thanks in advance Massi __________________________________ Massimiliano Virgilio, PhD Royal Museum for Central Africa Joint Experimental Molecular Unit (JEMU) Leuvensesteenweg 13, B-3080 Tervuren, Belgium, +32 (0) 27695366 massimiliano.virgilio at africamuseum.be http://www.africamuseum.be/home/contact/staff/VIRGILIO_Massimiliano/ http://jemu.myspecies.info -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: data.gtx Type: application/octet-stream Size: 9156 bytes Desc: data.gtx URL: From t.jombart at imperial.ac.uk Tue Apr 7 14:54:38 2015 From: t.jombart at imperial.ac.uk (Thibaut Jombart) Date: Tue, 07 Apr 2015 13:54:38 +0100 Subject: [adegenet-forum] conversion genind to loci In-Reply-To: <702BA0C8-1B27-4C0E-8E1C-41E36FADFB65@africamuseum.be> References: <702BA0C8-1B27-4C0E-8E1C-41E36FADFB65@africamuseum.be> Message-ID: <5523D38E.4030703@imperial.ac.uk> Hi there, as this question is also pegas-related, it may be better suited on R-sig-genetics (I am not sure Emmanuel Paradis reads the adegenet forum): https://stat.ethz.ch/mailman/listinfo/r-sig-genetics This list was typically a bit of a deadland but we are trying to resurrect it. Cheers Thibaut On 06/04/15 14:48, Virgilio Massimiliano wrote: > hi, > I?m trying to make a bootstrapped njt on msat data, > as far as I can understand, it?s not possible to bootstrap my loci > starting from a genind object and this: > > myBoots <- boot.phylo(NJtree, data_genind at tab, B =100, function(xx) > njs(dist(xx))) > > shouldn?t be correct as it bootstraps alleles (data_genind at tab) > > > So I?m trying to convert my genind data into loci using genind2loci > and read.loci : > > > library(adegenet) > data <- read.genetix("data.gtx") > data_loci<-genind2loci(data) > write.csv(data_loci, file = "data_loci.csv") > library(pegas) > data_pegas<-read.loci(file = "data_loci.csv", loci.sep = ",") > > and then get the tree (based on Fst, but it doesn?t work either with > distances) > > pairFst <- pairwise.fst(data, res.type="matrix", truenames=TRUE) > > library(ape) > njtreFst_pop <- njs(pairFst) > myBoots <- boot.phylo(njtreFst_pop, as.matrix(data_pegas), B = 3, > function(xx) > njs(dist(xx))) > > but it doesn?t seem to work (I?m attaching the input file) and I get > only error messages no matter what I try... > > What am I doing wrong? Is there a simpler way of getting bootstrapped > msat loci starting form a genind object? > > greeting and many thanks in advance > > Massi > > > > __________________________________ > Massimiliano Virgilio, PhD > > Royal Museum for Central Africa > > Joint Experimental Molecular Unit (JEMU) > > Leuvensesteenweg 13, B-3080 Tervuren, Belgium, +32 (0) 27695366 > > massimiliano.virgilio at africamuseum.be > > > http://www.africamuseum.be/home/contact/staff/VIRGILIO_Massimiliano/ > > http://jemu.myspecies.info > > > > > > > > > > _______________________________________________ > 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: From zkamvar at gmail.com Tue Apr 7 16:06:50 2015 From: zkamvar at gmail.com (Zhian Kamvar) Date: Tue, 7 Apr 2015 07:06:50 -0700 Subject: [adegenet-forum] adegenet-forum Digest, Vol 80, Issue 2 In-Reply-To: References: Message-ID: Hello, I have solved this problem in the package "poppr" (http://cran.r-project.org/package=poppr). The function "aboot" will calculate bootstrapped nj and upgma trees for any genetic distance (http://rpackages.ianhowson.com/cran/poppr/man/aboot.html) (see the second example). It doesn't do njs at the moment, but I can easily make a patch for that. Cheers, Zhian > On Apr 7, 2015, at 03:00 , 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. conversion genind to loci (Virgilio Massimiliano) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 6 Apr 2015 13:48:32 +0000 > From: Virgilio Massimiliano > To: "adegenet-forum at lists.r-forge.r-project.org" > > Subject: [adegenet-forum] conversion genind to loci > Message-ID: <702BA0C8-1B27-4C0E-8E1C-41E36FADFB65 at africamuseum.be> > Content-Type: text/plain; charset="utf-8" > > hi, > I?m trying to make a bootstrapped njt on msat data, > as far as I can understand, it?s not possible to bootstrap my loci starting from a genind object and this: > > myBoots <- boot.phylo(NJtree, data_genind at tab, B =100, function(xx) njs(dist(xx))) > > shouldn?t be correct as it bootstraps alleles (data_genind at tab) > > > So I?m trying to convert my genind data into loci using genind2loci and read.loci : > > > library(adegenet) > data <- read.genetix("data.gtx") > data_loci<-genind2loci(data) > write.csv(data_loci, file = "data_loci.csv") > library(pegas) > data_pegas<-read.loci(file = "data_loci.csv", loci.sep = ",") > > and then get the tree (based on Fst, but it doesn?t work either with distances) > > pairFst <- pairwise.fst(data, res.type="matrix", truenames=TRUE) > > library(ape) > njtreFst_pop <- njs(pairFst) > myBoots <- boot.phylo(njtreFst_pop, as.matrix(data_pegas), B = 3, function(xx) > njs(dist(xx))) > > but it doesn?t seem to work (I?m attaching the input file) and I get only error messages no matter what I try... > > What am I doing wrong? Is there a simpler way of getting bootstrapped msat loci starting form a genind object? > > greeting and many thanks in advance > > Massi > > > > __________________________________ > Massimiliano Virgilio, PhD > > Royal Museum for Central Africa > > Joint Experimental Molecular Unit (JEMU) > > Leuvensesteenweg 13, B-3080 Tervuren, Belgium, +32 (0) 27695366 > > massimiliano.virgilio at africamuseum.be > > http://www.africamuseum.be/home/contact/staff/VIRGILIO_Massimiliano/ > > http://jemu.myspecies.info > > > > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: data.gtx > Type: application/octet-stream > Size: 9156 bytes > Desc: data.gtx > URL: > > ------------------------------ > > _______________________________________________ > 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 80, Issue 2 > ********************************************* From massimiliano.virgilio at africamuseum.be Tue Apr 7 16:53:19 2015 From: massimiliano.virgilio at africamuseum.be (Virgilio Massimiliano) Date: Tue, 7 Apr 2015 14:53:19 +0000 Subject: [adegenet-forum] adegenet-forum Digest, Vol 80, Issue 2 In-Reply-To: References: Message-ID: Hi Zhian, many thanks for your answer, The problem with aboot it that it calculates distances among individuals (and I have some 800 individuals) but not among populations. The reason I was using pairwise.fst of adegenet was that it has a pop argument, similarly dist.genpop works with populations. Or do you have a way of using aboot on populations? Cheers M. On 07/04/15 16:10, "Zhian Kamvar" wrote: >Hello, > >I have solved this problem in the package "poppr" >(http://cran.r-project.org/package=poppr). The function "aboot" will >calculate bootstrapped nj and upgma trees for any genetic distance >(http://rpackages.ianhowson.com/cran/poppr/man/aboot.html) (see the >second example). > >It doesn't do njs at the moment, but I can easily make a patch for that. > >Cheers, >Zhian > > >> On Apr 7, 2015, at 03:00 , >>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-fo >>rum >> >> 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. conversion genind to loci (Virgilio Massimiliano) >> >> >> ---------------------------------------------------------------------- >> >> Message: 1 >> Date: Mon, 6 Apr 2015 13:48:32 +0000 >> From: Virgilio Massimiliano >> To: "adegenet-forum at lists.r-forge.r-project.org" >> >> Subject: [adegenet-forum] conversion genind to loci >> Message-ID: <702BA0C8-1B27-4C0E-8E1C-41E36FADFB65 at africamuseum.be> >> Content-Type: text/plain; charset="utf-8" >> >> hi, >> I?m trying to make a bootstrapped njt on msat data, >> as far as I can understand, it?s not possible to bootstrap my loci >>starting from a genind object and this: >> >> myBoots <- boot.phylo(NJtree, data_genind at tab, B =100, function(xx) >>njs(dist(xx))) >> >> shouldn?t be correct as it bootstraps alleles (data_genind at tab) >> >> >> So I?m trying to convert my genind data into loci using genind2loci and >>read.loci : >> >> >> library(adegenet) >> data <- read.genetix("data.gtx") >> data_loci<-genind2loci(data) >> write.csv(data_loci, file = "data_loci.csv") >> library(pegas) >> data_pegas<-read.loci(file = "data_loci.csv", loci.sep = ",") >> >> and then get the tree (based on Fst, but it doesn?t work either with >>distances) >> >> pairFst <- pairwise.fst(data, res.type="matrix", truenames=TRUE) >> >> library(ape) >> njtreFst_pop <- njs(pairFst) >> myBoots <- boot.phylo(njtreFst_pop, as.matrix(data_pegas), B = 3, >>function(xx) >> njs(dist(xx))) >> >> but it doesn?t seem to work (I?m attaching the input file) and I get >>only error messages no matter what I try... >> >> What am I doing wrong? Is there a simpler way of getting bootstrapped >>msat loci starting form a genind object? >> >> greeting and many thanks in advance >> >> Massi >> >> >> >> __________________________________ >> Massimiliano Virgilio, PhD >> >> Royal Museum for Central Africa >> >> Joint Experimental Molecular Unit (JEMU) >> >> Leuvensesteenweg 13, B-3080 Tervuren, Belgium, +32 (0) 27695366 >> >> >>massimiliano.virgilio at africamuseum.be>museum.be> >> >> http://www.africamuseum.be/home/contact/staff/VIRGILIO_Massimiliano/ >> >> http://jemu.myspecies.info >> >> >> >> >> >> >> >> -------------- next part -------------- >> An HTML attachment was scrubbed... >> URL: >>>20150406/58a316bc/attachment-0001.html> >> -------------- next part -------------- >> A non-text attachment was scrubbed... >> Name: data.gtx >> Type: application/octet-stream >> Size: 9156 bytes >> Desc: data.gtx >> URL: >>>20150406/58a316bc/attachment-0001.obj> >> >> ------------------------------ >> >> _______________________________________________ >> 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-for >>um >> >> End of adegenet-forum Digest, Vol 80, Issue 2 >> ********************************************* > From zkamvar at gmail.com Tue Apr 7 16:54:31 2015 From: zkamvar at gmail.com (Zhian Kamvar) Date: Tue, 7 Apr 2015 07:54:31 -0700 Subject: [adegenet-forum] adegenet-forum Digest, Vol 80, Issue 2 In-Reply-To: References: Message-ID: <99496D1E-666D-4BF8-A4F2-86B2B964A55F@gmail.com> Actually, about does work on populations if you give it a genpop object. Cheers, Zhian > On Apr 7, 2015, at 07:53 , Virgilio Massimiliano wrote: > > Hi Zhian, > > many thanks for your answer, > > The problem with aboot it that it calculates distances among individuals > (and I have some 800 individuals) but not among populations. > > The reason I was using pairwise.fst of adegenet was that it has a pop > argument, similarly dist.genpop works with populations. > > Or do you have a way of using aboot on populations? > > Cheers > > M. > > > On 07/04/15 16:10, "Zhian Kamvar" wrote: > >> Hello, >> >> I have solved this problem in the package "poppr" >> (http://cran.r-project.org/package=poppr). The function "aboot" will >> calculate bootstrapped nj and upgma trees for any genetic distance >> (http://rpackages.ianhowson.com/cran/poppr/man/aboot.html) (see the >> second example). >> >> It doesn't do njs at the moment, but I can easily make a patch for that. >> >> Cheers, >> Zhian >> >> >>> On Apr 7, 2015, at 03:00 , >>> 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-fo >>> rum >>> >>> 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. conversion genind to loci (Virgilio Massimiliano) >>> >>> >>> ---------------------------------------------------------------------- >>> >>> Message: 1 >>> Date: Mon, 6 Apr 2015 13:48:32 +0000 >>> From: Virgilio Massimiliano >>> To: "adegenet-forum at lists.r-forge.r-project.org" >>> >>> Subject: [adegenet-forum] conversion genind to loci >>> Message-ID: <702BA0C8-1B27-4C0E-8E1C-41E36FADFB65 at africamuseum.be> >>> Content-Type: text/plain; charset="utf-8" >>> >>> hi, >>> I?m trying to make a bootstrapped njt on msat data, >>> as far as I can understand, it?s not possible to bootstrap my loci >>> starting from a genind object and this: >>> >>> myBoots <- boot.phylo(NJtree, data_genind at tab, B =100, function(xx) >>> njs(dist(xx))) >>> >>> shouldn?t be correct as it bootstraps alleles (data_genind at tab) >>> >>> >>> So I?m trying to convert my genind data into loci using genind2loci and >>> read.loci : >>> >>> >>> library(adegenet) >>> data <- read.genetix("data.gtx") >>> data_loci<-genind2loci(data) >>> write.csv(data_loci, file = "data_loci.csv") >>> library(pegas) >>> data_pegas<-read.loci(file = "data_loci.csv", loci.sep = ",") >>> >>> and then get the tree (based on Fst, but it doesn?t work either with >>> distances) >>> >>> pairFst <- pairwise.fst(data, res.type="matrix", truenames=TRUE) >>> >>> library(ape) >>> njtreFst_pop <- njs(pairFst) >>> myBoots <- boot.phylo(njtreFst_pop, as.matrix(data_pegas), B = 3, >>> function(xx) >>> njs(dist(xx))) >>> >>> but it doesn?t seem to work (I?m attaching the input file) and I get >>> only error messages no matter what I try... >>> >>> What am I doing wrong? Is there a simpler way of getting bootstrapped >>> msat loci starting form a genind object? >>> >>> greeting and many thanks in advance >>> >>> Massi >>> >>> >>> >>> __________________________________ >>> Massimiliano Virgilio, PhD >>> >>> Royal Museum for Central Africa >>> >>> Joint Experimental Molecular Unit (JEMU) >>> >>> Leuvensesteenweg 13, B-3080 Tervuren, Belgium, +32 (0) 27695366 >>> >>> >>> massimiliano.virgilio at africamuseum.be>> museum.be> >>> >>> http://www.africamuseum.be/home/contact/staff/VIRGILIO_Massimiliano/ >>> >>> http://jemu.myspecies.info >>> >>> >>> >>> >>> >>> >>> >>> -------------- next part -------------- >>> An HTML attachment was scrubbed... >>> URL: >>> >> 20150406/58a316bc/attachment-0001.html> >>> -------------- next part -------------- >>> A non-text attachment was scrubbed... >>> Name: data.gtx >>> Type: application/octet-stream >>> Size: 9156 bytes >>> Desc: data.gtx >>> URL: >>> >> 20150406/58a316bc/attachment-0001.obj> >>> >>> ------------------------------ >>> >>> _______________________________________________ >>> 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-for >>> um >>> >>> End of adegenet-forum Digest, Vol 80, Issue 2 >>> ********************************************* >> > From massimiliano.virgilio at africamuseum.be Tue Apr 7 17:57:33 2015 From: massimiliano.virgilio at africamuseum.be (Virgilio Massimiliano) Date: Tue, 7 Apr 2015 15:57:33 +0000 Subject: [adegenet-forum] adegenet-forum Digest, Vol 80, Issue 2 In-Reply-To: <99496D1E-666D-4BF8-A4F2-86B2B964A55F@gmail.com> References: <99496D1E-666D-4BF8-A4F2-86B2B964A55F@gmail.com> Message-ID: <903324BE-B7E2-406E-BA95-E07B3511D726@africamuseum.be> YES! that was the bit I was missing, many thanks for help cheers M. __________________________________ Massimiliano Virgilio, PhD Royal Museum for Central Africa Joint Experimental Molecular Unit (JEMU) Leuvensesteenweg 13, B-3080 Tervuren, Belgium, +32 (0) 27695366 massimiliano.virgilio at africamuseum.be http://www.africamuseum.be/home/contact/staff/VIRGILIO_Massimiliano/ http://jemu.myspecies.info On 07 Apr 2015, at 16:57, Zhian Kamvar > wrote: Actually, about does work on populations if you give it a genpop object. Cheers, Zhian On Apr 7, 2015, at 07:53 , Virgilio Massimiliano > wrote: Hi Zhian, many thanks for your answer, The problem with aboot it that it calculates distances among individuals (and I have some 800 individuals) but not among populations. The reason I was using pairwise.fst of adegenet was that it has a pop argument, similarly dist.genpop works with populations. Or do you have a way of using aboot on populations? Cheers M. On 07/04/15 16:10, "Zhian Kamvar" > wrote: Hello, I have solved this problem in the package "poppr" (http://cran.r-project.org/package=poppr). The function "aboot" will calculate bootstrapped nj and upgma trees for any genetic distance (http://rpackages.ianhowson.com/cran/poppr/man/aboot.html) (see the second example). It doesn't do njs at the moment, but I can easily make a patch for that. Cheers, Zhian On Apr 7, 2015, at 03:00 , 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-fo rum 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. conversion genind to loci (Virgilio Massimiliano) ---------------------------------------------------------------------- Message: 1 Date: Mon, 6 Apr 2015 13:48:32 +0000 From: Virgilio Massimiliano To: "adegenet-forum at lists.r-forge.r-project.org" Subject: [adegenet-forum] conversion genind to loci Message-ID: <702BA0C8-1B27-4C0E-8E1C-41E36FADFB65 at africamuseum.be> Content-Type: text/plain; charset="utf-8" hi, I?m trying to make a bootstrapped njt on msat data, as far as I can understand, it?s not possible to bootstrap my loci starting from a genind object and this: myBoots <- boot.phylo(NJtree, data_genind at tab, B =100, function(xx) njs(dist(xx))) shouldn?t be correct as it bootstraps alleles (data_genind at tab) So I?m trying to convert my genind data into loci using genind2loci and read.loci : library(adegenet) data <- read.genetix("data.gtx") data_loci<-genind2loci(data) write.csv(data_loci, file = "data_loci.csv") library(pegas) data_pegas<-read.loci(file = "data_loci.csv", loci.sep = ",") and then get the tree (based on Fst, but it doesn?t work either with distances) pairFst <- pairwise.fst(data, res.type="matrix", truenames=TRUE) library(ape) njtreFst_pop <- njs(pairFst) myBoots <- boot.phylo(njtreFst_pop, as.matrix(data_pegas), B = 3, function(xx) njs(dist(xx))) but it doesn?t seem to work (I?m attaching the input file) and I get only error messages no matter what I try... What am I doing wrong? Is there a simpler way of getting bootstrapped msat loci starting form a genind object? greeting and many thanks in advance Massi __________________________________ Massimiliano Virgilio, PhD Royal Museum for Central Africa Joint Experimental Molecular Unit (JEMU) Leuvensesteenweg 13, B-3080 Tervuren, Belgium, +32 (0) 27695366 massimiliano.virgilio at africamuseum.be http://www.africamuseum.be/home/contact/staff/VIRGILIO_Massimiliano/ http://jemu.myspecies.info -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: data.gtx Type: application/octet-stream Size: 9156 bytes Desc: data.gtx URL: ------------------------------ _______________________________________________ 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-for um End of adegenet-forum Digest, Vol 80, Issue 2 ********************************************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From crypticlineage at gmail.com Tue Apr 7 23:45:32 2015 From: crypticlineage at gmail.com (Vikram Chhatre) Date: Tue, 7 Apr 2015 17:45:32 -0400 Subject: [adegenet-forum] amova on genind object (using poppr) Message-ID: I am trying to do amova on individual loci within a genind object created from a structure formatted data set. Steps I have followed so far: mygenind <- import2genind(.....) myhier <- read.table('myhier.txt', header=T) head(myhier) Pop Reg 1 1 1 2 1 1 3 2 1 4 2 1 5 3 2 6 3 2 7 4 2 8 4 2 9 4 2 mygenclone <- as.genclone(mygenind) sethierarchy(mygenclone) <- myhier mygenclone_seploc <- seploc(mygenclone, truenames=TRUE, res.type('genind', 'matrix')) amova_res <- poppr.amova(mygenclone_seploc, ~Reg/Pop, within=TRUE) Error: mygenclone_seploc must be a genind object. ------------ Has anyone seen this error before? If anyone knows a workaround, I would appreciate hearing about it. The statistic works fine for 'over all loci', but I need to obtain per locus estimates. Thanks for any feedback. Vikram -------------- next part -------------- An HTML attachment was scrubbed... URL: From zkamvar at gmail.com Wed Apr 8 16:56:01 2015 From: zkamvar at gmail.com (Zhian Kamvar) Date: Wed, 8 Apr 2015 07:56:01 -0700 Subject: [adegenet-forum] adegenet-forum Digest, Vol 80, Issue 5 In-Reply-To: References: Message-ID: <12F5A7B4-572E-4B5B-99B1-E472BDE561B6@gmail.com> Vikram, This is off-topic for this forum. This is a forum for the adegenet package. Please submit questions about general methods or handling things across packages to the R-SIG-genetics group: https://stat.ethz.ch/mailman/listinfo/r-sig-genetics This specific issue is a poppr related issue (a bug) and should be submitted to the poppr forum: https://groups.google.com/forum/#!forum/poppr Cheers, Zhian > On Apr 8, 2015, at 03:00 , 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. amova on genind object (using poppr) (Vikram Chhatre) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 7 Apr 2015 17:45:32 -0400 > From: Vikram Chhatre > To: "adegenet-forum at lists.r-forge.r-project.org" > > Subject: [adegenet-forum] amova on genind object (using poppr) > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > I am trying to do amova on individual loci within a genind object created > from a structure formatted data set. > > Steps I have followed so far: > > mygenind <- import2genind(.....) > > myhier <- read.table('myhier.txt', header=T) > head(myhier) > > Pop Reg > 1 1 1 > 2 1 1 > 3 2 1 > 4 2 1 > 5 3 2 > 6 3 2 > 7 4 2 > 8 4 2 > 9 4 2 > > mygenclone <- as.genclone(mygenind) > > sethierarchy(mygenclone) <- myhier > > mygenclone_seploc <- seploc(mygenclone, truenames=TRUE, res.type('genind', > 'matrix')) > > amova_res <- poppr.amova(mygenclone_seploc, ~Reg/Pop, within=TRUE) > > Error: mygenclone_seploc must be a genind object. > > ------------ > Has anyone seen this error before? If anyone knows a workaround, I would > appreciate hearing about it. The statistic works fine for 'over all loci', > but I need to obtain per locus estimates. > > Thanks for any feedback. > Vikram > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > _______________________________________________ > 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 80, Issue 5 > ********************************************* From t.jombart at imperial.ac.uk Wed Apr 8 17:28:08 2015 From: t.jombart at imperial.ac.uk (Jombart, Thibaut) Date: Wed, 8 Apr 2015 15:28:08 +0000 Subject: [adegenet-forum] adegenet-forum Digest, Vol 80, Issue 5 In-Reply-To: <12F5A7B4-572E-4B5B-99B1-E472BDE561B6@gmail.com> References: , <12F5A7B4-572E-4B5B-99B1-E472BDE561B6@gmail.com> Message-ID: <2CB2DA8E426F3541AB1907F98ABA6570ABF11D8A@icexch-m1.ic.ac.uk> Hi guys, I'd like to emphasize Zhian's comment, as the R-sig-genetics is going to become more and more useful in the near future. A bunch of very good, nice and reactive people have subscribed recently, so it will likely become a more lively forum of discussion. Meaning that the adegenet forum is going to be more strictly reserved for adegenet-related issues. https://stat.ethz.ch/mailman/listinfo/r-sig-genetics All the best Thibaut ________________________________________ From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Zhian Kamvar [zkamvar at gmail.com] Sent: 08 April 2015 15:56 To: adegenet-forum at lists.r-forge.r-project.org Subject: Re: [adegenet-forum] adegenet-forum Digest, Vol 80, Issue 5 Vikram, This is off-topic for this forum. This is a forum for the adegenet package. Please submit questions about general methods or handling things across packages to the R-SIG-genetics group: https://stat.ethz.ch/mailman/listinfo/r-sig-genetics This specific issue is a poppr related issue (a bug) and should be submitted to the poppr forum: https://groups.google.com/forum/#!forum/poppr Cheers, Zhian > On Apr 8, 2015, at 03:00 , 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. amova on genind object (using poppr) (Vikram Chhatre) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 7 Apr 2015 17:45:32 -0400 > From: Vikram Chhatre > To: "adegenet-forum at lists.r-forge.r-project.org" > > Subject: [adegenet-forum] amova on genind object (using poppr) > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > I am trying to do amova on individual loci within a genind object created > from a structure formatted data set. > > Steps I have followed so far: > > mygenind <- import2genind(.....) > > myhier <- read.table('myhier.txt', header=T) > head(myhier) > > Pop Reg > 1 1 1 > 2 1 1 > 3 2 1 > 4 2 1 > 5 3 2 > 6 3 2 > 7 4 2 > 8 4 2 > 9 4 2 > > mygenclone <- as.genclone(mygenind) > > sethierarchy(mygenclone) <- myhier > > mygenclone_seploc <- seploc(mygenclone, truenames=TRUE, res.type('genind', > 'matrix')) > > amova_res <- poppr.amova(mygenclone_seploc, ~Reg/Pop, within=TRUE) > > Error: mygenclone_seploc must be a genind object. > > ------------ > Has anyone seen this error before? If anyone knows a workaround, I would > appreciate hearing about it. The statistic works fine for 'over all loci', > but I need to obtain per locus estimates. > > Thanks for any feedback. > Vikram > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > > ------------------------------ > > _______________________________________________ > 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 80, Issue 5 > ********************************************* _______________________________________________ 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 From crypticlineage at gmail.com Wed Apr 8 22:45:28 2015 From: crypticlineage at gmail.com (Vikram Chhatre) Date: Wed, 8 Apr 2015 16:45:28 -0400 Subject: [adegenet-forum] Keeping track of truenames Message-ID: When importing from Structure format, if the data contains entirely non-type markers, the import2genind function will remove such sites. The remaining sites, as it appears, are then sequentially named from L001 to L00n. Thus the identity of loci is lost. But it is possible to restore the original site names i.e. truenames in either genind or genpop objects. mygenind_tn <- truenames(mygenind) mygenpop_tn <- truenames(mygenpop) At least that's how I am interpreting this. Please correct me if I am wrong. A couple of observations, based on this: 1. After you apply truenames to the genpop object, contents of mygenpop$tab == mygenpop_tn. In other words, mygenpop_tn$table will not yield anything. Instead mygenpop_tn itself yields the allele count table. 2. If you apply truenames to a genind object, it is no longer recognized as a genind object. mygenpop_tn2 <- genind2genpop(mygenind_tn) Error in genind2genpop(mygenind_tn): x is not a valid genind object. 3. Likewise, mygenpop_tn isn't a valid genpop object either anymore. For example: myfreq <- makefreq(mygenpop_tn) Error in makefreq(mygenpop_tn): x is not a valid genpop object. So my question is how can I restore truenames for sites and samples without breaking the genind and genpop objects? Thanks Vikram -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.jombart at imperial.ac.uk Thu Apr 9 11:27:12 2015 From: t.jombart at imperial.ac.uk (Jombart, Thibaut) Date: Thu, 9 Apr 2015 09:27:12 +0000 Subject: [adegenet-forum] Keeping track of truenames In-Reply-To: References: Message-ID: <2CB2DA8E426F3541AB1907F98ABA6570ABF11F02@icexch-m1.ic.ac.uk> Hi Vikram, you are right. This is one of the many reasons behind the changes in adegenet 2.0-0, in which we drop the generic names altogether. We plan to release this new version over the month to come. Meanwhile, it can be installed easily from github: https://github.com/thibautjombart/adegenet Cheers Thibaut ============================== Dr Thibaut Jombart MRC Centre for Outbreak Analysis and Modelling Department of Infectious Disease Epidemiology Imperial College - School of Public Health Norfolk Place, London W2 1PG, UK Tel. : 0044 (0)20 7594 3658 http://sites.google.com/site/thibautjombart/ http://sites.google.com/site/therepiproject/ http://adegenet.r-forge.r-project.org/ Twitter: @thibautjombart ________________________________ From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Vikram Chhatre [crypticlineage at gmail.com] Sent: 08 April 2015 21:45 To: adegenet-forum at lists.r-forge.r-project.org Subject: [adegenet-forum] Keeping track of truenames When importing from Structure format, if the data contains entirely non-type markers, the import2genind function will remove such sites. The remaining sites, as it appears, are then sequentially named from L001 to L00n. Thus the identity of loci is lost. But it is possible to restore the original site names i.e. truenames in either genind or genpop objects. mygenind_tn <- truenames(mygenind) mygenpop_tn <- truenames(mygenpop) At least that's how I am interpreting this. Please correct me if I am wrong. A couple of observations, based on this: 1. After you apply truenames to the genpop object, contents of mygenpop$tab == mygenpop_tn. In other words, mygenpop_tn$table will not yield anything. Instead mygenpop_tn itself yields the allele count table. 2. If you apply truenames to a genind object, it is no longer recognized as a genind object. mygenpop_tn2 <- genind2genpop(mygenind_tn) Error in genind2genpop(mygenind_tn): x is not a valid genind object. 3. Likewise, mygenpop_tn isn't a valid genpop object either anymore. For example: myfreq <- makefreq(mygenpop_tn) Error in makefreq(mygenpop_tn): x is not a valid genpop object. So my question is how can I restore truenames for sites and samples without breaking the genind and genpop objects? Thanks Vikram -------------- next part -------------- An HTML attachment was scrubbed... URL: From kfetter at uvm.edu Mon Apr 13 17:24:05 2015 From: kfetter at uvm.edu (Karl Fetter) Date: Mon, 13 Apr 2015 11:24:05 -0400 Subject: [adegenet-forum] Saving BIC output of find.clusters? Message-ID: <61DFD13C-8881-4C2E-8590-9EC7265CC0FB@uvm.edu> Hi Adegenet Users, is there a handy way to save the BIC/AIC output of find.clusters? Not the figure, but the BIC/AIC data itself. I don't see this option as a flag to find.clusters. Thanks for your help, Karl Fetter Graduate Student Department of Plant Biology University of Vermont kfetter at uvm.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.jombart at imperial.ac.uk Mon Apr 13 17:35:55 2015 From: t.jombart at imperial.ac.uk (Jombart, Thibaut) Date: Mon, 13 Apr 2015 15:35:55 +0000 Subject: [adegenet-forum] Saving BIC output of find.clusters? In-Reply-To: <61DFD13C-8881-4C2E-8590-9EC7265CC0FB@uvm.edu> References: <61DFD13C-8881-4C2E-8590-9EC7265CC0FB@uvm.edu> Message-ID: <2CB2DA8E426F3541AB1907F98ABA6570ABF1294C@icexch-m1.ic.ac.uk> Hi Karl, yes, please check the doc and example of find.clusters. This is the slot $Kstat - there is even a couple of examples comparing BIC,AIC,WSS. Cheers Thibaut ________________________________ From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Karl Fetter [kfetter at uvm.edu] Sent: 13 April 2015 16:24 To: adegenet-forum at r-forge.wu-wien.ac.at Subject: [adegenet-forum] Saving BIC output of find.clusters? Hi Adegenet Users, is there a handy way to save the BIC/AIC output of find.clusters? Not the figure, but the BIC/AIC data itself. I don't see this option as a flag to find.clusters. Thanks for your help, Karl Fetter Graduate Student Department of Plant Biology University of Vermont kfetter at uvm.edu -------------- next part -------------- An HTML attachment was scrubbed... URL: From crypticlineage at gmail.com Tue Apr 14 17:22:17 2015 From: crypticlineage at gmail.com (Vikram Chhatre) Date: Tue, 14 Apr 2015 11:22:17 -0400 Subject: [adegenet-forum] Keeping track of truenames In-Reply-To: <2CB2DA8E426F3541AB1907F98ABA6570ABF11F02@icexch-m1.ic.ac.uk> References: <2CB2DA8E426F3541AB1907F98ABA6570ABF11F02@icexch-m1.ic.ac.uk> Message-ID: Hi Thibaut and others, After installing Adegenet 2.0, I am still seeing the generic locus and individual names. I am converting vcf files to structure format before importing it as a genind object. The structure file have actual locus and individual names which are lost in the genind object. Although, different from 1.4, the new version appears to assign generic names *before* deleting entirely nontype markers, thus, the sequence of names (though generic) is maintained. Still linking these generic names back to their actual names isn't a piece of cake (I wonder if this can be done within R?) Starting loci: M45, S29, P10, K46 Genind loci: L01, L02, L03, L04 Allele frequency table contains only two loci: L02, L04 because L01 and L03 are monomorphic. V On Thu, Apr 9, 2015 at 5:27 AM, Jombart, Thibaut wrote: > Hi Vikram, > > you are right. This is one of the many reasons behind the changes in > adegenet 2.0-0, in which we drop the generic names altogether. We plan to > release this new version over the month to come. Meanwhile, it can be > installed easily from github: > https://github.com/thibautjombart/adegenet > > Cheers > Thibaut > > ============================== > Dr Thibaut Jombart > MRC Centre for Outbreak Analysis and Modelling > Department of Infectious Disease Epidemiology > Imperial College - School of Public Health > Norfolk Place, London W2 1PG, UK > Tel. : 0044 (0)20 7594 3658 > http://sites.google.com/site/thibautjombart/ > http://sites.google.com/site/therepiproject/ > http://adegenet.r-forge.r-project.org/ > Twitter: @thibautjombart > > > ------------------------------ > *From:* adegenet-forum-bounces at lists.r-forge.r-project.org [ > adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Vikram > Chhatre [crypticlineage at gmail.com] > *Sent:* 08 April 2015 21:45 > *To:* adegenet-forum at lists.r-forge.r-project.org > *Subject:* [adegenet-forum] Keeping track of truenames > > When importing from Structure format, if the data contains entirely > non-type markers, the import2genind function will remove such sites. The > remaining sites, as it appears, are then sequentially named from L001 to > L00n. Thus the identity of loci is lost. > > But it is possible to restore the original site names i.e. truenames in > either genind or genpop objects. > > mygenind_tn <- truenames(mygenind) > mygenpop_tn <- truenames(mygenpop) > > At least that's how I am interpreting this. Please correct me if I am > wrong. > > A couple of observations, based on this: > > 1. After you apply truenames to the genpop object, contents of > mygenpop$tab == mygenpop_tn. In other words, mygenpop_tn$table will not > yield anything. Instead mygenpop_tn itself yields the allele count table. > > 2. If you apply truenames to a genind object, it is no longer recognized > as a genind object. > mygenpop_tn2 <- genind2genpop(mygenind_tn) > Error in genind2genpop(mygenind_tn): x is not a valid genind object. > > 3. Likewise, mygenpop_tn isn't a valid genpop object either anymore. > For example: > myfreq <- makefreq(mygenpop_tn) > Error in makefreq(mygenpop_tn): x is not a valid genpop object. > > So my question is how can I restore truenames for sites and samples > without breaking the genind and genpop objects? > > Thanks > Vikram > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From t.jombart at imperial.ac.uk Tue Apr 14 17:34:37 2015 From: t.jombart at imperial.ac.uk (Jombart, Thibaut) Date: Tue, 14 Apr 2015 15:34:37 +0000 Subject: [adegenet-forum] Keeping track of truenames In-Reply-To: References: <2CB2DA8E426F3541AB1907F98ABA6570ABF11F02@icexch-m1.ic.ac.uk>, Message-ID: <2CB2DA8E426F3541AB1907F98ABA6570ABF12D60@icexch-m1.ic.ac.uk> Hi there, can you please post this as an issue on github, including a reproducible example of the problem? https://github.com/thibautjombart/adegenet/issues Cheers Thibaut ________________________________ From: Vikram Chhatre [crypticlineage at gmail.com] Sent: 14 April 2015 16:22 To: Jombart, Thibaut; adegenet-forum at lists.r-forge.r-project.org Subject: Re: [adegenet-forum] Keeping track of truenames Hi Thibaut and others, After installing Adegenet 2.0, I am still seeing the generic locus and individual names. I am converting vcf files to structure format before importing it as a genind object. The structure file have actual locus and individual names which are lost in the genind object. Although, different from 1.4, the new version appears to assign generic names *before* deleting entirely nontype markers, thus, the sequence of names (though generic) is maintained. Still linking these generic names back to their actual names isn't a piece of cake (I wonder if this can be done within R?) Starting loci: M45, S29, P10, K46 Genind loci: L01, L02, L03, L04 Allele frequency table contains only two loci: L02, L04 because L01 and L03 are monomorphic. V On Thu, Apr 9, 2015 at 5:27 AM, Jombart, Thibaut > wrote: Hi Vikram, you are right. This is one of the many reasons behind the changes in adegenet 2.0-0, in which we drop the generic names altogether. We plan to release this new version over the month to come. Meanwhile, it can be installed easily from github: https://github.com/thibautjombart/adegenet Cheers Thibaut ============================== Dr Thibaut Jombart MRC Centre for Outbreak Analysis and Modelling Department of Infectious Disease Epidemiology Imperial College - School of Public Health Norfolk Place, London W2 1PG, UK Tel. : 0044 (0)20 7594 3658 http://sites.google.com/site/thibautjombart/ http://sites.google.com/site/therepiproject/ http://adegenet.r-forge.r-project.org/ Twitter: @thibautjombart ________________________________ From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Vikram Chhatre [crypticlineage at gmail.com] Sent: 08 April 2015 21:45 To: adegenet-forum at lists.r-forge.r-project.org Subject: [adegenet-forum] Keeping track of truenames When importing from Structure format, if the data contains entirely non-type markers, the import2genind function will remove such sites. The remaining sites, as it appears, are then sequentially named from L001 to L00n. Thus the identity of loci is lost. But it is possible to restore the original site names i.e. truenames in either genind or genpop objects. mygenind_tn <- truenames(mygenind) mygenpop_tn <- truenames(mygenpop) At least that's how I am interpreting this. Please correct me if I am wrong. A couple of observations, based on this: 1. After you apply truenames to the genpop object, contents of mygenpop$tab == mygenpop_tn. In other words, mygenpop_tn$table will not yield anything. Instead mygenpop_tn itself yields the allele count table. 2. If you apply truenames to a genind object, it is no longer recognized as a genind object. mygenpop_tn2 <- genind2genpop(mygenind_tn) Error in genind2genpop(mygenind_tn): x is not a valid genind object. 3. Likewise, mygenpop_tn isn't a valid genpop object either anymore. For example: myfreq <- makefreq(mygenpop_tn) Error in makefreq(mygenpop_tn): x is not a valid genpop object. So my question is how can I restore truenames for sites and samples without breaking the genind and genpop objects? Thanks Vikram -------------- next part -------------- An HTML attachment was scrubbed... URL: From crypticlineage at gmail.com Tue Apr 14 17:49:11 2015 From: crypticlineage at gmail.com (Vikram Chhatre) Date: Tue, 14 Apr 2015 11:49:11 -0400 Subject: [adegenet-forum] Keeping track of truenames In-Reply-To: <2CB2DA8E426F3541AB1907F98ABA6570ABF12D60@icexch-m1.ic.ac.uk> References: <2CB2DA8E426F3541AB1907F98ABA6570ABF11F02@icexch-m1.ic.ac.uk> <2CB2DA8E426F3541AB1907F98ABA6570ABF12D60@icexch-m1.ic.ac.uk> Message-ID: Will do, thank you. In the meantime, is there a quick way to get a list of markers that were deemed 'entirely nontype' by adegenet? Thanks Vikram On Tue, Apr 14, 2015 at 11:34 AM, Jombart, Thibaut wrote: > Hi there, > > can you please post this as an issue on github, including a reproducible > example of the problem? > https://github.com/thibautjombart/adegenet/issues > > Cheers > Thibaut > > ------------------------------ > *From:* Vikram Chhatre [crypticlineage at gmail.com] > *Sent:* 14 April 2015 16:22 > *To:* Jombart, Thibaut; adegenet-forum at lists.r-forge.r-project.org > *Subject:* Re: [adegenet-forum] Keeping track of truenames > > Hi Thibaut and others, > > After installing Adegenet 2.0, I am still seeing the generic locus and > individual names. I am converting vcf files to structure format before > importing it as a genind object. The structure file have actual locus and > individual names which are lost in the genind object. > > Although, different from 1.4, the new version appears to assign generic > names *before* deleting entirely nontype markers, thus, the sequence of > names (though generic) is maintained. Still linking these generic names > back to their actual names isn't a piece of cake (I wonder if this can be > done within R?) > > Starting loci: M45, S29, P10, K46 > Genind loci: L01, L02, L03, L04 > > Allele frequency table contains only two loci: L02, L04 because L01 and > L03 are monomorphic. > > V > > On Thu, Apr 9, 2015 at 5:27 AM, Jombart, Thibaut > wrote: > >> Hi Vikram, >> >> you are right. This is one of the many reasons behind the changes in >> adegenet 2.0-0, in which we drop the generic names altogether. We plan to >> release this new version over the month to come. Meanwhile, it can be >> installed easily from github: >> https://github.com/thibautjombart/adegenet >> >> Cheers >> Thibaut >> >> ============================== >> Dr Thibaut Jombart >> MRC Centre for Outbreak Analysis and Modelling >> Department of Infectious Disease Epidemiology >> Imperial College - School of Public Health >> Norfolk Place, London W2 1PG, UK >> Tel. : 0044 (0)20 7594 3658 >> http://sites.google.com/site/thibautjombart/ >> http://sites.google.com/site/therepiproject/ >> http://adegenet.r-forge.r-project.org/ >> Twitter: @thibautjombart >> >> >> ------------------------------ >> *From:* adegenet-forum-bounces at lists.r-forge.r-project.org [ >> adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Vikram >> Chhatre [crypticlineage at gmail.com] >> *Sent:* 08 April 2015 21:45 >> *To:* adegenet-forum at lists.r-forge.r-project.org >> *Subject:* [adegenet-forum] Keeping track of truenames >> >> When importing from Structure format, if the data contains entirely >> non-type markers, the import2genind function will remove such sites. The >> remaining sites, as it appears, are then sequentially named from L001 to >> L00n. Thus the identity of loci is lost. >> >> But it is possible to restore the original site names i.e. truenames in >> either genind or genpop objects. >> >> mygenind_tn <- truenames(mygenind) >> mygenpop_tn <- truenames(mygenpop) >> >> At least that's how I am interpreting this. Please correct me if I am >> wrong. >> >> A couple of observations, based on this: >> >> 1. After you apply truenames to the genpop object, contents of >> mygenpop$tab == mygenpop_tn. In other words, mygenpop_tn$table will not >> yield anything. Instead mygenpop_tn itself yields the allele count table. >> >> 2. If you apply truenames to a genind object, it is no longer >> recognized as a genind object. >> mygenpop_tn2 <- genind2genpop(mygenind_tn) >> Error in genind2genpop(mygenind_tn): x is not a valid genind object. >> >> 3. Likewise, mygenpop_tn isn't a valid genpop object either anymore. >> For example: >> myfreq <- makefreq(mygenpop_tn) >> Error in makefreq(mygenpop_tn): x is not a valid genpop object. >> >> So my question is how can I restore truenames for sites and samples >> without breaking the genind and genpop objects? >> >> Thanks >> Vikram >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From crypticlineage at gmail.com Wed Apr 15 20:23:07 2015 From: crypticlineage at gmail.com (Vikram Chhatre) Date: Wed, 15 Apr 2015 14:23:07 -0400 Subject: [adegenet-forum] Keeping track of truenames In-Reply-To: References: <2CB2DA8E426F3541AB1907F98ABA6570ABF11F02@icexch-m1.ic.ac.uk> <2CB2DA8E426F3541AB1907F98ABA6570ABF12D60@icexch-m1.ic.ac.uk> Message-ID: As Zhian pointed out on github ( https://github.com/thibautjombart/adegenet/issues/46), this isn't a bug. One just needs to tell adegenet what row contains marker names. mygenind <- import2genind('infile.str', onerowperind=F, row.marknames=1, n.ind=5, n.loc=10, col.lab=1, col.pop=2, ask=F) Now the genind object contains actual locus names, not generic ones. Thanks. Vikram On Tue, Apr 14, 2015 at 11:49 AM, Vikram Chhatre wrote: > Will do, thank you. > > In the meantime, is there a quick way to get a list of markers that were > deemed 'entirely nontype' by adegenet? > > Thanks > Vikram > > On Tue, Apr 14, 2015 at 11:34 AM, Jombart, Thibaut < > t.jombart at imperial.ac.uk> wrote: > >> Hi there, >> >> can you please post this as an issue on github, including a reproducible >> example of the problem? >> https://github.com/thibautjombart/adegenet/issues >> >> Cheers >> Thibaut >> >> ------------------------------ >> *From:* Vikram Chhatre [crypticlineage at gmail.com] >> *Sent:* 14 April 2015 16:22 >> *To:* Jombart, Thibaut; adegenet-forum at lists.r-forge.r-project.org >> *Subject:* Re: [adegenet-forum] Keeping track of truenames >> >> Hi Thibaut and others, >> >> After installing Adegenet 2.0, I am still seeing the generic locus and >> individual names. I am converting vcf files to structure format before >> importing it as a genind object. The structure file have actual locus and >> individual names which are lost in the genind object. >> >> Although, different from 1.4, the new version appears to assign generic >> names *before* deleting entirely nontype markers, thus, the sequence of >> names (though generic) is maintained. Still linking these generic names >> back to their actual names isn't a piece of cake (I wonder if this can be >> done within R?) >> >> Starting loci: M45, S29, P10, K46 >> Genind loci: L01, L02, L03, L04 >> >> Allele frequency table contains only two loci: L02, L04 because L01 and >> L03 are monomorphic. >> >> V >> >> On Thu, Apr 9, 2015 at 5:27 AM, Jombart, Thibaut < >> t.jombart at imperial.ac.uk> wrote: >> >>> Hi Vikram, >>> >>> you are right. This is one of the many reasons behind the changes in >>> adegenet 2.0-0, in which we drop the generic names altogether. We plan to >>> release this new version over the month to come. Meanwhile, it can be >>> installed easily from github: >>> https://github.com/thibautjombart/adegenet >>> >>> Cheers >>> Thibaut >>> >>> ============================== >>> Dr Thibaut Jombart >>> MRC Centre for Outbreak Analysis and Modelling >>> Department of Infectious Disease Epidemiology >>> Imperial College - School of Public Health >>> Norfolk Place, London W2 1PG, UK >>> Tel. : 0044 (0)20 7594 3658 >>> http://sites.google.com/site/thibautjombart/ >>> http://sites.google.com/site/therepiproject/ >>> http://adegenet.r-forge.r-project.org/ >>> Twitter: @thibautjombart >>> >>> >>> ------------------------------ >>> *From:* adegenet-forum-bounces at lists.r-forge.r-project.org [ >>> adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Vikram >>> Chhatre [crypticlineage at gmail.com] >>> *Sent:* 08 April 2015 21:45 >>> *To:* adegenet-forum at lists.r-forge.r-project.org >>> *Subject:* [adegenet-forum] Keeping track of truenames >>> >>> When importing from Structure format, if the data contains entirely >>> non-type markers, the import2genind function will remove such sites. The >>> remaining sites, as it appears, are then sequentially named from L001 to >>> L00n. Thus the identity of loci is lost. >>> >>> But it is possible to restore the original site names i.e. truenames >>> in either genind or genpop objects. >>> >>> mygenind_tn <- truenames(mygenind) >>> mygenpop_tn <- truenames(mygenpop) >>> >>> At least that's how I am interpreting this. Please correct me if I am >>> wrong. >>> >>> A couple of observations, based on this: >>> >>> 1. After you apply truenames to the genpop object, contents of >>> mygenpop$tab == mygenpop_tn. In other words, mygenpop_tn$table will not >>> yield anything. Instead mygenpop_tn itself yields the allele count table. >>> >>> 2. If you apply truenames to a genind object, it is no longer >>> recognized as a genind object. >>> mygenpop_tn2 <- genind2genpop(mygenind_tn) >>> Error in genind2genpop(mygenind_tn): x is not a valid genind object. >>> >>> 3. Likewise, mygenpop_tn isn't a valid genpop object either anymore. >>> For example: >>> myfreq <- makefreq(mygenpop_tn) >>> Error in makefreq(mygenpop_tn): x is not a valid genpop object. >>> >>> So my question is how can I restore truenames for sites and samples >>> without breaking the genind and genpop objects? >>> >>> Thanks >>> Vikram >>> >>> >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From crypticlineage at gmail.com Sat Apr 18 19:55:04 2015 From: crypticlineage at gmail.com (Vikram Chhatre) Date: Sat, 18 Apr 2015 13:55:04 -0400 Subject: [adegenet-forum] Adegenet 2.0.0 installation errors on OSX 10.8.2 Message-ID: I am having trouble installing adegenet devel version from github. Transcript follows; would appreciate any feedback. Thanks Vikram > devtools::install_github('thibautjombart/adegenet') Installing github repo adegenet/master from thibautjombart Downloading master.zip from https://github.com/thibautjombart/adegenet/archive/master.zip Installing package from /var/folders/ds/qq5m0j2j7kq6dzp69rq4gk4c0000gn/T//RtmpRk8F3n/master.zip arguments 'minimized' and 'invisible' are for Windows only Installing adegenet '/Library/Frameworks/R.framework/Resources/bin/R' --vanilla CMD INSTALL \ '/private/var/folders/ds/qq5m0j2j7kq6dzp69rq4gk4c0000gn/T/RtmpRk8F3n/devtools7f3b62eab846/adegenet-master' \ --library='/Library/Frameworks/R.framework/Versions/3.0/Resources/library' --install-tests * installing *source* package 'adegenet' ... ** libs llvm-gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c GLfunctions.c -o GLfunctions.o llvm-gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c adesub.c -o adesub.o llvm-gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c monmonier-utils.c -o monmonier-utils.o llvm-gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c sharedAll.c -o sharedAll.o llvm-gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c snpbin.c -o snpbin.o llvm-gcc-4.2 -arch x86_64 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -L/usr/local/lib -o adegenet.so GLfunctions.o adesub.o monmonier-utils.o sharedAll.o snpbin.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation installing to /Library/Frameworks/R.framework/Versions/3.0/Resources/library/adegenet/libs ** R ** data ** inst ** tests ** preparing package for lazy loading Error : object 'bind_rows' is not exported by 'namespace:dplyr' ERROR: lazy loading failed for package 'adegenet' * removing '/Library/Frameworks/R.framework/Versions/3.0/Resources/library/adegenet' * restoring previous '/Library/Frameworks/R.framework/Versions/3.0/Resources/library/adegenet' Error: Command failed (1) -------------- next part -------------- An HTML attachment was scrubbed... URL: From crypticlineage at gmail.com Sat Apr 18 20:06:11 2015 From: crypticlineage at gmail.com (Vikram Chhatre) Date: Sat, 18 Apr 2015 14:06:11 -0400 Subject: [adegenet-forum] Subsetting a genpop object for loc.nall Message-ID: I was hoping to subset the genpop object conditional upon number of alleles, but it doesn't seem to work. Are there any workarounds? >mygenpop_sub <- subset(mygenpop, mygenpop at loc.nall == 2) Error in tab[i, j, ..., drop = FALSE] : (subscript) logical subscript too long Thanks V -------------- next part -------------- An HTML attachment was scrubbed... URL: From zkamvar at gmail.com Sun Apr 19 18:45:51 2015 From: zkamvar at gmail.com (Zhian Kamvar) Date: Sun, 19 Apr 2015 09:45:51 -0700 Subject: [adegenet-forum] Adegenet 2.0.0 installation errors on OSX 10.8.2 In-Reply-To: References: Message-ID: <680ECD91-1BBD-45A0-87EB-C7815DC0DEF7@gmail.com> Hi Vikram, This might be an issue of a local outdated version of dplyr (which is a new dependency in adegenet). I have explicitly set the minimum version of dplyr required. It should work this time. If it doesn't, try reinstalling dplyr. Zhian > I am having trouble installing adegenet devel version from github. > Transcript follows; would appreciate any feedback. > > Thanks > Vikram > > Error : object 'bind_rows' is not exported by 'namespace:dplyr' From zkamvar at gmail.com Sun Apr 19 18:53:00 2015 From: zkamvar at gmail.com (Zhian Kamvar) Date: Sun, 19 Apr 2015 09:53:00 -0700 Subject: [adegenet-forum] Subsetting a genpop object for loc.nall In-Reply-To: References: Message-ID: Hi. The function subset is a wrapper for the square brackets that acts on the rows of a data frame or matrix. Since you want the loci (columns), you will need to use the loc argument: in adegenet 2.0: myloc <- locNames(mygenpop)[mygenpop at loc.nall == 2] mygenpop[loc = myloc] in adegenet 1.4: myloc <- names(locNames(mygenpop)[mygenpop at loc.nall == 2]) mygenpop[loc = myloc] Zhian > On Apr 19, 2015, at 03:00 , adegenet-forum-request at lists.r-forge.r-project.org wrote: > > I was hoping to subset the genpop object conditional upon number of > alleles, but it doesn't seem to work. Are there any workarounds? > >> mygenpop_sub <- subset(mygenpop, mygenpop at loc.nall == 2) > Error in tab[i, j, ..., drop = FALSE] : > (subscript) logical subscript too long > > Thanks > V From crypticlineage at gmail.com Mon Apr 20 04:30:04 2015 From: crypticlineage at gmail.com (Vikram Chhatre) Date: Sun, 19 Apr 2015 22:30:04 -0400 Subject: [adegenet-forum] Subsetting a genpop object for loc.nall In-Reply-To: References: Message-ID: Hi Zhian, What is the second line of code supposed to do? It seems to fail: > myloc <- locNames(mygenpop)[mygenpop at loc.nall == 2] > mygenpop[loc=myloc] Error in tab[i, j, ..., drop = FALSE] : (subscript) logical subscript too long On Sun, Apr 19, 2015 at 12:53 PM, Zhian Kamvar wrote: > Hi. > > The function subset is a wrapper for the square brackets that acts on the > rows of a data frame or matrix. > > Since you want the loci (columns), you will need to use the loc argument: > > in adegenet 2.0: > > myloc <- locNames(mygenpop)[mygenpop at loc.nall == 2] > mygenpop[loc = myloc] > > in adegenet 1.4: > > myloc <- names(locNames(mygenpop)[mygenpop at loc.nall == 2]) > mygenpop[loc = myloc] > > Zhian > > On Apr 19, 2015, at 03:00 , > adegenet-forum-request at lists.r-forge.r-project.org wrote: > > > > I was hoping to subset the genpop object conditional upon number of > > alleles, but it doesn't seem to work. Are there any workarounds? > > > >> mygenpop_sub <- subset(mygenpop, mygenpop at loc.nall == 2) > > Error in tab[i, j, ..., drop = FALSE] : > > (subscript) logical subscript too long > > > > Thanks > > V > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From crypticlineage at gmail.com Mon Apr 20 05:26:18 2015 From: crypticlineage at gmail.com (Vikram Chhatre) Date: Sun, 19 Apr 2015 23:26:18 -0400 Subject: [adegenet-forum] Adegenet 2.0.0 installation errors on OSX 10.8.2 In-Reply-To: <680ECD91-1BBD-45A0-87EB-C7815DC0DEF7@gmail.com> References: <680ECD91-1BBD-45A0-87EB-C7815DC0DEF7@gmail.com> Message-ID: That was indeed the problem. The dplyr package was outdated, but my R version was also too outdated to support one of the dependencies of dplyr failing it's installation. So I had to update R from 3.0.2 to 3.1.1. Now adegenet 2.0.0 installs properly. Still can't get the devel version of poppr, but the stable package installed without errors. Thanks Vikram On Sun, Apr 19, 2015 at 12:45 PM, Zhian Kamvar wrote: > Hi Vikram, > > This might be an issue of a local outdated version of dplyr (which is a > new dependency in adegenet). I have explicitly set the minimum version of > dplyr required. It should work this time. If it doesn't, try reinstalling > dplyr. > > Zhian > > > > I am having trouble installing adegenet devel version from github. > > Transcript follows; would appreciate any feedback. > > > > Thanks > > Vikram > > > > > Error : object 'bind_rows' is not exported by 'namespace:dplyr' > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From zkamvar at gmail.com Mon Apr 20 07:50:38 2015 From: zkamvar at gmail.com (Zhian Kamvar) Date: Sun, 19 Apr 2015 22:50:38 -0700 Subject: [adegenet-forum] Subsetting a genpop object for loc.nall In-Reply-To: References: Message-ID: <6265DAA1-F433-4BB5-9989-514BCC8BFB23@gmail.com> That appears to be a bug. I have fixed it. Zhian > On Apr 19, 2015, at 19:30 , Vikram Chhatre wrote: > > Hi Zhian, > > What is the second line of code supposed to do? It seems to fail: > > > myloc <- locNames(mygenpop)[mygenpop at loc.nall == 2] > > mygenpop[loc=myloc] > Error in tab[i, j, ..., drop = FALSE] : > (subscript) logical subscript too long > > > On Sun, Apr 19, 2015 at 12:53 PM, Zhian Kamvar wrote: > Hi. > > The function subset is a wrapper for the square brackets that acts on the rows of a data frame or matrix. > > Since you want the loci (columns), you will need to use the loc argument: > > in adegenet 2.0: > > myloc <- locNames(mygenpop)[mygenpop at loc.nall == 2] > mygenpop[loc = myloc] > > in adegenet 1.4: > > myloc <- names(locNames(mygenpop)[mygenpop at loc.nall == 2]) > mygenpop[loc = myloc] > > Zhian > > On Apr 19, 2015, at 03:00 , adegenet-forum-request at lists.r-forge.r-project.org wrote: > > > > I was hoping to subset the genpop object conditional upon number of > > alleles, but it doesn't seem to work. Are there any workarounds? > > > >> mygenpop_sub <- subset(mygenpop, mygenpop at loc.nall == 2) > > Error in tab[i, j, ..., drop = FALSE] : > > (subscript) logical subscript too long > > > > Thanks > > V > > From t.jombart at imperial.ac.uk Mon Apr 20 11:12:44 2015 From: t.jombart at imperial.ac.uk (Jombart, Thibaut) Date: Mon, 20 Apr 2015 09:12:44 +0000 Subject: [adegenet-forum] Adegenet 2.0.0 installation errors on OSX 10.8.2 In-Reply-To: References: Message-ID: <2CB2DA8E426F3541AB1907F98ABA6570ABF1A8C6@icexch-m1.ic.ac.uk> Hi Vikram, this really belong to the 'issue' system on github: https://github.com/thibautjombart/adegenet/issues Can you please post there so that we can discuss which R version, platform etc? Cheers Thibaut ________________________________ From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Vikram Chhatre [crypticlineage at gmail.com] Sent: 18 April 2015 18:55 To: adegenet-forum at lists.r-forge.r-project.org Subject: [adegenet-forum] Adegenet 2.0.0 installation errors on OSX 10.8.2 I am having trouble installing adegenet devel version from github. Transcript follows; would appreciate any feedback. Thanks Vikram > devtools::install_github('thibautjombart/adegenet') Installing github repo adegenet/master from thibautjombart Downloading master.zip from https://github.com/thibautjombart/adegenet/archive/master.zip Installing package from /var/folders/ds/qq5m0j2j7kq6dzp69rq4gk4c0000gn/T//RtmpRk8F3n/master.zip arguments 'minimized' and 'invisible' are for Windows only Installing adegenet '/Library/Frameworks/R.framework/Resources/bin/R' --vanilla CMD INSTALL \ '/private/var/folders/ds/qq5m0j2j7kq6dzp69rq4gk4c0000gn/T/RtmpRk8F3n/devtools7f3b62eab846/adegenet-master' \ --library='/Library/Frameworks/R.framework/Versions/3.0/Resources/library' --install-tests * installing *source* package 'adegenet' ... ** libs llvm-gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c GLfunctions.c -o GLfunctions.o llvm-gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c adesub.c -o adesub.o llvm-gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c monmonier-utils.c -o monmonier-utils.o llvm-gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c sharedAll.c -o sharedAll.o llvm-gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -fPIC -mtune=core2 -g -O2 -c snpbin.c -o snpbin.o llvm-gcc-4.2 -arch x86_64 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -L/usr/local/lib -o adegenet.so GLfunctions.o adesub.o monmonier-utils.o sharedAll.o snpbin.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation installing to /Library/Frameworks/R.framework/Versions/3.0/Resources/library/adegenet/libs ** R ** data ** inst ** tests ** preparing package for lazy loading Error : object 'bind_rows' is not exported by 'namespace:dplyr' ERROR: lazy loading failed for package 'adegenet' * removing '/Library/Frameworks/R.framework/Versions/3.0/Resources/library/adegenet' * restoring previous '/Library/Frameworks/R.framework/Versions/3.0/Resources/library/adegenet' Error: Command failed (1) -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.d.crandall at gmail.com Mon Apr 20 00:54:13 2015 From: eric.d.crandall at gmail.com (Eric Crandall) Date: Sun, 19 Apr 2015 15:54:13 -0700 Subject: [adegenet-forum] Segmentation Fault Message-ID: <561D2D2F-0617-4CB4-ABBF-DB8C9D80BF91@gmail.com> Dear Thibault or whom it may concern, Adegenet has recently started causing R to crash with a segmentation fault upon loading the library. I have tried re-installing the package from binary and from source, as well as re-installing R - all to no avail. Below is a traceback of the error from the R-console. Below that, I have posted an error message that is given when I try to install the package from source. I don?t encounter this error with any other R package that I have used recently. I am running R on a 2014 Macbook with OS X 10.10.3. Many thanks for your help and let me know if I can provide additional information. Sincerely, Eric Crandall Assistant Researcher University of Hawaii > R version 3.1.3 (2015-03-09) -- "Smooth Sidewalk" > Copyright (C) 2015 The R Foundation for Statistical Computing > Platform: x86_64-apple-darwin13.4.0 (64-bit) > > R is free software and comes with ABSOLUTELY NO WARRANTY. > You are welcome to redistribute it under certain conditions. > Type 'license()' or 'licence()' for distribution details. > > Natural language support but running in an English locale > > R is a collaborative project with many contributors. > Type 'contributors()' for more information and > 'citation()' on how to cite R or R packages in publications. > > Type 'demo()' for some demos, 'help()' for on-line help, or > 'help.start()' for an HTML browser interface to help. > Type 'q()' to quit R. > > [R.app GUI 1.65 (6913) x86_64-apple-darwin13.4.0] > > [Workspace restored from /Users/eric/.RData] > [History restored from /Users/eric/.Rapp.history] > >> library(adegenet) > Loading required package: ade4 > > *** caught segfault *** > address 0x0, cause 'memory not mapped' > > Traceback: > 1: doTryCatch(return(expr), name, parentenv, handler) > 2: tryCatchOne(expr, names, parentenv, handlers[[1L]]) > 3: tryCatchList(expr, classes, parentenv, handlers) > 4: tryCatch(fun(libname, pkgname), error = identity) > 5: runHook(".onLoad", env, package.lib, package) > 6: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) > 7: asNamespace(ns) > 8: namespaceImportFrom(ns, loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]), i[[2L]], from = package) > 9: loadNamespace(package, c(which.lib.loc, lib.loc)) > 10: doTryCatch(return(expr), name, parentenv, handler) > 11: tryCatchOne(expr, names, parentenv, handlers[[1L]]) > 12: tryCatchList(expr, classes, parentenv, handlers) > 13: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && identical(getOption("show.error.messages"), TRUE)) { cat(msg, file = stderr()) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) > 14: try({ ns <- loadNamespace(package, c(which.lib.loc, lib.loc)) env <- attachNamespace(ns, pos = pos, deps)}) > 15: library(adegenet) Installing the package from source: > > install.packages("/Users/eric/Downloads/adegenet_1.4-2.tar", repos = NULL, type="source") > Installing package into ?/Users/eric/Rlibs? > (as ?lib? is unspecified) > * installing *source* package ?adegenet? ... > ** package ?adegenet? successfully unpacked and MD5 sums checked > ** libs > clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c GLfunctions.c -o GLfunctions.o > clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c adesub.c -o adesub.o > clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c monmonier-utils.c -o monmonier-utils.o > clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c sharedAll.c -o sharedAll.o > clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c snpbin.c -o snpbin.o > clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o adegenet.so GLfunctions.o adesub.o monmonier-utils.o sharedAll.o snpbin.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation > installing to /Users/eric/Rlibs/adegenet/libs > ** R > ** data > ** inst > ** preparing package for lazy loading > > *** caught segfault *** > address 0x0, cause 'memory not mapped' > > Traceback: > 1: doTryCatch(return(expr), name, parentenv, handler) > 2: tryCatchOne(expr, names, parentenv, handlers[[1L]]) > 3: tryCatchList(expr, classes, parentenv, handlers) > 4: tryCatch(fun(libname, pkgname), error = identity) > 5: runHook(".onLoad", env, package.lib, package) > 6: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) > 7: asNamespace(ns) > 8: namespaceImportFrom(ns, loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]), i[[2L]], from = package) > 9: loadNamespace(package, lib.loc, keep.source, partial = TRUE) > 10: withCallingHandlers(expr, packageStartupMessage = function(c) invokeRestart("muffleMessage")) > 11: suppressPackageStartupMessages(loadNamespace(package, lib.loc, keep.source, partial = TRUE)) > 12: code2LazyLoadDB(package, lib.loc = lib.loc, keep.source = keep.source, compress = compress) > 13: makeLazyLoading(pkg_name, lib, keep.source = keep.source) > 14: doTryCatch(return(expr), name, parentenv, handler) > 15: tryCatchOne(expr, names, parentenv, handlers[[1L]]) > 16: tryCatchList(expr, classes, parentenv, handlers) > 17: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && identical(getOption("show.error.messages"), TRUE)) { cat(msg, file = stderr()) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) > 18: try({ suppressPackageStartupMessages(.getRequiredPackages(quietly = TRUE)) makeLazyLoading(pkg_name, lib, keep.source = keep.source)}) > 19: do_install_source(pkg_name, instdir, pkg, desc) > 20: do_install(pkg) > 21: tools:::.install_packages() > aborting ... > /Library/Frameworks/R.framework/Resources/bin/INSTALL: line 34: 12376 Done echo 'tools:::.install_packages()' > 12377 Segmentation fault: 11 | R_DEFAULT_PACKAGES= LC_COLLATE=C "${R_HOME}/bin/R" $myArgs --slave --args ${args} > Warning in install.packages : > installation of package ?/Users/eric/Downloads/adegenet_1.4-2.tar? had non-zero exit status From f.calboli at imperial.ac.uk Mon Apr 20 11:16:54 2015 From: f.calboli at imperial.ac.uk (Federico Calboli) Date: Mon, 20 Apr 2015 12:16:54 +0300 Subject: [adegenet-forum] Segmentation Fault In-Reply-To: <561D2D2F-0617-4CB4-ABBF-DB8C9D80BF91@gmail.com> References: <561D2D2F-0617-4CB4-ABBF-DB8C9D80BF91@gmail.com> Message-ID: > On 20 Apr 2015, at 01:54, Eric Crandall wrote: > > Dear Thibault or whom it may concern, > > Adegenet has recently started causing R to crash with a segmentation fault upon loading the library. I cannot reproduce it (i.e. the library loads fine): library(adegenet) Loading required package: ade4 ========================== adegenet 1.4-2 is loaded ========================== - to start, type '?adegenet' - to browse adegenet website, type 'adegenetWeb()' - to post questions/comments: adegenet-forum at lists.r-forge.r-project.org ? R version 3.2.0 (2015-04-16) -- "Full of Ingredients" Copyright (C) 2015 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin13.4.0 (64-bit) Mac OS 10.10.3 BW F > I have tried re-installing the package from binary and from source, as well as re-installing R - all to no avail. Below is a traceback of the error from the R-console. Below that, I have posted an error message that is given when I try to install the package from source. I don?t encounter this error with any other R package that I have used recently. I am running R on a 2014 Macbook with OS X 10.10.3. > > Many thanks for your help and let me know if I can provide additional information. > > Sincerely, > > Eric Crandall > Assistant Researcher > University of Hawaii > > >> R version 3.1.3 (2015-03-09) -- "Smooth Sidewalk" >> Copyright (C) 2015 The R Foundation for Statistical Computing >> Platform: x86_64-apple-darwin13.4.0 (64-bit) >> >> R is free software and comes with ABSOLUTELY NO WARRANTY. >> You are welcome to redistribute it under certain conditions. >> Type 'license()' or 'licence()' for distribution details. >> >> Natural language support but running in an English locale >> >> R is a collaborative project with many contributors. >> Type 'contributors()' for more information and >> 'citation()' on how to cite R or R packages in publications. >> >> Type 'demo()' for some demos, 'help()' for on-line help, or >> 'help.start()' for an HTML browser interface to help. >> Type 'q()' to quit R. >> >> [R.app GUI 1.65 (6913) x86_64-apple-darwin13.4.0] >> >> [Workspace restored from /Users/eric/.RData] >> [History restored from /Users/eric/.Rapp.history] >> >>> library(adegenet) >> Loading required package: ade4 >> >> *** caught segfault *** >> address 0x0, cause 'memory not mapped' >> >> Traceback: >> 1: doTryCatch(return(expr), name, parentenv, handler) >> 2: tryCatchOne(expr, names, parentenv, handlers[[1L]]) >> 3: tryCatchList(expr, classes, parentenv, handlers) >> 4: tryCatch(fun(libname, pkgname), error = identity) >> 5: runHook(".onLoad", env, package.lib, package) >> 6: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) >> 7: asNamespace(ns) >> 8: namespaceImportFrom(ns, loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]), i[[2L]], from = package) >> 9: loadNamespace(package, c(which.lib.loc, lib.loc)) >> 10: doTryCatch(return(expr), name, parentenv, handler) >> 11: tryCatchOne(expr, names, parentenv, handlers[[1L]]) >> 12: tryCatchList(expr, classes, parentenv, handlers) >> 13: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && identical(getOption("show.error.messages"), TRUE)) { cat(msg, file = stderr()) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) >> 14: try({ ns <- loadNamespace(package, c(which.lib.loc, lib.loc)) env <- attachNamespace(ns, pos = pos, deps)}) >> 15: library(adegenet) > > Installing the package from source: > >>> install.packages("/Users/eric/Downloads/adegenet_1.4-2.tar", repos = NULL, type="source") >> Installing package into ?/Users/eric/Rlibs? >> (as ?lib? is unspecified) >> * installing *source* package ?adegenet? ... >> ** package ?adegenet? successfully unpacked and MD5 sums checked >> ** libs >> clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c GLfunctions.c -o GLfunctions.o >> clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c adesub.c -o adesub.o >> clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c monmonier-utils.c -o monmonier-utils.o >> clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c sharedAll.c -o sharedAll.o >> clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c snpbin.c -o snpbin.o >> clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o adegenet.so GLfunctions.o adesub.o monmonier-utils.o sharedAll.o snpbin.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation >> installing to /Users/eric/Rlibs/adegenet/libs >> ** R >> ** data >> ** inst >> ** preparing package for lazy loading >> >> *** caught segfault *** >> address 0x0, cause 'memory not mapped' >> >> Traceback: >> 1: doTryCatch(return(expr), name, parentenv, handler) >> 2: tryCatchOne(expr, names, parentenv, handlers[[1L]]) >> 3: tryCatchList(expr, classes, parentenv, handlers) >> 4: tryCatch(fun(libname, pkgname), error = identity) >> 5: runHook(".onLoad", env, package.lib, package) >> 6: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) >> 7: asNamespace(ns) >> 8: namespaceImportFrom(ns, loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]), i[[2L]], from = package) >> 9: loadNamespace(package, lib.loc, keep.source, partial = TRUE) >> 10: withCallingHandlers(expr, packageStartupMessage = function(c) invokeRestart("muffleMessage")) >> 11: suppressPackageStartupMessages(loadNamespace(package, lib.loc, keep.source, partial = TRUE)) >> 12: code2LazyLoadDB(package, lib.loc = lib.loc, keep.source = keep.source, compress = compress) >> 13: makeLazyLoading(pkg_name, lib, keep.source = keep.source) >> 14: doTryCatch(return(expr), name, parentenv, handler) >> 15: tryCatchOne(expr, names, parentenv, handlers[[1L]]) >> 16: tryCatchList(expr, classes, parentenv, handlers) >> 17: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && identical(getOption("show.error.messages"), TRUE)) { cat(msg, file = stderr()) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) >> 18: try({ suppressPackageStartupMessages(.getRequiredPackages(quietly = TRUE)) makeLazyLoading(pkg_name, lib, keep.source = keep.source)}) >> 19: do_install_source(pkg_name, instdir, pkg, desc) >> 20: do_install(pkg) >> 21: tools:::.install_packages() >> aborting ... >> /Library/Frameworks/R.framework/Resources/bin/INSTALL: line 34: 12376 Done echo 'tools:::.install_packages()' >> 12377 Segmentation fault: 11 | R_DEFAULT_PACKAGES= LC_COLLATE=C "${R_HOME}/bin/R" $myArgs --slave --args ${args} >> Warning in install.packages : >> installation of package ?/Users/eric/Downloads/adegenet_1.4-2.tar? had non-zero exit status > _______________________________________________ > 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 From t.jombart at imperial.ac.uk Mon Apr 20 11:22:02 2015 From: t.jombart at imperial.ac.uk (Jombart, Thibaut) Date: Mon, 20 Apr 2015 09:22:02 +0000 Subject: [adegenet-forum] Segmentation Fault In-Reply-To: References: <561D2D2F-0617-4CB4-ABBF-DB8C9D80BF91@gmail.com>, Message-ID: <2CB2DA8E426F3541AB1907F98ABA6570ABF1A8F8@icexch-m1.ic.ac.uk> Hi there, again, this belongs to github's issue system. Please use it as there's really no other way to report and track bugs, feature requests etc.: https://github.com/thibautjombart/adegenet/issues Cheers Thibaut ________________________________________ From: adegenet-forum-bounces at lists.r-forge.r-project.org [adegenet-forum-bounces at lists.r-forge.r-project.org] on behalf of Federico Calboli [f.calboli at imperial.ac.uk] Sent: 20 April 2015 10:16 To: Eric Crandall Cc: adegenet-forum at lists.r-forge.r-project.org Subject: Re: [adegenet-forum] Segmentation Fault > On 20 Apr 2015, at 01:54, Eric Crandall wrote: > > Dear Thibault or whom it may concern, > > Adegenet has recently started causing R to crash with a segmentation fault upon loading the library. I cannot reproduce it (i.e. the library loads fine): library(adegenet) Loading required package: ade4 ========================== adegenet 1.4-2 is loaded ========================== - to start, type '?adegenet' - to browse adegenet website, type 'adegenetWeb()' - to post questions/comments: adegenet-forum at lists.r-forge.r-project.org ? R version 3.2.0 (2015-04-16) -- "Full of Ingredients" Copyright (C) 2015 The R Foundation for Statistical Computing Platform: x86_64-apple-darwin13.4.0 (64-bit) Mac OS 10.10.3 BW F > I have tried re-installing the package from binary and from source, as well as re-installing R - all to no avail. Below is a traceback of the error from the R-console. Below that, I have posted an error message that is given when I try to install the package from source. I don?t encounter this error with any other R package that I have used recently. I am running R on a 2014 Macbook with OS X 10.10.3. > > Many thanks for your help and let me know if I can provide additional information. > > Sincerely, > > Eric Crandall > Assistant Researcher > University of Hawaii > > >> R version 3.1.3 (2015-03-09) -- "Smooth Sidewalk" >> Copyright (C) 2015 The R Foundation for Statistical Computing >> Platform: x86_64-apple-darwin13.4.0 (64-bit) >> >> R is free software and comes with ABSOLUTELY NO WARRANTY. >> You are welcome to redistribute it under certain conditions. >> Type 'license()' or 'licence()' for distribution details. >> >> Natural language support but running in an English locale >> >> R is a collaborative project with many contributors. >> Type 'contributors()' for more information and >> 'citation()' on how to cite R or R packages in publications. >> >> Type 'demo()' for some demos, 'help()' for on-line help, or >> 'help.start()' for an HTML browser interface to help. >> Type 'q()' to quit R. >> >> [R.app GUI 1.65 (6913) x86_64-apple-darwin13.4.0] >> >> [Workspace restored from /Users/eric/.RData] >> [History restored from /Users/eric/.Rapp.history] >> >>> library(adegenet) >> Loading required package: ade4 >> >> *** caught segfault *** >> address 0x0, cause 'memory not mapped' >> >> Traceback: >> 1: doTryCatch(return(expr), name, parentenv, handler) >> 2: tryCatchOne(expr, names, parentenv, handlers[[1L]]) >> 3: tryCatchList(expr, classes, parentenv, handlers) >> 4: tryCatch(fun(libname, pkgname), error = identity) >> 5: runHook(".onLoad", env, package.lib, package) >> 6: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) >> 7: asNamespace(ns) >> 8: namespaceImportFrom(ns, loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]), i[[2L]], from = package) >> 9: loadNamespace(package, c(which.lib.loc, lib.loc)) >> 10: doTryCatch(return(expr), name, parentenv, handler) >> 11: tryCatchOne(expr, names, parentenv, handlers[[1L]]) >> 12: tryCatchList(expr, classes, parentenv, handlers) >> 13: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && identical(getOption("show.error.messages"), TRUE)) { cat(msg, file = stderr()) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) >> 14: try({ ns <- loadNamespace(package, c(which.lib.loc, lib.loc)) env <- attachNamespace(ns, pos = pos, deps)}) >> 15: library(adegenet) > > Installing the package from source: > >>> install.packages("/Users/eric/Downloads/adegenet_1.4-2.tar", repos = NULL, type="source") >> Installing package into ?/Users/eric/Rlibs? >> (as ?lib? is unspecified) >> * installing *source* package ?adegenet? ... >> ** package ?adegenet? successfully unpacked and MD5 sums checked >> ** libs >> clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c GLfunctions.c -o GLfunctions.o >> clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c adesub.c -o adesub.o >> clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c monmonier-utils.c -o monmonier-utils.o >> clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c sharedAll.c -o sharedAll.o >> clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include -fPIC -Wall -mtune=core2 -g -O2 -c snpbin.c -o snpbin.o >> clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o adegenet.so GLfunctions.o adesub.o monmonier-utils.o sharedAll.o snpbin.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation >> installing to /Users/eric/Rlibs/adegenet/libs >> ** R >> ** data >> ** inst >> ** preparing package for lazy loading >> >> *** caught segfault *** >> address 0x0, cause 'memory not mapped' >> >> Traceback: >> 1: doTryCatch(return(expr), name, parentenv, handler) >> 2: tryCatchOne(expr, names, parentenv, handlers[[1L]]) >> 3: tryCatchList(expr, classes, parentenv, handlers) >> 4: tryCatch(fun(libname, pkgname), error = identity) >> 5: runHook(".onLoad", env, package.lib, package) >> 6: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) >> 7: asNamespace(ns) >> 8: namespaceImportFrom(ns, loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]), i[[2L]], from = package) >> 9: loadNamespace(package, lib.loc, keep.source, partial = TRUE) >> 10: withCallingHandlers(expr, packageStartupMessage = function(c) invokeRestart("muffleMessage")) >> 11: suppressPackageStartupMessages(loadNamespace(package, lib.loc, keep.source, partial = TRUE)) >> 12: code2LazyLoadDB(package, lib.loc = lib.loc, keep.source = keep.source, compress = compress) >> 13: makeLazyLoading(pkg_name, lib, keep.source = keep.source) >> 14: doTryCatch(return(expr), name, parentenv, handler) >> 15: tryCatchOne(expr, names, parentenv, handlers[[1L]]) >> 16: tryCatchList(expr, classes, parentenv, handlers) >> 17: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && identical(getOption("show.error.messages"), TRUE)) { cat(msg, file = stderr()) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) >> 18: try({ suppressPackageStartupMessages(.getRequiredPackages(quietly = TRUE)) makeLazyLoading(pkg_name, lib, keep.source = keep.source)}) >> 19: do_install_source(pkg_name, instdir, pkg, desc) >> 20: do_install(pkg) >> 21: tools:::.install_packages() >> aborting ... >> /Library/Frameworks/R.framework/Resources/bin/INSTALL: line 34: 12376 Done echo 'tools:::.install_packages()' >> 12377 Segmentation fault: 11 | R_DEFAULT_PACKAGES= LC_COLLATE=C "${R_HOME}/bin/R" $myArgs --slave --args ${args} >> Warning in install.packages : >> installation of package ?/Users/eric/Downloads/adegenet_1.4-2.tar? had non-zero exit status > _______________________________________________ > 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 _______________________________________________ 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 From zkamvar at gmail.com Mon Apr 20 18:15:29 2015 From: zkamvar at gmail.com (Zhian Kamvar) Date: Mon, 20 Apr 2015 09:15:29 -0700 Subject: [adegenet-forum] Segmentation Fault In-Reply-To: References: Message-ID: <46B5A670-69D2-4E07-BE50-4146CEA2F5AB@gmail.com> I have experience this error before and I was lucky enough to have a segfault at address 0x18, because that's the result that produces the most helpful answers. It is not an issue with adegenet, but rather something corrupted in your library. The recommendation is to reinstall all of your packages as suggested here: http://stackoverflow.com/a/25833832/2752888 Since this is not an adegenet issue and I have had experience with this, you may respond to me (not to the list) if you have any more inquiries. Cheers, Zhian > On Apr 20, 2015, at 02:22 , adegenet-forum-request at lists.r-forge.r-project.org wrote: > > Dear Thibault or whom it may concern, > > Adegenet has recently started causing R to crash with a segmentation fault upon loading the library. I have tried re-installing the package from binary and from source, as well as re-installing R - all to no avail. Below is a traceback of the error from the R-console. Below that, I have posted an error message that is given when I try to install the package from source. I don?t encounter this error with any other R package that I have used recently. I am running R on a 2014 Macbook with OS X 10.10.3. > > Many thanks for your help and let me know if I can provide additional information. > > Sincerely, > > Eric Crandall > Assistant Researcher > University of Hawaii > > >> R version 3.1.3 (2015-03-09) -- "Smooth Sidewalk" >> Copyright (C) 2015 The R Foundation for Statistical Computing >> Platform: x86_64-apple-darwin13.4.0 (64-bit) >> >> R is free software and comes with ABSOLUTELY NO WARRANTY. >> You are welcome to redistribute it under certain conditions. >> Type 'license()' or 'licence()' for distribution details. >> >> Natural language support but running in an English locale >> >> R is a collaborative project with many contributors. >> Type 'contributors()' for more information and >> 'citation()' on how to cite R or R packages in publications. >> >> Type 'demo()' for some demos, 'help()' for on-line help, or >> 'help.start()' for an HTML browser interface to help. >> Type 'q()' to quit R. >> >> [R.app GUI 1.65 (6913) x86_64-apple-darwin13.4.0] >> >> [Workspace restored from /Users/eric/.RData] >> [History restored from /Users/eric/.Rapp.history] >> >>> library(adegenet) >> Loading required package: ade4 >> >> *** caught segfault *** >> address 0x0, cause 'memory not mapped' >> >> Traceback: >> 1: doTryCatch(return(expr), name, parentenv, handler) >> 2: tryCatchOne(expr, names, parentenv, handlers[[1L]]) >> 3: tryCatchList(expr, classes, parentenv, handlers) >> 4: tryCatch(fun(libname, pkgname), error = identity) >> 5: runHook(".onLoad", env, package.lib, package) >> 6: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) >> 7: asNamespace(ns) >> 8: namespaceImportFrom(ns, loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]), i[[2L]], from = package) >> 9: loadNamespace(package, c(which.lib.loc, lib.loc)) >> 10: doTryCatch(return(expr), name, parentenv, handler) >> 11: tryCatchOne(expr, names, parentenv, handlers[[1L]]) >> 12: tryCatchList(expr, classes, parentenv, handlers) >> 13: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && identical(getOption("show.error.messages"), TRUE)) { cat(msg, file = stderr()) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) >> 14: try({ ns <- loadNamespace(package, c(which.lib.loc, lib.loc)) env <- attachNamespace(ns, pos = pos, deps)}) >> 15: library(adegenet) > From eric.d.crandall at gmail.com Mon Apr 20 21:15:50 2015 From: eric.d.crandall at gmail.com (Eric Crandall) Date: Mon, 20 Apr 2015 12:15:50 -0700 Subject: [adegenet-forum] Segmentation Fault In-Reply-To: <46B5A670-69D2-4E07-BE50-4146CEA2F5AB@gmail.com> References: <46B5A670-69D2-4E07-BE50-4146CEA2F5AB@gmail.com> Message-ID: Hi Zhian and all, Thanks for your help - for the record, this suggestion worked. I thought it was unique to my computer but didn?t know where to take such an issue. I will refer technical issues such as this to the github issue system in the future. -Eric > On Apr 20, 2015, at 9:15 AM, Zhian Kamvar wrote: > > I have experience this error before and I was lucky enough to have a segfault at address 0x18, because that's the result that produces the most helpful answers. > > It is not an issue with adegenet, but rather something corrupted in your library. The recommendation is to reinstall all of your packages as suggested here: http://stackoverflow.com/a/25833832/2752888 > > Since this is not an adegenet issue and I have had experience with this, you may respond to me (not to the list) if you have any more inquiries. > > Cheers, > Zhian > >> On Apr 20, 2015, at 02:22 , adegenet-forum-request at lists.r-forge.r-project.org wrote: >> >> Dear Thibault or whom it may concern, >> >> Adegenet has recently started causing R to crash with a segmentation fault upon loading the library. I have tried re-installing the package from binary and from source, as well as re-installing R - all to no avail. Below is a traceback of the error from the R-console. Below that, I have posted an error message that is given when I try to install the package from source. I don?t encounter this error with any other R package that I have used recently. I am running R on a 2014 Macbook with OS X 10.10.3. >> >> Many thanks for your help and let me know if I can provide additional information. >> >> Sincerely, >> >> Eric Crandall >> Assistant Researcher >> University of Hawaii >> >> >>> R version 3.1.3 (2015-03-09) -- "Smooth Sidewalk" >>> Copyright (C) 2015 The R Foundation for Statistical Computing >>> Platform: x86_64-apple-darwin13.4.0 (64-bit) >>> >>> R is free software and comes with ABSOLUTELY NO WARRANTY. >>> You are welcome to redistribute it under certain conditions. >>> Type 'license()' or 'licence()' for distribution details. >>> >>> Natural language support but running in an English locale >>> >>> R is a collaborative project with many contributors. >>> Type 'contributors()' for more information and >>> 'citation()' on how to cite R or R packages in publications. >>> >>> Type 'demo()' for some demos, 'help()' for on-line help, or >>> 'help.start()' for an HTML browser interface to help. >>> Type 'q()' to quit R. >>> >>> [R.app GUI 1.65 (6913) x86_64-apple-darwin13.4.0] >>> >>> [Workspace restored from /Users/eric/.RData] >>> [History restored from /Users/eric/.Rapp.history] >>> >>>> library(adegenet) >>> Loading required package: ade4 >>> >>> *** caught segfault *** >>> address 0x0, cause 'memory not mapped' >>> >>> Traceback: >>> 1: doTryCatch(return(expr), name, parentenv, handler) >>> 2: tryCatchOne(expr, names, parentenv, handlers[[1L]]) >>> 3: tryCatchList(expr, classes, parentenv, handlers) >>> 4: tryCatch(fun(libname, pkgname), error = identity) >>> 5: runHook(".onLoad", env, package.lib, package) >>> 6: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) >>> 7: asNamespace(ns) >>> 8: namespaceImportFrom(ns, loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]), i[[2L]], from = package) >>> 9: loadNamespace(package, c(which.lib.loc, lib.loc)) >>> 10: doTryCatch(return(expr), name, parentenv, handler) >>> 11: tryCatchOne(expr, names, parentenv, handlers[[1L]]) >>> 12: tryCatchList(expr, classes, parentenv, handlers) >>> 13: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && identical(getOption("show.error.messages"), TRUE)) { cat(msg, file = stderr()) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) >>> 14: try({ ns <- loadNamespace(package, c(which.lib.loc, lib.loc)) env <- attachNamespace(ns, pos = pos, deps)}) >>> 15: library(adegenet) -------------- next part -------------- An HTML attachment was scrubbed... URL: From eric.d.crandall at gmail.com Mon Apr 20 21:15:50 2015 From: eric.d.crandall at gmail.com (Eric Crandall) Date: Mon, 20 Apr 2015 12:15:50 -0700 Subject: [adegenet-forum] Segmentation Fault In-Reply-To: <46B5A670-69D2-4E07-BE50-4146CEA2F5AB@gmail.com> References: <46B5A670-69D2-4E07-BE50-4146CEA2F5AB@gmail.com> Message-ID: Hi Zhian and all, Thanks for your help - for the record, this suggestion worked. I thought it was unique to my computer but didn?t know where to take such an issue. I will refer technical issues such as this to the github issue system in the future. -Eric > On Apr 20, 2015, at 9:15 AM, Zhian Kamvar wrote: > > I have experience this error before and I was lucky enough to have a segfault at address 0x18, because that's the result that produces the most helpful answers. > > It is not an issue with adegenet, but rather something corrupted in your library. The recommendation is to reinstall all of your packages as suggested here: http://stackoverflow.com/a/25833832/2752888 > > Since this is not an adegenet issue and I have had experience with this, you may respond to me (not to the list) if you have any more inquiries. > > Cheers, > Zhian > >> On Apr 20, 2015, at 02:22 , adegenet-forum-request at lists.r-forge.r-project.org wrote: >> >> Dear Thibault or whom it may concern, >> >> Adegenet has recently started causing R to crash with a segmentation fault upon loading the library. I have tried re-installing the package from binary and from source, as well as re-installing R - all to no avail. Below is a traceback of the error from the R-console. Below that, I have posted an error message that is given when I try to install the package from source. I don?t encounter this error with any other R package that I have used recently. I am running R on a 2014 Macbook with OS X 10.10.3. >> >> Many thanks for your help and let me know if I can provide additional information. >> >> Sincerely, >> >> Eric Crandall >> Assistant Researcher >> University of Hawaii >> >> >>> R version 3.1.3 (2015-03-09) -- "Smooth Sidewalk" >>> Copyright (C) 2015 The R Foundation for Statistical Computing >>> Platform: x86_64-apple-darwin13.4.0 (64-bit) >>> >>> R is free software and comes with ABSOLUTELY NO WARRANTY. >>> You are welcome to redistribute it under certain conditions. >>> Type 'license()' or 'licence()' for distribution details. >>> >>> Natural language support but running in an English locale >>> >>> R is a collaborative project with many contributors. >>> Type 'contributors()' for more information and >>> 'citation()' on how to cite R or R packages in publications. >>> >>> Type 'demo()' for some demos, 'help()' for on-line help, or >>> 'help.start()' for an HTML browser interface to help. >>> Type 'q()' to quit R. >>> >>> [R.app GUI 1.65 (6913) x86_64-apple-darwin13.4.0] >>> >>> [Workspace restored from /Users/eric/.RData] >>> [History restored from /Users/eric/.Rapp.history] >>> >>>> library(adegenet) >>> Loading required package: ade4 >>> >>> *** caught segfault *** >>> address 0x0, cause 'memory not mapped' >>> >>> Traceback: >>> 1: doTryCatch(return(expr), name, parentenv, handler) >>> 2: tryCatchOne(expr, names, parentenv, handlers[[1L]]) >>> 3: tryCatchList(expr, classes, parentenv, handlers) >>> 4: tryCatch(fun(libname, pkgname), error = identity) >>> 5: runHook(".onLoad", env, package.lib, package) >>> 6: loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) >>> 7: asNamespace(ns) >>> 8: namespaceImportFrom(ns, loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]), i[[2L]], from = package) >>> 9: loadNamespace(package, c(which.lib.loc, lib.loc)) >>> 10: doTryCatch(return(expr), name, parentenv, handler) >>> 11: tryCatchOne(expr, names, parentenv, handlers[[1L]]) >>> 12: tryCatchList(expr, classes, parentenv, handlers) >>> 13: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call)[1L] prefix <- paste("Error in", dcall, ": ") LONG <- 75L msg <- conditionMessage(e) sm <- strsplit(msg, "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && identical(getOption("show.error.messages"), TRUE)) { cat(msg, file = stderr()) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))}) >>> 14: try({ ns <- loadNamespace(package, c(which.lib.loc, lib.loc)) env <- attachNamespace(ns, pos = pos, deps)}) >>> 15: library(adegenet) -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas.dussex at gmail.com Thu Apr 30 02:50:03 2015 From: nicolas.dussex at gmail.com (Nicolas Dussex) Date: Thu, 30 Apr 2015 12:50:03 +1200 Subject: [adegenet-forum] labeling individuals in scatter pot Message-ID: Hi, I am doing a DAPC for a dataset that contains 6 populations. Among all my samples, there are three different morphs and each population contains a variable mixture of each. What I want to do is to use a different color for each population (I managed to do it) and use a different type of point for each sample according to its moprhotype. I have a file that contains this info ( 1 colomn with either X, W or WR). I tried using pch as described below, but the labels do not correspond to the individuals. dapc1 <- dapc(Z1, n.pca = 10, n.da = 3) c<-morph_data_6m[,1] scatter(dapc1, cstar=0,cex=2.5, cell=0, label=NULL, leg = TRUE,scree.da=FALSE,txt.leg = c("233","287","418","674","878","957","1085"), *pch=c*) Would there be a way to assign to each individual a type of point corresponding to its morphotype? Say point for W, star for X and triangle for WR. Thanks for your help! Nic -- Nic Dussex PhD Department of Zoology University of Otago 340 Great King Street P.O.Box 56 Dunedin 9054 New Zealand Mobile: +64 21 02790938 -------------- next part -------------- An HTML attachment was scrubbed... URL: From pfresia at gmail.com Thu Apr 30 03:03:47 2015 From: pfresia at gmail.com (pablo fresia) Date: Wed, 29 Apr 2015 22:03:47 -0300 Subject: [adegenet-forum] labeling individuals in scatter pot In-Reply-To: References: Message-ID: Hi Nicolas, what's going on, if you try something like this below ? myCol <- c("darkblue","darkgreen","red") scatter(dapc, scree.da=FALSE, bg="white", pch=20, solid=.4, cex=0, cstar=1, clab=1, col=myCol) par(xpd=TRUE) points(dapc$ind.coord[1:90,], pch=17, cex=1, col="black") par(xpd=TRUE) points(dapc$ind.coord[91:218,], pch=18, cex=1.4, col="black") par(xpd=TRUE) points(dapc$ind.coord[219:326,], pch=21, cex=1, col="black") par(xpd=TRUE) points(dapc$ind.coord[327:392,], pch=20, cex=1.3, col="black") good luck! pablo On 29 April 2015 at 21:50, Nicolas Dussex wrote: > Hi, > > I am doing a DAPC for a dataset that contains 6 populations. Among all my > samples, there are three different morphs and each population contains a > variable mixture of each. What I want to do is to use a different color for > each population (I managed to do it) and use a different type of point for > each sample according to its moprhotype. I have a file that contains this > info ( 1 colomn with either X, W or WR). > > I tried using pch as described below, but the labels do not correspond to > the individuals. > > dapc1 <- dapc(Z1, n.pca = 10, n.da = 3) > c<-morph_data_6m[,1] > scatter(dapc1, cstar=0,cex=2.5, cell=0, label=NULL, leg = > TRUE,scree.da=FALSE,txt.leg = > c("233","287","418","674","878","957","1085"), *pch=c*) > > Would there be a way to assign to each individual a type of point > corresponding to its morphotype? Say point for W, star for X and triangle > for WR. > > Thanks for your help! > Nic > > > -- > Nic Dussex PhD > Department of Zoology > University of Otago > 340 Great King Street > P.O.Box 56 > Dunedin 9054 > New Zealand > > Mobile: +64 21 02790938 > > _______________________________________________ > 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: From nicolas.dussex at gmail.com Thu Apr 30 03:43:08 2015 From: nicolas.dussex at gmail.com (Nicolas Dussex) Date: Thu, 30 Apr 2015 13:43:08 +1200 Subject: [adegenet-forum] labeling individuals in scatter pot In-Reply-To: References: Message-ID: Hi Pablo, well, I tried but it does pretty much the same thing (i.e. 1 color per pop and no info on the moprhology, for the latter a file with morphology info is needed). Also I get this error message: > myCol <- c("darkblue","darkgreen","red") > scatter(dapc1, scree.da=FALSE, bg="white", pch=20, solid=.4, cex=0, cstar=1, clab=1, col=myCol) > par(xpd=TRUE) > points(dapc$ind.coord[1:90,], + pch=17, cex=1, col="black") *Error in dapc$ind.coord : object of type 'closure' is not subsettable* > par(xpd=TRUE) > points(dapc$ind.coord[91:218,], + pch=18, cex=1.4, col="black") *Error in dapc$ind.coord : object of type 'closure' is not subsettable* > par(xpd=TRUE) > points(dapc$ind.coord[219:326,], + pch=21, cex=1, col="black") *Error in dapc$ind.coord : object of type 'closure' is not subsettable* > par(xpd=TRUE) > points(dapc$ind.coord[327:392,], + pch=20, cex=1.3, col="black") *Error in dapc$ind.coord : object of type 'closure' is not subsettable* Cheers Nic On 30 April 2015 at 13:03, pablo fresia wrote: > Hi Nicolas, > > what's going on, if you try something like this below ? > > myCol <- c("darkblue","darkgreen","red") > scatter(dapc, scree.da=FALSE, bg="white", pch=20, solid=.4, cex=0, > cstar=1, clab=1, col=myCol) > par(xpd=TRUE) > points(dapc$ind.coord[1:90,], > pch=17, cex=1, col="black") > par(xpd=TRUE) > points(dapc$ind.coord[91:218,], > pch=18, cex=1.4, col="black") > par(xpd=TRUE) > points(dapc$ind.coord[219:326,], > pch=21, cex=1, col="black") > par(xpd=TRUE) > points(dapc$ind.coord[327:392,], > pch=20, cex=1.3, col="black") > > good luck! > pablo > > > On 29 April 2015 at 21:50, Nicolas Dussex > wrote: > >> Hi, >> >> I am doing a DAPC for a dataset that contains 6 populations. Among all my >> samples, there are three different morphs and each population contains a >> variable mixture of each. What I want to do is to use a different color for >> each population (I managed to do it) and use a different type of point for >> each sample according to its moprhotype. I have a file that contains this >> info ( 1 colomn with either X, W or WR). >> >> I tried using pch as described below, but the labels do not correspond to >> the individuals. >> >> dapc1 <- dapc(Z1, n.pca = 10, n.da = 3) >> c<-morph_data_6m[,1] >> scatter(dapc1, cstar=0,cex=2.5, cell=0, label=NULL, leg = >> TRUE,scree.da=FALSE,txt.leg = >> c("233","287","418","674","878","957","1085"), *pch=c*) >> >> Would there be a way to assign to each individual a type of point >> corresponding to its morphotype? Say point for W, star for X and triangle >> for WR. >> >> Thanks for your help! >> Nic >> >> >> -- >> Nic Dussex PhD >> Department of Zoology >> University of Otago >> 340 Great King Street >> P.O.Box 56 >> Dunedin 9054 >> New Zealand >> >> Mobile: +64 21 02790938 >> >> _______________________________________________ >> 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 >> > > -- Nic Dussex PhD Department of Zoology University of Otago 340 Great King Street P.O.Box 56 Dunedin 9054 New Zealand Mobile: +64 21 02790938 -------------- next part -------------- An HTML attachment was scrubbed... URL: From pfresia at gmail.com Thu Apr 30 04:28:54 2015 From: pfresia at gmail.com (pablo fresia) Date: Wed, 29 Apr 2015 23:28:54 -0300 Subject: [adegenet-forum] labeling individuals in scatter pot In-Reply-To: References: Message-ID: ... the errors are probably because of the bounds within [..., ...] I got this error message now: > > > points(dapc1$ind.coord[1:90,], > + pch=17, cex=1, col="black") > Error in dapc1$ind.coord[1:90, ] : subscript out of bounds > > par(xpd=TRUE) > > points(dapc1$ind.coord[91:218,], > + pch=18, cex=1.4, col="black") > Error in dapc1$ind.coord[91:218, ] : subscript out of bounds > > par(xpd=TRUE) > > points(dapc1$ind.coord[219:326,], > + pch=21, cex=1, col="black") > Error in dapc1$ind.coord[219:326, ] : subscript out of bounds > > par(xpd=TRUE) > > points(dapc1$ind.coord[327:392,], > + pch=20, cex=1.3, col="black") > Error in dapc1$ind.coord[327:392, ] : subscript out of bounds > > I thought about sorting indviduals by morphotype, but not sure how to do > it as I want to keep the population info too. My samples are grouped by > population at this stage. > ... mixing both approaches may be you find a way. I figure, if you keep the inds organized by pop but dividing it by morphotype you can assign colors and symbols in the way you need. eg. pop 1: 1 to 30 inds, 1-15 morph 1 and 16-30 morph 2: > points(dapc1$ind.coord[1:15,], pch=17, cex=1, col="black") > points(dapc1$ind.coord[16:30,], pch=18, cex=1, col="black") and so on... If I run this: > > scatter(dapc1, cstar=0,cex=2.5, cell=0, label=NULL, leg = > TRUE,scree.da=FALSE,txt.leg = > c("233","287","418","674","878","957","1085")) #pch=c)#col = myCol) > par(new=TRUE) > df <- data.frame(x = dapc1$ind.coord[,1], y = dapc1$ind.coord[,2]) > morph_data_6m<-read.table("morph_data_6m.txt", header=T) > c<-morph_data_6m[,1] > s.label(dfxy = df, xax=1, yax=2, > label=c,clabel=0.7,boxes=FALSE,grid=FALSE, addaxes=FALSE) > > I obtain a plot of coloured dots corresponding to each population and I > then add the morphotype label (W, WR or X; from my "moprh_data_6m.txt" > file) on top of each dot, but it gets difficult to read when dots overlap > (see example attached) > best pablo > On 30 April 2015 at 13:53, pablo fresia wrote: > >> ... maybe, the individuals needs to be by organized morphotype before to >> run the DAPC. >> >> On 29 April 2015 at 22:49, pablo fresia wrote: >> >>> Hi Nic, >>> >>> an error, should be here >>> >>> > myCol <- c("darkblue","darkgreen","red") >>>> > scatter(dapc1, scree.da=FALSE, bg="white", pch=20, solid=.4, cex=0, >>>> cstar=1, clab=1, col=myCol) >>>> > par(xpd=TRUE) >>>> > points(*dapc1*$ind.coord[1:90,], >>>> + pch=17, cex=1, col="black") >>>> *Error in dapc$ind.coord : object of type 'closure' is not subsettable* >>>> > par(xpd=TRUE) >>>> > points(*dapc1*$ind.coord[91:218,], >>>> + pch=18, cex=1.4, col="black") >>>> *Error in dapc$ind.coord : object of type 'closure' is not subsettable* >>>> > par(xpd=TRUE) >>>> > points(*dapc1*$ind.coord[219:326,], >>>> + pch=21, cex=1, col="black") >>>> *Error in dapc$ind.coord : object of type 'closure' is not subsettable* >>>> > par(xpd=TRUE) >>>> > points(*dapc1*$ind.coord[327:392,], >>>> + pch=20, cex=1.3, col="black") >>>> *Error in dapc$ind.coord : object of type 'closure' is not subsettable* >>>> >>> >>> cheers, >>> pablo >>> >>> >>>> On 30 April 2015 at 13:03, pablo fresia wrote: >>>> >>>>> Hi Nicolas, >>>>> >>>>> what's going on, if you try something like this below ? >>>>> >>>>> myCol <- c("darkblue","darkgreen","red") >>>>> scatter(dapc, scree.da=FALSE, bg="white", pch=20, solid=.4, cex=0, >>>>> cstar=1, clab=1, col=myCol) >>>>> par(xpd=TRUE) >>>>> points(dapc$ind.coord[1:90,], >>>>> pch=17, cex=1, col="black") >>>>> par(xpd=TRUE) >>>>> points(dapc$ind.coord[91:218,], >>>>> pch=18, cex=1.4, col="black") >>>>> par(xpd=TRUE) >>>>> points(dapc$ind.coord[219:326,], >>>>> pch=21, cex=1, col="black") >>>>> par(xpd=TRUE) >>>>> points(dapc$ind.coord[327:392,], >>>>> pch=20, cex=1.3, col="black") >>>>> >>>>> good luck! >>>>> pablo >>>>> >>>>> >>>>> On 29 April 2015 at 21:50, Nicolas Dussex >>>>> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I am doing a DAPC for a dataset that contains 6 populations. Among >>>>>> all my samples, there are three different morphs and each population >>>>>> contains a variable mixture of each. What I want to do is to use a >>>>>> different color for each population (I managed to do it) and use a >>>>>> different type of point for each sample according to its moprhotype. I have >>>>>> a file that contains this info ( 1 colomn with either X, W or WR). >>>>>> >>>>>> I tried using pch as described below, but the labels do not >>>>>> correspond to the individuals. >>>>>> >>>>>> dapc1 <- dapc(Z1, n.pca = 10, n.da = 3) >>>>>> c<-morph_data_6m[,1] >>>>>> scatter(dapc1, cstar=0,cex=2.5, cell=0, label=NULL, leg = >>>>>> TRUE,scree.da=FALSE,txt.leg = >>>>>> c("233","287","418","674","878","957","1085"), *pch=c*) >>>>>> >>>>>> Would there be a way to assign to each individual a type of point >>>>>> corresponding to its morphotype? Say point for W, star for X and triangle >>>>>> for WR. >>>>>> >>>>>> Thanks for your help! >>>>>> Nic >>>>>> >>>>>> >>>>>> -- >>>>>> Nic Dussex PhD >>>>>> Department of Zoology >>>>>> University of Otago >>>>>> 340 Great King Street >>>>>> P.O.Box 56 >>>>>> Dunedin 9054 >>>>>> New Zealand >>>>>> >>>>>> Mobile: +64 21 02790938 >>>>>> >>>>>> _______________________________________________ >>>>>> 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 >>>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> Nic Dussex PhD >>>> Department of Zoology >>>> University of Otago >>>> 340 Great King Street >>>> P.O.Box 56 >>>> Dunedin 9054 >>>> New Zealand >>>> >>>> Mobile: +64 21 02790938 >>>> >>> >>> >> > > > -- > Nic Dussex PhD > Department of Zoology > University of Otago > 340 Great King Street > P.O.Box 56 > Dunedin 9054 > New Zealand > > Mobile: +64 21 02790938 > -------------- next part -------------- An HTML attachment was scrubbed... URL: