Build Graphs for Landscape Genetics Analysis

Build graphs for landscape genetics analysis. This set of functions can be used to import and convert spatial and genetic data initially in different formats, import landscape graphs created with 'Graphab' software (Foltete et al., 2021) , make diagnosis plots of isolation by distance relationships in order to choose how to build genetic graphs, create graphs with a large range of pruning methods, weight their links with several genetic distances, plot and analyse graphs, compare them with other graphs. It uses functions from other packages such as 'adegenet' (Jombart, 2008) and 'igraph' (Csardi et Nepusz, 2006) < https://igraph.org/>. It also implements methods commonly used in landscape genetics to create graphs, described by Dyer et Nason (2004) and Greenbaum et Fefferman (2017) , and to analyse distance data (van Strien et al., 2015) . Recent updates introduce multiple habitat graph functionalities (as described by Savary et al., 2024) .


graph4lg

Overview

The goal of graph4lg is to make easier the construction and analysis of genetic and landscape graphs in landscape genetics studies (hence the name graph4lg). The package allows to weight the links and to prune the graphs by several ways. To our knowledge, it is the first software which enables to create genetic graphs with such a large variety of parameters. Besides, it allows to carry out preliminary analyses of the spatial pattern of genetic differentiation in order to choose the best genetic distance and pruning method in every context. Lastly, it makes possible the comparison of two spatial graphs sharing the same nodes.

Installation

You can install the released version of graph4lg from CRAN with:

install.packages("graph4lg")

To install the development version stored on Gitlab, use the following

remotes::install_gitlab("psavary3/graph4lg")

Until graph4lg.1.8, all the functions using the Graphab software program used graphab.2.8.jar. The new functions included in Graphab 3.0 are available in the functions of graph4lg.2.0 (and next), which now calls graphab.3.0.jar. As a consequence, users cannot reproduce the analyses performed with graphab.2.8.jar using the last version of graph4lg.

To ensure reproducibility and compatibility with former versions of the package, it is possible to install the previous version of graph4lg, compatible with graphab.2.8.jar from Gitlab with the following command:

remotes::install_gitlab("psavary3/graph4lg@archive-1-9")

Example

The package includes a tutorial with examples showing why and how to use each of the included functions. The package also includes data sets in order to test the functions.

More complete tutorials in English or French language are available for more details.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("graph4lg")

2.0.0 by Paul Savary, 17 days ago


Browse source code at https://github.com/cran/graph4lg


Authors: Paul Savary [aut, cre] , Gilles Vuidel [ctb] , Tyler Rudolph [ctb] , Alexandrine Daniel [ctb] (ORCID: , Jong Yoon Jeon [ctb]


Documentation:   PDF Manual  


GPL-2 license


Imports adegenet, ggplot2, stringr, igraph, stats, spatstat.geom, spatstat.linnet, Matrix, vegan, utils, methods, pegas, MASS, tidyr, sf, hierfstat, rappdirs, gdistance, raster, terra, ecodist, Rdpack

Suggests knitr, rmarkdown


Imported by cdmetapopR.


See at CRAN