EcoGenetics (version 1.2.1-6)

EcoGenetics-package: Management and Exploratory Analysis of Spatial Data in Landscape Genetics

Description

Management and exploratory analysis of spatial data in landscape genetics. Easy integration of information from multiple sources with "ecogen" objects.

Arguments

Details

Package: EcoGenetics
Type: Package
Version: 1.2.1-3
Date: 2018-01-13
License: GPL (>=2)

----------------------- o-----------------------

I. STRUCTURE OF THE PACKAGE

The spatial analysis module of the package computes global (Moran's I, Mantel test, etc.) and local (Getis-Ord's G*, local Moran's I, etc.) spatial tests, variograms and correlograms (see also this link). These analyses use other tool provided by the package: spatial weights matrices or a sequence of spatial weights matrices.

The package have also special plot methods for each of the analyses. Several conversor of data from/to other programs are available, (as to genepop - an importer tool is also defined for genepop-, SPAGeDi, etc.). Basic manipulation of genetic matrices is allowed by eco.convert and eco.format.

Tools for computation of NDVI in Landsat imaginery, post-process of rasters and temporal analysis can be found in eco.NDVI, eco.NDVI.post and eco.theilsen. Several other useful functions are defined in the package.

The results obtained with the main functions defined in EcoGenetics are object of class S4. For these objects, the package defines a "show" method for a general overview of the results, and methods to extract the information (generic accessors and double square brackets ("[[") definitions).

For storing and pre-processing the data, the package defines two special classes: ecogen and ecopop

II.ECOGEN OBJECTS

Landscape genetics research requires the integration of data originated in different sources. The class ecogen has been designed for handling multidimensional data of individuals. Its basic structure is the following:

- An XY slot, storing a data frame with geographic coordinates.

- A P slot, storing a phenotypic data frame.

- A G slot, storing a genotypic data frame.

- An A slot containing as allelic frequencies the information of G (only available for codominant markers.)

- An E slot, storing an environmental data frame.

- A S slot, storing a data frame with classes assigned to the individuals.

- A C slot, for a custom data frame.

- An OUT slot, containing a list for the storage of the results.

For dominant (presence-absence) markers, the slot A is empty.

The construction of a new "ecogen" object from a data frame is made with the homonymous function.

library("EcoGenetics")

data(eco.test)

eco <- ecogen(XY = coordinates, P = phenotype, G = genotype, E = environment, S = structure, order.G = TRUE)

The package defines several methods for manipulation of ecogen objects: eco.cbind, to bind ecogen objects by column, eco.split, to split ecogen objects by group, eco.rbind, to bind ecogen objects by row and to re-bind previously splitted objects, eco.subset, to select a group of individuals, given a population, eco.merge, to merge ecogen objects with different composition of individuals. The functions nrow, ncol, dim, names, as.list, is.ecogen and show are also defined. Single brackets ("[") and double brackets ("[[") are also defined to select a subset of individuals or to get/set the data of a particular slot, respectively. Conversors from and to genind, from and to spagedi, from and to genepop, to hierfstat and to geneland are included. See the ecogen constructor documentation and the publication of the package, cited at the end of this document, for more information.

III. ECOPOP OBJECTS

The class ecopop is the population analogue of ecogen class: while ecogen rows represent individuals, ecopop rows represent populations. An ecopop object contains aggregated data for each population (mean or other statistics of cuantitative variables, and counts for each level of cualitative variables [including allele counts]). In normal situations, an ecopop object is obtained from an ecogen object as follows:

ecopop_object <- ecogen2ecopop(eco, hier = "pop") # where pop is the name of the # column of the slot S with # the population of each # individual

ecopop objects can also be obtained from the ecopop constructor, as detailed in the documentation of the function.

The functions nrow, ncol, dim, names, as.list, is.ecogen and show are defined for ecopop objects. Single brackets ("[") and double brackets ("[[") are also defined to select a subset of individuals or to get/set the data of a particular slot, respectively. See ecopop constructor documentation for more information. Conversion from and to genpop is defined.

References

Roser LG, Ferreyra LI, Saidman BO, Vilardi JC (2017). EcoGenetics: An R package for the management and exploratory analysis of spatial data in landscape genetics. Molecular Ecology Resources, 17:e241-e250. doi: 10.1111/1755-0998.12697