Example: air traffic controller

Introduction to genetic data analysis using

Introduction to genetic data analysis usingThibaut Jombart Imperial College LondonMRC Centre for Outbreak analysis and ModellingAugust 17, 2016 AbstractThis practical introduces basic multivariate analysis of genetic data using theadegenetandade4packages for the R software. We briefly show how genetic markerdata can be read into R and how they are stored inadegenet, and then introduce basicpopulation genetics analysis and multivariate analyses. These topics are covered infurther depth in thebasicstutorial, which can be accessed from theadegenetwebsiteor by typingadegenetTutorial("basics")inR.

Introduction to genetic data analysis using Thibaut Jombart Imperial College London MRC Centre for Outbreak Analysis and Modelling August 17, 2016 Abstract This practical introduces basic multivariate analysis of genetic data using the adegenet and ade4 packages for the R software. We brie

Tags:

  Analysis, Introduction, Data, Genetic, Introduction to genetic data analysis

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of Introduction to genetic data analysis using

1 Introduction to genetic data analysis usingThibaut Jombart Imperial College LondonMRC Centre for Outbreak analysis and ModellingAugust 17, 2016 AbstractThis practical introduces basic multivariate analysis of genetic data using theadegenetandade4packages for the R software. We briefly show how genetic markerdata can be read into R and how they are stored inadegenet, and then introduce basicpopulation genetics analysis and multivariate analyses. These topics are covered infurther depth in thebasicstutorial, which can be accessed from theadegenetwebsiteor by typingadegenetTutorial("basics")inR.

2 Getting Installing the package .. Getting help ..32 Importing data53 First look at the data74 Basic population genetics Testing for Hardy-Weinberg equilibrium .. Assessing population structure ..155 Multivariate Principal Component analysis (PCA) .. Principal Coordinates analysis (PCoA) ..296 To go further3121 Getting Installing the packageBefore going further, we shall make sure thatadegenetis installed and up to date. Thecurrent version of the package is Make sure you have a recent version of R ( )by ## [1] "R version (2016-06-21)"Then, to install the stable version ofadegenetwith dependencies, ("adegenet", dep=TRUE)Ifadegenetwas already installed, you can ensure that it is up-to-date (ask=FALSE)As an alternative, you can install the current devel version ofadegenet, which incorporatesthe latest changes and improvements.

3 To do so, you first need the ("devtools")and then type:library(devtools)install_github("th ibautjombart/adegenet")We can now load the useful packages using :library("adegenet")library("ape")l ibrary("pegas") Getting helpThere are several ways of getting information aboutRin general, and aboutadegenetinparticular. The used to look for help on a given topic. For ("Monmonier")replies that there is a handful of functions implementing Monmonier s algorithm (fordetecting spatial genetic boundaries) in theadegenetpackage. To get help for a givenfunction, use?

4 Foowherefoois the function of interest. For instance:?monmonierwill open up the help of the main function implementing the algorithm. At the end ofa manpage, an example section often shows how to use a function. This can be copiedand pasted to the console, and sometimes directly executed from the console usingexample(for examples with a short runtime). For further questions concerning R, the functionRSiteSearchis a powerful tool for making online researches using keywords in R s archives(mailing lists and manpages).adegenethas a few extra documentation can be found fromthe website ( ), in the documents section,including several tutorials and a manual which compiles all manpages of the package, and adedicated mailing list with searchable archives.

5 To open the website from R, use:adegenetWeb()The same can be done for tutorials, usingadegenetTutorial()(see?adegenetTuto rialfor how to choose the tutorial to open). Similarly, bug reportsor feature requests can be made using Github s issue system, accessible via:adegenetIssues()You will also find an overview of the main functionalities of the package typing:?adegenetNote that you can also browse help pages as html pages, ()To go to theadegenetpage, click packages , adegenet , and adegenet-package .Lastly, several mailing lists are available to find different kinds of information on R; toname a few:4 adegenet forum: adegenet and genetic data analysis in R-help: general questions about R-sig-genetics: population genetics in R-sig-phylo: phylogenetics in Importing dataData can be imported from a wide range of formats, including those of popular populationgenetics software (GENETIX, STRUCTURE, Fstat, Genepop), or from simple dataframesof genotypes.

6 Polymorphic sites can be extracted from both nucleotide and amino-acidsequences, with special methods for handling genome-wide SNPs data with miminum RAMrequirements. data can be stored using two main classes of object: genind: allelic data for individuals stored as (integer) allele counts genpop: allelic data for groups of individuals ( populations ) stored as (integer) allelecountsTypically, data are first imported to form agenindobject, and potentially aggregated laterinto agenpopobject. Given any grouping of individuals, one can convert agenindobjectinto main functions for obtaining agenindobject are: import2genind: GENETIX/Fstat/Genepop files genindobject : STRUCTURE files genindobject df2 alleles genindobject DNAbin2genind:DNAbinobject genindobject (conserves SNPs only) alignment2genind:alignmentobject genindobject (conserves SNPs/polymorphicamino-acid sites only)Here, we will use a dataset distributed withadegenet, which can be loaded using : data (nancycats)cats <- nancycatscats5## /// GENIND OBJECT /////////#### // 237 individuals; 9 loci.

7 108 alleles; size: Kb#### // Basic content## @tab: 237 x 108 matrix of allele counts## number of alleles per locus (range: 8-18)## locus factor for the 108 columns of @tab## list of allele names for each locus## @ploidy: ploidy of each individual (range: 2-2)## @type: codom## @call: genind(tab = truenames(nancycats)$tab, pop = truenames(nancycats)$pop)#### // Optional content## @pop: population of each individual (group size range: 9-23)## @other: a list containing: xyThisgenindobject contains microsatellite genotypes of 237 cats from various colonies inNancy, France (see?)

8 Nancycatsfor details).63 First look at the datacatsis agenindobject storing microsatellite data . You can compare its content to its theoriginal dataset in GENETIX format, which you can visualize ( (" ",package="adegenet"))genindobjects store various information, including individual genotypes, labels forindividuals, loci, and alleles, the ploidy of each individual, and some optional content suchas population membership, spatial coordinates, etc. The content ofgenindobjects can beaccessed, and in some cases changed, using simple functions called accessors : nInd: returns the number of individuals in the object; only forgenind.

9 NLoc: returns the number of loci. nAll: returns the number of alleles for each locus. nPop: returns the number of populations. tab: returns a table of allele numbers, or frequencies (if requested), with optionalreplacement of missing values; replaces the former accessor truenames . indNames : returns/sets labels for individuals; only forgenind. locNames : returns/sets labels for loci. alleles : returns/sets alleles. ploidy : returns/sets ploidy of the individuals; when setting values, a single value canbe provided, in which case constant ploidy is assumed. pop : returns/sets a factor grouping individuals; only forgenind.

10 Strata : returns/sets data defining strata of individuals; only forgenind. hier : returns/sets hierarchical groups of individuals; only forgenind. other : returns/sets misc information stored as a indicates that a replacement method is available using <-; for instance:head(indNames(cats),10)## [1] "N215" "N216" "N217" "N218" "N219" "N220" "N221" "N222" "N223" "N224"indNames(cats) <- paste("cat", 1:nInd(cats),sep=".")head(indNames(cats) ,10)## [1] " " " " " " " " " " " " " "## [8] " " " " " "7 Thecatscontains various information:cats## /// GENIND OBJECT /////////#### // 237 individuals; 9 loci; 108 alleles.


Related search queries