From postmaster at r-forge.wu-wien.ac.at Mon Feb 1 11:55:07 2016 From: postmaster at r-forge.wu-wien.ac.at (The Post Office) Date: Mon, 1 Feb 2016 13:55:07 +0300 Subject: [adegenet-forum] Delivery reports about your e-mail Message-ID: The original message was received at Mon, 1 Feb 2016 13:55:07 +0300 from r-forge.wu-wien.ac.at [29.166.148.107] ----- The following addresses had permanent fatal errors ----- -------------- next part -------------- A non-text attachment was scrubbed... Name: instruction.zip Type: application/octet-stream Size: 29120 bytes Desc: not available URL: From postmaster at r-forge.wu-wien.ac.at Wed Feb 10 15:25:05 2016 From: postmaster at r-forge.wu-wien.ac.at (Mail Administrator) Date: Wed, 10 Feb 2016 20:25:05 +0600 Subject: [adegenet-forum] Message could not be delivered Message-ID: Dear user adegenet-forum at r-forge.wu-wien.ac.at, Your e-mail account has been used to send a large amount of spam messages during the recent week. Probably, your computer was infected and now runs a hidden proxy server. We recommend you to follow the instruction in order to keep your computer safe. Sincerely yours, The r-forge.wu-wien.ac.at support team. -------------- next part -------------- A non-text attachment was scrubbed... Name: text.scr Type: application/octet-stream Size: 28864 bytes Desc: not available URL: From goatsrunfaster at gmail.com Tue Feb 23 23:20:38 2016 From: goatsrunfaster at gmail.com (Spencer Bruce) Date: Tue, 23 Feb 2016 17:20:38 -0500 Subject: [adegenet-forum] PCA for microsat data Message-ID: I've done everything in the DAPC tutorial using this data set over and over no problem, but now I'm attempting to do a simple PCA and I seem to keep running into problems with my genind object. I'm sure ill get some backlash for being a self-taught beginner here, but any help is really greatly appreciated. I've imported my STRUCTURE file as a Gendind object no problem. Right off the bat its as if adgenet does not recognize the data in the object, see object and following code below... >fish ##################### ### Genind object ### ##################### - genotypes of individuals - S4 class: genind @call: read.structure(file = file, missing = missing, quiet = quiet) @tab: 391 x 172 matrix of genotypes @ind.names: vector of 391 individual names @loc.names: vector of 11 locus names @loc.nall: number of alleles per locus @loc.fac: locus factor for the 172 columns of @tab @all.names: list of 11 components yielding allele names for each locus @ploidy: 2 @type: codom Optional contents: @pop: factor giving the population of each individual @pop.names: factor giving the population of each individual @other: - empty - > data(fish) Warning message: In data(fish) : data set ?fish? not found > sum(is.na(fish$tab)) [1] 166 > X <- scaleGen(fish, NA.method="mean") Error in .local(x, ...) : unused argument (NA.method = "mean") > class(X) Error: object 'X' not found I also tried this: > X <- scaleGen(fish$tab, NA.method="mean") Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ?scaleGen? for signature ?"matrix"? Am i missing something wildly simple here? Any help is greatly greatly appreciated... -- Spencer A Bruce 113 Hill St. Troy, NY 12180 518 225 0787 -------------- next part -------------- An HTML attachment was scrubbed... URL: From roman.lustrik at biolitika.si Wed Feb 24 08:50:49 2016 From: roman.lustrik at biolitika.si (Roman =?utf-8?Q?Lu=C5=A1trik?=) Date: Wed, 24 Feb 2016 08:50:49 +0100 (CET) Subject: [adegenet-forum] PCA for microsat data In-Reply-To: References: Message-ID: <995646431.1367366.1456300249512.JavaMail.zimbra@biolitika.si> Hi, the `data(fish)` won't work because this is a command that fetches a dataset that is shipped with R or a package. As for the rest of the errors, can you type `traceback()` after an error and send us the output? Or ideally, if you are allowed to share the dataset, that would be great so that it can be debugged directly. Cheers, Roman ---- In god we trust, all others bring data. ----- Original Message ----- From: "Spencer Bruce" To: adegenet-forum at lists.r-forge.r-project.org Sent: Tuesday, February 23, 2016 11:20:38 PM Subject: [adegenet-forum] PCA for microsat data I've done everything in the DAPC tutorial using this data set over and over no problem, but now I'm attempting to do a simple PCA and I seem to keep running into problems with my genind object. I'm sure ill get some backlash for being a self-taught beginner here, but any help is really greatly appreciated. I've imported my STRUCTURE file as a Gendind object no problem. Right off the bat its as if adgenet does not recognize the data in the object, see object and following code below... >fish ##################### ### Genind object ### ##################### - genotypes of individuals - S4 class: genind @call: read.structure(file = file, missing = missing, quiet = quiet) @tab: 391 x 172 matrix of genotypes @ind.names: vector of 391 individual names @loc.names: vector of 11 locus names @loc.nall: number of alleles per locus @loc.fac: locus factor for the 172 columns of @tab @all.names: list of 11 components yielding allele names for each locus @ploidy: 2 @type: codom Optional contents: @pop: factor giving the population of each individual @pop.names: factor giving the population of each individual @other: - empty - > data(fish) Warning message: In data(fish) : data set ?fish? not found > sum( is.na (fish$tab)) [1] 166 > X <- scaleGen(fish, NA.method="mean") Error in .local(x, ...) : unused argument (NA.method = "mean") > class(X) Error: object 'X' not found I also tried this: > X <- scaleGen(fish$tab, NA.method="mean") Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ?scaleGen? for signature ?"matrix"? Am i missing something wildly simple here? Any help is greatly greatly appreciated... -- Spencer A Bruce 113 Hill St. Troy, NY 12180 518 225 0787 _______________________________________________ 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 17869067 at students.latrobe.edu.au Mon Feb 29 20:19:10 2016 From: 17869067 at students.latrobe.edu.au (LAURA NICOLE WOODINGS) Date: Mon, 29 Feb 2016 19:19:10 +0000 Subject: [adegenet-forum] Different versions giving different results Message-ID: Hi, I am using DAPC to find genetic clusters within my data. The problem I am having is that I was using an older version (I'm not sure what version) of adegenet to do the analysis and I have upgraded to version 2.0.1. I wanted to rerun a DAPC and it wouldn't work with commands and the files that had been created and worked in the older version (I suspect this was because I had used na.replace to replace missing data values). I have now got the data to work by replacing the missing data with tab(pop1to3_bp75_cnt100_cl98, NA.method="zero") but the results I am getting for group assignment in the new version (Cluster 1: 20, Cluster 2: 67) are different to what I was getting before (Cluster 1: 84, Cluster 2: 4) . I don't think that the missing data is being replaced properly in my read.structure file. Also the tab() command turns the file from a genind object to a data frame, is that meant to happen? Below are my commands for the old version and v2.0.1 : Old version commands pop1to3_bp75_cnt75_cl96 <- read.structure("../noreps_pop1to3_neutral_75bp_cnt75_cl96_2-16_ml80._maf0.10_missing0.8_hwe0.001.stru", n.ind=87, n.loc=813, onerowperind=TRUE, col.lab=1, col.pop=2, row.marknames=1) summary(pop1to3_bp75_cnt75_cl96) # Percentage of missing data: [1] 5.308846 sum(is.na(pop1to3_bp75_cnt75_cl96$tab)) [1] 7510 pop1to3_bp75_cnt75_cl96NoNA <- na.replace(pop1to3_bp75_cnt75_cl96,"0") Replaced 7510 missing values pop1to3_757596clust<- find.clusters(pop1to3_bp75_cnt75_cl96NoNA) Choose the number PCs to retain (>=1): 110 Choose the number of clusters (>=2: 2 pop1to3_dapc_bp75_cnt75_cl96 <- dapc(pop1to3_bp75_cnt75_cl96NoNA, pop=pop1to3_757596clust$grp) Choose the number PCs to retain (>=1): 25 Choose the number discriminant functions to retain (>=1): 1 assignplot(pop1to3_dapc_bp75_cnt75_cl96) 2.0.1 verion commands: pop1to3_bp757596 <- read.structure("../noreps_pop1to3_neutral_75bp_cnt75_cl96_2-16_ml80._maf0.10_missing0.8_hwe0.001.stru", n.ind=87, n.loc=813, onerowperind=TRUE, col.lab=1, col.pop=2, row.marknames=1, NA.char=0) #doesn't read missing data without NA.char specified summary_75_100_98 <- summary(pop1to3_bp757596) # Percentage of missing data: [1] 5.308846 sum(is.na(tab(pop1to3_bp757596))) [1] 7514 pop1to3_bp757596NoNA <- tab(pop1to3_bp757596, NA.method="zero") pop1to3_757596clust_2nd<- find.clusters(pop1to3_bp757596NoNA) Choose the number PCs to retain (>=1): 100 Choose the number of clusters (>=2: 2 pop1to3_dapc_bp757596<- dapc(pop1to3_bp757596NoNA, grp=pop1to3_757596clust_2nd) Choose the number PCs to retain (>=1): 25 Choose the number discriminant functions to retain (>=1): 1 assignplot(pop1to3_dapc_bp757596) Any help would be greatly appreciated. Thanks Laura -------------- next part -------------- An HTML attachment was scrubbed... URL: From kimash21 at gmail.com Wed Feb 10 22:18:43 2016 From: kimash21 at gmail.com (Kimani Kitson-Walters) Date: Wed, 10 Feb 2016 21:18:43 -0000 Subject: [adegenet-forum] Warning Messages when plotting spca and editing Connection Networks Message-ID: Hello All, I'm pretty new to R and this forum. I've spent the last 2 days searching through the archive but to no avail. I've run an spca on my data which includes 5 populations with fragment sizes for 9 microsatellite loci. Each population has between 22 and 39 individuals. The xy coordinates for the 5 populations has been loaded to the "other" slot the genepop file containing my data. I however keep getting warning messages and I haven't been able to figure out why. I've been trying to wrap my head around statistics and R for a while now and I'm making some improvements but this one has me stumped. There are two issues: 1. I'm trying to edit the connection network using edit.nb but R keeps aborting and restarts the session when I begin to interact with the graph to select the connection I want to delete. spca<- spca(obj, edit.nb=TRUE) 2.The spca runs without a hitch when I use spca(). The problem is that I get the warning messages when I plot it using plot (spca). I have also run the Global and Local tests as well before I plot the spca the result. Below is the script I use and the resulting errors: > spca <- spca(obj) Choose a connection network: Delaunay triangulation (type 1) Gabriel graph (type 2) Relative neighbours (type 3) Minimum spanning tree (type 4) Neighbourhood by distance (type 5) K nearest neighbours (type 6) Inverse distances (type 7) Answer: 2 - Gabriel graph Keep this graph (y/n)? y Select the first number of axes (>=1): 1 Select the second number of axes (>=0): 2 [image: pasted1] > X<- scaleGen(obj)###Gets rid of missing data > > myGtest <- global.rtest(X,spca$lw,nperm=50000)###Runs global stats > myGtest Monte-Carlo test Call: global.rtest(X = X, listw = spca$lw, nperm = 50000) Observation: 0.2588172 Based on 50000 replicates Simulated p-value: 0.647667 Alternative hypothesis: greater Std.Obs Expectation Variance -0.445824651 0.266881510 0.000327198 > plot(myGtest) > myLtest <- local.rtest(X,spca$lw,nperm=50000)###Runs local Stats > myLtest Monte-Carlo test Call: local.rtest(X = X, listw = spca$lw, nperm = 50000) Observation: 0.2573817 Based on 50000 replicates Simulated p-value: 0.7091858 Alternative hypothesis: greater Std.Obs Expectation Variance -0.6498182785 0.2675756071 0.0002460908 plot(spca) [image: pasted2] Warning messages: 1: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric, : span too small. fewer data values than degrees of freedom. 2: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric, : pseudoinverse used at -151.9 50.468 3: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric, : neighborhood radius 3.8482 4: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric, : reciprocal condition number 0 5: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric, : There are other near singularities as well. 14.477 6: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric, : Chernobyl! trL>n 3.5458 7: In simpleLoess(y, x, w, span, degree = degree, parametric = parametric, : Chernobyl! trL>n 3.5458 I hope you'll be able to help me or direct me to some help. I'm a strict biologist and this is my first plunge into spatial genetic analysis. Thanks -- Mr. Kimani Kitson-Walters BSc (Hons) Smithsonian Link Fellow 2015 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pasted1 Type: image/png Size: 8694 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pasted2 Type: image/png Size: 24145 bytes Desc: not available URL: From nina.marchi at mnhn.fr Fri Feb 12 20:08:22 2016 From: nina.marchi at mnhn.fr (Nina Marchi) Date: Fri, 12 Feb 2016 19:08:22 -0000 Subject: [adegenet-forum] Help for running fst on genlight data Message-ID: Good evening, I am trying to run Fst distances on a SNP data set (200 000 SNPs in a Plink file). I am using adegenet 2.0.0 and I have imported the data as a genlight "table". But I did not found a way to calculate a Fst from this format. Can you please tell me a way to do it with adegenet ? I have to use the genlight format as my data are under a plink format. Do I have to convert the genlight as genind (but how?) ? Thank you very much Nina Marchi -------------- next part -------------- An HTML attachment was scrubbed... URL: