From j.ovenden at uq.edu.au Thu Jan 24 07:10:57 2019 From: j.ovenden at uq.edu.au (Jennifer Ovenden) Date: Thu, 24 Jan 2019 06:10:57 +0000 Subject: [adegenet-forum] Exporting images from DAPC web server Message-ID: <792BE513-6A4D-4055-A4E8-4206FE1C46F9@uq.edu.au> Hi Forum members Does anyone know how to export images such as scatter plots, loading plots etc from the DAPC web server? Thanks, Jenny Associate Professor Jennifer R Ovenden School of Biomedical Sciences, Faculty of Medicine The University of Queensland Brisbane Qld 4072 Australia T +61 7 3346 0806 M +61 415 949 410 E j.ovenden at uq.edu.au W molecularfisherieslaboratory.com.au Read Jenny?s essay about working in science ?.. https://academic.oup.com/icesjms/advance-article/doi/10.1093/icesjms/fsy132/5146511 CRICOS code: 00025B -------------- next part -------------- An HTML attachment was scrubbed... URL: From him21024 at um.es Thu Jan 24 12:58:03 2019 From: him21024 at um.es (HELENA IBANEZ MARTINEZ) Date: Thu, 24 Jan 2019 12:58:03 +0100 Subject: [adegenet-forum] Doubt with DAPC without prior K (find.clusters) In-Reply-To: <20190124084409.Horde.ktIxSFAGw008SqkmzbyQrg1@webmail.um.es> References: <20190123113342.Horde.KnKInFY_Qn6NzTv6Nken1g3@webmail.um.es> <20190124084409.Horde.ktIxSFAGw008SqkmzbyQrg1@webmail.um.es> Message-ID: <20190124125803.Horde.qNuJJ_Isk90YdT1hJQqhTw5@webmail.um.es> HELENA IBANEZ MARTINEZ escribi?: > HELENA IBANEZ MARTINEZ escribi?: > >> HELLO, MY NAME IS HELENA, >> >> I HAVE A QUESTION ABOUT MY DAPC ANALAYSES. >> >> I'M FOLLOWING THE TUTORIAL STEP BY STEP AND I GET THE DAPC GRAPH OF MY >> DATA VERY WELL, BUT MY PROBLEM IS WHEN I REPEAT THE PROCESS MY GRAPHIC >> RESULTS COME OUT COMPLETELY DIFFERENT EVERY TIME... >> >> MY QUESTION IS, WHY DO SUCH DIFFERENT RESULTS COME OUT IF I'M REPEATING >> EXACTLY THE SAME (SAME DATA AND SAME PARAMETERS)? IT HAPPENS TO ME >> EVERY TIME I DO IT. WHAT CAN I BE DOING WRONG? >> >> HERE I LEAVE THE EXAMPLE OF MY CODE: 135 INDIVIDUALS WITH 8 LOCI >> SAMPLED IN 6 DIFFERENT LOCATIONS >> >> PERCA <-READ.STRUCTURE("PERCAPOPNAME.STR", >> ???????????????????????????????????? ONEROWPERIND=TRUE, >> ????????????????????? ? ? ? ? ? ? ?? N.IND=135, >> ????????????????????? ? ? ? ? ? ? ?? N.LOC=8, >> ???????????????????????????????????? COL.LAB=1, >> ???????????????????????????????????? COL.POP=2, >> ???????????????????????????????????? ROW.MARKNAMES=1, >> ???????????????????????????????????? ASK=FALSE) >> >> PERCA_GRP6 <-FIND.CLUSTERS(PERCA, MAX.N.CLUST = 10) >> 200 >> 6 >> >> DAPC6 <-DAPC(PERCA, PERCA_GRP6$GRP) >> 200 >> 5 >> >> SCATTER(DAPC6) >> >> THANK YOU. >> >> Hi, my name is Helena, >> >> I have a question about my DAPC analayses. >> >> I'm following the tutorial step by step and well, I get the DAPC graph >> of my data, but the problem is that when I repeat this my graphic >> results come out completely different, therefore they are not >> reliable... >> My question is, why do such different results come out if I'm repeating >> exactly the same? It happens to me every time I do it. What can I be >> doing wrong? >> >> Here my code: >> >> perca <-read.structure("PercaPopName.str", >> ????????????????????????????????????? onerowperind=TRUE, >> ????????????????????????????????????? n.ind=135, >> ????????????????????????????????????? n.loc=8, >> ????????????????????????????????????? col.lab=1, >> ????????????????????????????????????? col.pop=2, >> ????????????????????????????????????? row.marknames=1, >> ????????????????????????????????????? ask=FALSE) >> >> dapc1 <-dapc(perca, perca_grp$grp) >> >> 200 >> 6 >> >> scatter(dapc1) >> >> HELLO AGAIN, I`M HELENA, SORRY BUT I INTRODUCED MY CODE WRONG YESTERDAY: >> >> THIS IS MY CODE: >> >> PERCA <-READ.STRUCTURE("PERCAPOPNAME.STR", >> ???????????????????????????????????? ONEROWPERIND=TRUE, >> ????????????????????? ? ? ? ? ? ? ?? N.IND=135, >> ????????????????????? ? ? ? ? ? ? ?? N.LOC=8, >> ???????????????????????????????????? COL.LAB=1, >> ???????????????????????????????????? COL.POP=2, >> ???????????????????????????????????? ROW.MARKNAMES=1, >> ???????????????????????????????????? ASK=FALSE) >> >> PERCA_GRP6 <-FIND.CLUSTERS(PERCA, MAX.N.CLUST = 10) >> 200 >> 6 >> >> DAPC6 <-DAPC(PERCA, PERCA_GRP6$GRP) >> 200 >> 5 >> >> SCATTER(DAPC6) >> >> THANK YOU >> ? > > ? -------------- next part -------------- An HTML attachment was scrubbed... URL: From cathy.bouffartigue at inra.fr Thu Jan 24 13:43:57 2019 From: cathy.bouffartigue at inra.fr (Cathy Bouffartigue) Date: Thu, 24 Jan 2019 12:43:57 +0000 Subject: [adegenet-forum] Doubt with DAPC without prior K (find.clusters) In-Reply-To: <20190124125803.Horde.qNuJJ_Isk90YdT1hJQqhTw5@webmail.um.es> References: <20190123113342.Horde.KnKInFY_Qn6NzTv6Nken1g3@webmail.um.es> <20190124084409.Horde.ktIxSFAGw008SqkmzbyQrg1@webmail.um.es> <20190124125803.Horde.qNuJJ_Isk90YdT1hJQqhTw5@webmail.um.es> Message-ID: <34ce4d4860c344f4be877e71bfea595d@idfdcpripexmu02.inra.local> Hi Helena, This is due to the k-means algorithm used in the find.cluster function which use a different seed for its initialization each time you?re running your code. You have to set the seed before running your find.cluster function to ensure the reproducibility of your results. set.seeds(24012019) perca_grp6 <-find.clusters(perca, max.n.clust = 10) Good luck with your analyses! Cathy [Description?: cid:43BA2359-25C8-49EA-9D28-BCFD56FD115B at toulouse.inra.fr] _____________________________ Cathy Bouffartigue Doctorante/ PhD student cathy.bouffartigue at inra.fr Centre Inra Occitanie-Toulouse Fixe : +33 (0)5 61 28 57 74 Mobile : +33 (0)6 14 57 34 55 _____________________________ Chemin de Borde Rouge CS 52627 31326 Castanet Tolosan cedex www.toulouse.inra.fr De : adegenet-forum De la part de HELENA IBANEZ MARTINEZ Envoy? : jeudi 24 janvier 2019 12:58 ? : adegenet-forum at lists.r-forge.r-project.org Objet : Re: [adegenet-forum] Doubt with DAPC without prior K (find.clusters) HELENA IBANEZ MARTINEZ > escribi?: HELENA IBANEZ MARTINEZ > escribi?: Hello, my name is Helena, I have a question about my DAPC analayses. I'm following the tutorial step by step and I get the DAPC graph of my data very well, but my problem is when I repeat the process my graphic results come out completely different every time... My question is, why do such different results come out if I'm repeating exactly the same (same data and same parameters)? It happens to me every time I do it. What can I be doing wrong? Here I leave the example of my code: 135 individuals with 8 loci sampled in 6 different locations perca <-read.structure("PercaPopName.str", onerowperind=TRUE, n.ind=135, n.loc=8, col.lab=1, col.pop=2, row.marknames=1, ask=FALSE) perca_grp6 <-find.clusters(perca, max.n.clust = 10) 200 6 dapc6 <-dapc(perca, perca_grp6$grp) 200 5 scatter(dapc6) Thank you. Hi, my name is Helena, I have a question about my DAPC analayses. I'm following the tutorial step by step and well, I get the DAPC graph of my data, but the problem is that when I repeat this my graphic results come out completely different, therefore they are not reliable... My question is, why do such different results come out if I'm repeating exactly the same? It happens to me every time I do it. What can I be doing wrong? Here my code: perca <-read.structure("PercaPopName.str", onerowperind=TRUE, n.ind=135, n.loc=8, col.lab=1, col.pop=2, row.marknames=1, ask=FALSE) dapc1 <-dapc(perca, perca_grp$grp) 200 6 scatter(dapc1) Hello again, I`m Helena, sorry but I introduced my code wrong yesterday: This is my code: perca <-read.structure("PercaPopName.str", onerowperind=TRUE, n.ind=135, n.loc=8, col.lab=1, col.pop=2, row.marknames=1, ask=FALSE) perca_grp6 <-find.clusters(perca, max.n.clust = 10) 200 6 dapc6 <-dapc(perca, perca_grp6$grp) 200 5 scatter(dapc6) Thank you -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 2135 bytes Desc: image001.jpg URL: From thibautjombart at gmail.com Thu Jan 24 18:31:37 2019 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Thu, 24 Jan 2019 17:31:37 +0000 Subject: [adegenet-forum] Doubt with DAPC without prior K (find.clusters) In-Reply-To: <34ce4d4860c344f4be877e71bfea595d@idfdcpripexmu02.inra.local> References: <20190123113342.Horde.KnKInFY_Qn6NzTv6Nken1g3@webmail.um.es> <20190124084409.Horde.ktIxSFAGw008SqkmzbyQrg1@webmail.um.es> <20190124125803.Horde.qNuJJ_Isk90YdT1hJQqhTw5@webmail.um.es> <34ce4d4860c344f4be877e71bfea595d@idfdcpripexmu02.inra.local> Message-ID: Hi there, yep. To add to this: you can increase the number of random starting points e.g. n.start = 50 to smooth the results. Best Thibaut -- Dr Thibaut Jombart Associate Professor in Outbreak Analytics, London School of Hygiene and Tropical Medicine Senior Lecturer in Genetic Analysis, Imperial College London President of RECON: repidemicsconsortium.org https://thibautjombart.netlify.com Twitter: @TeebzR On Thu, 24 Jan 2019 at 12:44, Cathy Bouffartigue wrote: > Hi Helena, > > > > This is due to the k-means algorithm used in the find.cluster function > which use a different seed for its initialization each time you?re running > your code. You have to set the seed before running your find.cluster > function to ensure the reproducibility of your results. > > > > set.seeds(24012019) > > *perca_grp6 <-find.clusters(perca, max.n.clust = 10)* > > > > > > *Good luck with your analyses!* > > > > *Cathy* > > > > [image: Description : > cid:43BA2359-25C8-49EA-9D28-BCFD56FD115B at toulouse.inra.fr] > > > *_____________________________ **Cathy Bouffartigue* > Doctorante/ PhD student > > cathy.bouffartigue at inra.fr > > > > *Centre Inra Occitanie-Toulouse* > > Fixe : +33 (0)5 61 28 57 74 > > Mobile : +33 (0)6 14 57 34 55 > > > > > *_____________________________ * > Chemin de Borde Rouge CS 52627 > 31326 Castanet Tolosan cedex > > > *www.toulouse.inra.fr* > > > > > > *De :* adegenet-forum > *De la part de* HELENA IBANEZ MARTINEZ > *Envoy? :* jeudi 24 janvier 2019 12:58 > *? :* adegenet-forum at lists.r-forge.r-project.org > *Objet :* Re: [adegenet-forum] Doubt with DAPC without prior K > (find.clusters) > > > > HELENA IBANEZ MARTINEZ escribi?: > > HELENA IBANEZ MARTINEZ escribi?: > > *Hello, my name is Helena,* > > > > > > > > * I have a question about my DAPC analayses. I'm following the tutorial > step by step and I get the DAPC graph of my data very well, but my problem > is when I repeat the process my graphic results come out completely > different every time... My question is, why do such different results come > out if I'm repeating exactly the same (same data and same parameters)? It > happens to me every time I do it. What can I be doing wrong? Here I leave > the example of my code: 135 individuals with 8 loci sampled in 6 different > locations* > > *perca <-read.structure("PercaPopName.str",* > > > > > > > > > > > > > > > > > * onerowperind=TRUE, > n.ind=135, > n.loc=8, col.lab=1, > col.pop=2, > row.marknames=1, > ask=FALSE) perca_grp6 > <-find.clusters(perca, max.n.clust = 10) 200 6 dapc6 <-dapc(perca, > perca_grp6$grp) 200 5 scatter(dapc6)* > > *Thank you.* > > > > > > Hi, my name is Helena, > > I have a question about my DAPC analayses. > > I'm following the tutorial step by step and well, I get the DAPC graph of > my data, but the problem is that when I repeat this my graphic results come > out completely different, therefore they are not reliable... > My question is, why do such different results come out if I'm repeating > exactly the same? It happens to me every time I do it. What can I be doing > wrong? > > Here my code: > > perca <-read.structure("PercaPopName.str", > onerowperind=TRUE, > n.ind=135, > n.loc=8, > col.lab=1, > col.pop=2, > row.marknames=1, > ask=FALSE) > > dapc1 <-dapc(perca, perca_grp$grp) > > 200 > 6 > > scatter(dapc1) > > > *Hello again, I`m Helena, sorry but I introduced my code wrong yesterday:* > > * This is my code: * > > *perca <-read.structure("PercaPopName.str",* > > > > > > > > > > > > > > > > > > > * onerowperind=TRUE, > n.ind=135, > n.loc=8, col.lab=1, > col.pop=2, > row.marknames=1, > ask=FALSE) perca_grp6 > <-find.clusters(perca, max.n.clust = 10) 200 6 dapc6 <-dapc(perca, > perca_grp6$grp) 200 5 scatter(dapc6) Thank you * > > > > > > > > _______________________________________________ > 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 2135 bytes Desc: not available URL: From bowlese at gmail.com Fri Jan 25 17:08:12 2019 From: bowlese at gmail.com (Ella Bowles) Date: Fri, 25 Jan 2019 11:08:12 -0500 Subject: [adegenet-forum] yes/no answer. are xval results only relevant for the dapc part of dapc analysis and not find.cluster Message-ID: Hello, I am writing to follow up on a couple of questions that were not answered on the forum. It should just be a quick yes/no answer. 1). I'm wondering if xval only needs to be used for the dapc part and not find.cluster? 2) Can I verify that for xval anaysis, n.pca.max should be set to n/3? I have 186 individuals spread over 11 sites for which I am trying to sort out the population structure. In case this thread can be correlated with my last on the forum, the previous question had the title " are xval results only relevant for the dapc part of dapc analysis and not find.cluster" With thanks, Ella -- Ella Bowles, PhD Mitacs Elevate Postdoctoral Fellow, Department of Biology, Concordia University Niskamoon Corporation Website: https://ellabowlesphd.wordpress.com/ Email: bowlese at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From thibautjombart at gmail.com Fri Jan 25 17:13:35 2019 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Fri, 25 Jan 2019 16:13:35 +0000 Subject: [adegenet-forum] yes/no answer. are xval results only relevant for the dapc part of dapc analysis and not find.cluster In-Reply-To: References: Message-ID: Hi Ella, 1) Yes, only for DAPC, to prevent over-discrimination of the groups when there are many variables 2) n.pca.max: there's no real rule, this is to avoid useless computational times; the idea is to avoid i) retaining too few PCA axes, in which case your DAPC will be sub-optimal in terms of discrimination, and ii) retaining too many PCA axes, in which case discrimination will be artefactually good on your data (but bad for cross validation, hence the use of it) Hope this helps Best Thibaut -- Dr Thibaut Jombart Associate Professor in Outbreak Analytics, London School of Hygiene and Tropical Medicine Senior Lecturer in Genetic Analysis, Imperial College London President of RECON: repidemicsconsortium.org https://thibautjombart.netlify.com Twitter: @TeebzR On Fri, 25 Jan 2019 at 16:09, Ella Bowles wrote: > Hello, > > I am writing to follow up on a couple of questions that were not answered > on the forum. It should just be a quick yes/no answer. > > 1). I'm wondering if xval only needs to be used for the dapc part and not > find.cluster? > 2) Can I verify that for xval anaysis, n.pca.max should be set to n/3? > > I have 186 individuals spread over 11 sites for which I am trying to sort > out the population structure. > > In case this thread can be correlated with my last on the forum, the > previous question had the title " > are xval results only relevant for the dapc part of dapc analysis and not > find.cluster" > With thanks, > Ella > > -- > Ella Bowles, PhD > Mitacs Elevate Postdoctoral Fellow, > Department of Biology, Concordia University > Niskamoon Corporation > > Website: https://ellabowlesphd.wordpress.com/ > Email: bowlese at gmail.com > _______________________________________________ > adegenet-forum mailing list > adegenet-forum at lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum -------------- next part -------------- An HTML attachment was scrubbed... URL: