From celarav at gmail.com Wed May 4 07:08:06 2016 From: celarav at gmail.com (Carlos Esteban Lara) Date: Wed, 4 May 2016 15:08:06 +1000 Subject: [adegenet-forum] Fasta input - diploid Message-ID: Hi, A silly question here. I am trying to get fast file in a genind form, easy. But the fast file contains 2 sequences per individual (diploid). I do not know how to set up the ploidy level; hence getting a genind object with two individuals rather than 4 (see below). Fasta file looks like: >ind1-1 GACATGAGCAGCAACCTGCTGCGCCACGATGGAGCTGGCGTGCGGTGCCCGTGGGCTGAG TCTCTGGCAGAGCTGGACCTGTCCTCCAATCAGTTGGCGGATGCTGTGTTTGAGTGCTTG CCCGTCAACGTCAAAAAGCTCAGCCTAGAAAACAATCAGATCAGCAACGTGCCCAGGGGG GTGGCGGAGCTGGAATCCTTGGAAGAGCTGAACCTGGCATCCAACAGGCTGGCTGACCTG CCGGGGTGCAGCAGCTTTCCGTCCCTGCAGTTCCTGAACGCG >ind1-2 GACATGAGCAGCAACCTGCTGCGCCACGATGGAGCTGGCGTGCGGTGCCCGTGGGCTGAG TCTCTGGCAGAGCTGGACCTGTCCTCCAATCAGTTGGCGGATGCTGTGTTTGAGTGCTTG CCCGTCAACGTCAAAAAGCTCAGCCTAGAAAACAATCAGATCAGCAACGTGCCCAGGGGG GTGGCGGAGCTGGAATCCTTGGAAGAGCTGAACCTGGCATCGAACAGGCTGGCTGACCTG CCGGGGTGCAGCAGCTTTCCGGCCCTGCAGTTCCTGAACGCG >ind2-1 GACATGAGCAGCAACCTGCTGCGCCACGATGGAGCTGGCGTGCGGTGCCCGTGGGCTGAG TCTCTGGCAGAGCTGGACCTGTCCTCCAATCAGTTGGCGGATGCTGTGTTTGAGTGCTTG CCCGTCAACGTCAAAAAGCTCAGCCTAGAAAACAATCAGATCAGCAACGTGCCCAGGGGG GTGGCAGAGCTGGAATCCTTGGAAGAGCTGAACCTGGCATCCAACAGGCTGGCTGACCTG CCGGGGTGCAGCGGCTTTCCGGCCCTGCAGTTCCTGAACGCG >ind2-2 GACATGAGCAGCAACCTGCTGCGCCACGATGGAGCTGGCGTGCGGTGCCCGTGGGCTGAG TCTCTGGCAGAGCTGGACCTGTCCTCCAATCAGTTGGCGGATGCTGTGTTTGAGTGCTTG CCCGTCAACGTCAAAAAGCTCAGCCTAGAAAACAATCAGATCAGCAACGTGCCCAGGGGG GTGGCGGAGCTGGAATCCTTGGAAGAGCTGAACCTGGCATCCAA Input as follow: A <- read.dna(?A.fas", format="fasta") A <- DNAbin2genind(A) A /// GENIND OBJECT ///////// // 4 individuals; 4 loci; 8 alleles; size: 5.6 Kb // Basic content @tab: 4 x 8 matrix of allele counts @loc.n.all: number of alleles per locus (range: 2-2) @loc.fac: locus factor for the 8 columns of @tab @all.names: list of allele names for each locus @ploidy: ploidy of each individual (range: 1-1) @type: codom @call: DNAbin2genind(x = tlr) // Optional content - empty - Cheers, Carlos Lara Dept of Zoology University of Otago New Zealand -------------- next part -------------- An HTML attachment was scrubbed... URL: From alfredo.cartone at unich.it Wed May 18 14:02:52 2016 From: alfredo.cartone at unich.it (alfredo.cartone at unich.it) Date: Wed, 18 May 2016 14:02:52 +0200 Subject: [adegenet-forum] economic data Message-ID: <20160518140252.18763otgltyptmuk@webmail.unich.it> Hello, My aim is to highlight the structure of certain economic phenomena that are significantly affected by spatial dependence. At this purpose spca seems a very powerful tool but adegenet package was created to define genetic structure and its natural inputs are alleles frequencies collected in a genind object. Is it reasonable to include economic variables (mainly continuous scaled data) in a genind object by using as.genind to perform spca? Best regards, Alfredo Cartone Department of Economic Studies Universit? G. D?Annunzio Pescara From antoinepaccard at gmail.com Wed May 25 22:28:43 2016 From: antoinepaccard at gmail.com (Antoine Paccard) Date: Wed, 25 May 2016 16:28:43 -0400 Subject: [adegenet-forum] Extracting vectors in glPca Message-ID: <0F798375-F9B5-4CCE-B03A-C612AA72B44A@gmail.com> Hello, I was just wondering if there was an easy way to extract vectors from glPca. I guess those can be found using $scores and &eig informations. But just in case, I would like to know if there was a command such as $vectors than could extract the actual eigenvectors. Thanks, Antoine From antoinepaccard at gmail.com Thu May 26 22:29:19 2016 From: antoinepaccard at gmail.com (Antoine Paccard) Date: Thu, 26 May 2016 16:29:19 -0400 Subject: [adegenet-forum] Extracting vectors in glPca In-Reply-To: <0F798375-F9B5-4CCE-B03A-C612AA72B44A@gmail.com> References: <0F798375-F9B5-4CCE-B03A-C612AA72B44A@gmail.com> Message-ID: I still did not find a solution for this. In case anybody knows? Thanks. > On 25 May 2016, at 16:28, Antoine Paccard wrote: > > Hello, > > I was just wondering if there was an easy way to extract vectors from glPca. I guess those can be found using $scores and &eig informations. But just in case, I would like to know if there was a command such as $vectors than could extract the actual eigenvectors. > > Thanks, > Antoine From martinmullett at hotmail.com Thu May 26 23:15:08 2016 From: martinmullett at hotmail.com (Martin) Date: Thu, 26 May 2016 22:15:08 +0100 Subject: [adegenet-forum] clones in sPCA adegenet Message-ID: Hello all, I?m new to adegenet and was wondering if I could ask for some advice. I?m working with a dataset of microsatellite markers from a haploid fungus which reproduces both asexually and sexually (it seems). Therefore the dataset has many clones which can be present in many locations. I am looking to do a sPCA and was wondering if the clonality in the dataset will influence the sPCA. I cannot use the clone-corrected dataset because a single clone can be present in many locations. Does anyone have any experience of this? Will a sPCA with many clones still produce reliable results? I can?t think why not but maybe I?m missing something. Also, a more technical question. I see a cline with a distinct group (particularly clear when using colorplot). Is there any way to draw out the groups from the sPCA? I assume it is in the $ls or $li component of the sPCA output but looking at these the cutoff is nowhere as clear as on the graphical output. Thank you in advance, and sorry if the questions are too simplistic. Martin -------------- next part -------------- An HTML attachment was scrubbed... URL: From roman.lustrik at biolitika.si Mon May 30 13:35:47 2016 From: roman.lustrik at biolitika.si (Roman =?utf-8?Q?Lu=C5=A1trik?=) Date: Mon, 30 May 2016 13:35:47 +0200 (CEST) Subject: [adegenet-forum] Extracting vectors in glPca In-Reply-To: <0F798375-F9B5-4CCE-B03A-C612AA72B44A@gmail.com> References: <0F798375-F9B5-4CCE-B03A-C612AA72B44A@gmail.com> Message-ID: <1239733044.253708.1464608147323.JavaMail.zimbra@biolitika.si> Hi, think about this for a bit. What would be the analogous thing to extract from either princomp() or prcomp() in base R? Cheers, Roman ---- In god we trust, all others bring data. ----- Original Message ----- From: "Antoine Paccard" To: adegenet-forum at lists.r-forge.r-project.org Sent: Wednesday, May 25, 2016 10:28:43 PM Subject: [adegenet-forum] Extracting vectors in glPca Hello, I was just wondering if there was an easy way to extract vectors from glPca. I guess those can be found using $scores and &eig informations. But just in case, I would like to know if there was a command such as $vectors than could extract the actual eigenvectors. Thanks, Antoine _______________________________________________ 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 antoinepaccard at gmail.com Mon May 30 16:38:06 2016 From: antoinepaccard at gmail.com (Antoine Paccard) Date: Mon, 30 May 2016 10:38:06 -0400 Subject: [adegenet-forum] Extracting vectors in glPca In-Reply-To: <1239733044.253708.1464608147323.JavaMail.zimbra@biolitika.si> References: <0F798375-F9B5-4CCE-B03A-C612AA72B44A@gmail.com> <1239733044.253708.1464608147323.JavaMail.zimbra@biolitika.si> Message-ID: <0EB89282-8AC2-4B39-8347-75E5FF2E22FC@gmail.com> Hi Roman, Thanks for your answer. I did look into this before sending over this message and here is how I understand it: in princomp() or prcomp(), eigenvectors can be extracted using $loadings or $rotation respectively. with glpca(), $loadings gives the matrix of loadings of each SNPs on each PC. Loadings and eigenvectors are not the same. The eigenvectors give directions while the loadings include variance along these directions. For example, one could decide to scale eigenvectors with the loadings. Here, I am more interested in the eigenvectors themselves and not necessarily in the loadings of each SNP. Instead, I have eigenvalues for each individuals (lets say 10, with glpca(x)$eig) and would like to extract the eigenvectors associated with these eigenvalues, such as: A(vec) = ?vec where ? is the eigenvalue associated to the eigenvector ?vec?. Does that make sense or am I missing something? Thanks, Antoine > On 30 May 2016, at 07:35, Roman Lu?trik wrote: > > Hi, > > think about this for a bit. What would be the analogous thing to extract from either princomp() or prcomp() in base R? > > Cheers, > Roman > > ---- > In god we trust, all others bring data. > > ----- Original Message ----- > From: "Antoine Paccard" > To: adegenet-forum at lists.r-forge.r-project.org > Sent: Wednesday, May 25, 2016 10:28:43 PM > Subject: [adegenet-forum] Extracting vectors in glPca > > Hello, > > I was just wondering if there was an easy way to extract vectors from glPca. I guess those can be found using $scores and &eig informations. But just in case, I would like to know if there was a command such as $vectors than could extract the actual eigenvectors. > > Thanks, > Antoine > _______________________________________________ > 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