Difference between revisions of "GenelandTutorial"
Peter Beerli (talk | contribs) |
Peter Beerli (talk | contribs) |
||
Line 8: | Line 8: | ||
* start R | * start R | ||
− | + | <pre> | |
− | + | library('Geneland') | |
+ | Geneland.GUI() | ||
+ | </pre> | ||
* fill in the output directory and the coordinates and the sampled data (use codominated markers) | * fill in the output directory and the coordinates and the sampled data (use codominated markers) | ||
* run the analysis using at least 10000 steps (more would be better), do also a few replicates | * run the analysis using at least 10000 steps (more would be better), do also a few replicates | ||
Line 30: | Line 32: | ||
* install R (use apt-get if your system supports that) | * install R (use apt-get if your system supports that) | ||
− | * in R: install.packages( | + | * in R: |
− | * you should be set: in R try: library('Geneland') Geneland.GUI() | + | <pre> |
+ | install.packages("Geneland",method="wget") | ||
+ | </pre} | ||
+ | * you should be set: in R try: | ||
+ | <pre> | ||
+ | library('Geneland') | ||
+ | Geneland.GUI() | ||
+ | </pre> | ||
===on Windows:=== | ===on Windows:=== | ||
Line 38: | Line 47: | ||
* Download the executable R-x.x.x-win32.exe | * Download the executable R-x.x.x-win32.exe | ||
* Launch this executable. | * Launch this executable. | ||
− | * type install.packages( | + | * type |
+ | <pre> | ||
+ | install.packages("Geneland"). | ||
+ | </pre> | ||
* follow the instructions. | * follow the instructions. |
Revision as of 18:24, 29 September 2015
Contents
Geneland tutorial
(if you need to still install see Installation:)
Tutorial
I have prepared 3 sample data files with increasing migration rate 1 is low and 3 is high, all use the same coordinate file (in fact the data was simulated using two populations and the coordinates are assigned randomly to the samples -- this is NOT how real data is collected because this destroys any geography within a population, but since there was no geography to start with this will be OK, I expect that geneland will cope well with sample1 and less well with sample3.
- start R
library('Geneland') Geneland.GUI()
- fill in the output directory and the coordinates and the sampled data (use codominated markers)
- run the analysis using at least 10000 steps (more would be better), do also a few replicates
- postprocess using the defaults
- run the graphics section and look at some of the plots (we will discuss these in class)
Installation:
On a mac:
- Install XQuartz (you may already have it) download and install: http://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.7.dmg
- Install R for your system (on my mac I run R.app, but every OS has one or more working R installations) for example use this: https://cran.r-project.org/bin/macosx/R-3.2.2.pkg and install
- install the geneland library into R: in the R.app installer get the package 'Geneland' using the package manager otherwise fire up R and then do: install.packages("Geneland")
if this works do (!! capitalization !!) library("Geneland") You may need to follow the prompt to install command line tools, otools or similar.
- if all worked then you should be set: in R try (again): library('Geneland') Geneland.GUI()
On UNIX systems:
- install R (use apt-get if your system supports that)
- in R:
install.packages("Geneland",method="wget") </pre} * you should be set: in R try: <pre> library('Geneland') Geneland.GUI()
on Windows:
- Go to the Windows binary repository http://cran.r-project.org/bin/windows/base/
- Download the executable R-x.x.x-win32.exe
- Launch this executable.
- type
install.packages("Geneland").
- follow the instructions.