From Nicolas.Tsesmetzis at shell.com Wed Nov 14 19:59:29 2018 From: Nicolas.Tsesmetzis at shell.com (Nicolas.Tsesmetzis at shell.com) Date: Wed, 14 Nov 2018 18:59:29 +0000 Subject: [adegenet-forum] sPCA for environmental genomics Message-ID: Hello adegenet users, I am working in environmental genomics looking at microbial communities in environmental samples (mostly soil). As each soil sample can contain thousands of microorganisms (at different relative abundances) we typically use Principal Coordinate Analysis (PCoA) to identify samples that are similar to each other. What would be really useful is if we could include geospatial information (Lat, Long) in the analysis in order to determine whether the similarities in the microbial profiles are due to their geospatial proximity (and the underlying environmental parameters associated with that geographic area). Searching for such type of analysis I came across the sPCA functionality in the adegenet package. Is sPCA suitable for such analysis? If so, would it be possible to retrofit the sPCA function in adegenet to perform such analysis? If not, could anyone point me to a tool (or a person) that could help me with this type of analysis? The input table is very simple: Organism 1 Organism 2 Organism 3 .... Organism m Lat Long Sample 1 0.5 0.1 0 .... 0.2 x1 y1 Sample 2 0.2 0 0 .... 0.4 x2 y2 Sample 3 0.1 0.8 0.6 .... 0 x3 y3 . . . . . . . . . . . . . . . . . . . . . . . . Sample n 0.06 0.1 0 0.2 xn yn Total 1 1 1 1 Thank you all very much in advance for any pointers. Kind regards, Nicolas Tsesmetzis, PhD Shell International Exploration and Production Inc. 3333 Highway 6 South, P.O. Box 4685, Houston, Texas 77251-7171, USA Tel: +1 (281) 352-1475 Email: nicolas.tsesmetzis at shell.com Internet: http://www.shell.com/eandp-en -------------- next part -------------- An HTML attachment was scrubbed... URL: From stephane.dray at univ-lyon1.fr Thu Nov 15 09:27:24 2018 From: stephane.dray at univ-lyon1.fr (=?UTF-8?Q?St=c3=a9phane_Dray?=) Date: Thu, 15 Nov 2018 09:27:24 +0100 Subject: [adegenet-forum] sPCA for environmental genomics In-Reply-To: References: Message-ID: Hi, have a look to the adespatial package. It contains several tools (and references) for such type of analysis in the context of community ecology. Cheers Le 14/11/2018 ? 19:59, Nicolas.Tsesmetzis at shell.com a ?crit?: > > Hello adegenet users, > > I am working in environmental genomics looking at microbial > communities in environmental samples (mostly soil). As each soil > sample can contain thousands of microorganisms (at different relative > abundances) we typically use Principal Coordinate Analysis (PCoA) to > identify samples that are similar to each other. What would be really > useful is if we could include geospatial information (Lat, Long) in > the analysis in order to determine whether the similarities in the > microbial profiles are due to their geospatial proximity (and the > underlying environmental parameters associated with that geographic > area). > > Searching for such type of analysis I came across the sPCA > functionality in the adegenet package. Is sPCA suitable for such > analysis? If so, would it be possible to retrofit the sPCA function in > adegenet to perform such analysis? If not, could anyone point me to a > tool (or a person) that could help me with this type of analysis? > > The input table is very simple: > > > > Organism 1 > > > > Organism 2 > > > > Organism 3 > > > > ?. > > > > ?Organism m > > > > Lat > > > > Long > > Sample 1 > > > > 0.5 > > > > 0.1 > > > > 0 > > > > ?. > > > > 0.2 > > > > x1 > > > > y1 > > Sample 2 > > > > 0.2 > > > > 0 > > > > 0 > > > > ?. > > > > 0.4 > > > > x2 > > > > y2 > > Sample 3 > > > > 0.1 > > > > 0.8 > > > > 0.6 > > > > ?. > > > > 0 > > > > x3 > > > > y3 > > . > > > > . > > > > . > > > > . > > > > . > > > > . > > > > . > > > > . > > . > > > > . > > > > . > > > > . > > > > . > > > > . > > > > . > > > > . > > . > > > > . > > > > . > > > > . > > > > . > > > > . > > > > . > > > > . > > Sample n > > > > 0.06 > > > > 0.1 > > > > 0 > > > > > > 0.2 > > > > xn > > > > yn > > Total > > > > 1 > > > > 1 > > > > 1 > > > > > > 1 > > > > > > ?Thank you all very much in advance for any pointers. > > Kind regards, > > *Nicolas Tsesmetzis, PhD* > Shell International Exploration and Production Inc. > 3333 Highway 6 South, P.O. Box 4685, Houston, Texas 77251-7171, USA > > *Tel:* +1 (281) 352-1475 > *Email:* nicolas.tsesmetzis at shell.com > > > *Internet:* http://www.shell.com/eandp-en > > > _______________________________________________ > 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 -- St?phane DRAY (stephane.dray at univ-lyon1.fr) Laboratoire BBE-CNRS-UMR-5558, Univ. C. Bernard - Lyon I 43, Bd du 11 Novembre 1918, 69622 Villeurbanne Cedex, France http://pbil.univ-lyon1.fr/members/dray/ GdR EcoStat : https://sites.google.com/site/gdrecostat/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From molrafael2 at gmail.com Thu Nov 15 12:53:25 2018 From: molrafael2 at gmail.com (Rafael Mol) Date: Thu, 15 Nov 2018 09:53:25 -0200 Subject: [adegenet-forum] barrier permutation and squares meaning Message-ID: Hey all! I'm a new user of adegenet package, and I've noticed that when using the monmonier algorithm to test barriers, changing the population point from circles to squares, the last one seems to increase its size. I realized that this function is related to the following command line: plot (mon1,var=pac1$11[,1]). Once that I've loaded a distance matrix from pofad, I didn't use pca to "correct" these distances in order to add noises once pofad already corrected them. I've searched and didn't find anything related to these sizes. Does it have a meaning? Or they are just graphical... Also, I couldn't find any topic related to test barriers permutation in adegenet package. Is this possible? Attached to this email, I put a figure of the map that I got, and the diference in squares size. Thanks in advance! Mol Mestrando Zoologia de Vertebrados, Universidade Federal de Minas Gerais - UFMG Environmental Science University of Newcastle - Australia. +55 (31) 98222-5122 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: barreira-aye_mega.tiff Type: image/tiff Size: 2963064 bytes Desc: not available URL: From molrafael2 at gmail.com Tue Nov 20 13:06:30 2018 From: molrafael2 at gmail.com (Rafael Mol) Date: Tue, 20 Nov 2018 10:06:30 -0200 Subject: [adegenet-forum] Barrier permutation in adegenet package Message-ID: Hey all Hey all! I'm a new user of adegenet package, and I've noticed that when using the monmonier algorithm to test barriers, changing the population point from circles to squares, the last one seems to increase its size. I realized that this function is related to the following command line: plot (mon1,var=pac1$11[,1]). Once that I've loaded a distance matrix from pofad, I didn't use pca to "correct" these distances in order to add noises once pofad already corrected them. I've searched and didn't find anything related to these sizes. Does it have a meaning? Or they are just graphical... Also, I couldn't find any topic related to test barriers permutation in adegenet package. Is this possible? Attached to this email, I put a figure of the map that I got, and the diference in squares size. Thanks in advance! Mol Mestrando Zoologia de Vertebrados, Universidade Federal de Minas Gerais - UFMG Environmental Science University of Newcastle - Australia. +55 (31) 98222-5122 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: barreira-aye_mega.tiff Type: image/tiff Size: 2963064 bytes Desc: not available URL: From phillip.morin at noaa.gov Wed Nov 21 23:49:39 2018 From: phillip.morin at noaa.gov (Phil Morin (NOAA Federal)) Date: Wed, 21 Nov 2018 14:49:39 -0800 Subject: [adegenet-forum] missing values for global.rtest Message-ID: <6bf1d8a1-e901-ef3f-3a7a-07487f5a5605@noaa.gov> Hi, I've been going through the tutorial for spca analysis in adegenet, and ran into an error when I tried to run the global rtest on my data. The issue appears to be missing data in my genotypes genind object (according to several previous postings). I have found postings that simply say "replace NA's", but do not say what to replace them with. It runs fine when I replace NA with 0, but it's not clear how that affects the results (given that the genotype data are converted to 0, 1, 2 in a genind object). What should NA's be replaced with for the global and local randomized tests? Are there other tests that require different types of replacement (e.g., mean population value instead of 0)? -- -- Phillip A. Morin, Ph.D. Southwest Fisheries Science Center 8901 La Jolla Shores Dr. La Jolla, CA 92037, USA Phone: 858-546-7165 Fax: 858-546-7003 phillip.morin at noaa.gov http://swfsc.noaa.gov/mmtd-mmgenetics From phillip.morin at noaa.gov Thu Nov 29 02:08:19 2018 From: phillip.morin at noaa.gov (Phil Morin (NOAA Federal)) Date: Wed, 28 Nov 2018 17:08:19 -0800 Subject: [adegenet-forum] sPCA function deprecated, won't knit in Rmarkdown Message-ID: <71f02520-f6df-a2bd-6fec-68b99f2e8475@noaa.gov> Hi, I'm using the sPCA function in adegenet, and get the warning: This function is now deprecated. Please use the 'multispati' function in the 'adespatial' package. I can't find any information on what this refers to or how to fix it. The sPCA output still appears to be what I expect, and functions properly for downstream analyses and data plotting (though I get similar messages for some of the other spca plotting functions). Coincidentally, a couple of the adegenet functions appear to be incompatible with the knit function in Rmarkdown. when I try to run my script in Rmarkdown it runs fine, but if I try to knit it to a docx file, the sPCA function causes an error that prevents the knit document from being completed. It produces a docx file that opens as an image file (in Preview on my Mac instead of in MS Word), but it's truncated at the sPCA command, and if I close it and try to open the saved docx file, it can't open due to an "xml parsing error". Knitting to a pdf file works fine for the sPCA function. I have verified that I can use the knit function successfully for all of my document up to the point of running the sPCA function: mySpca <- spca(obj, type=5,d1=0,d2=2,scannf=FALSE, nfposi = 5, nfnega = 2) I also get an fatal error when I try to knit to a pdf file if I add the "screeplot" function (screeplot(mySpca)). ! Package inputenc Error: Unicode character ^^U (U+15) (inputenc) not set up for use with LaTeX. Error: Failed to compile sPCA_SNPs_AK3WC4_test.tex. See sPCA_SNPs_AK3WC4_test.log for more info. The log file says about the same thing. I haven't been able to figure out what the character is that hasn't been 'set up', or how to set it up. Phil -- -- Phillip A. Morin, Ph.D. Southwest Fisheries Science Center 8901 La Jolla Shores Dr. La Jolla, CA 92037, USA Phone: 858-546-7165 Fax: 858-546-7003 phillip.morin at noaa.gov http://swfsc.noaa.gov/mmtd-mmgenetics -------------- next part -------------- An HTML attachment was scrubbed... URL: