graph4lg1.8.0 package

Build Graphs for Landscape Genetics Analysis

add_nodes_attr

Add attributes to the nodes of a graph

check_merge

Check whether the option 'nomerge' was used when building the landscap...

compar_r_fisher

Compare two correlation coefficients obtained from different sample si...

compute_graph_modul

Compute modules from a graph by maximising modularity

compute_node_metric

Compute graph-theoretic metrics from a graph at the node level

convert_cd

Fit a model to convert cost-distances into Euclidean distances

deg2rad

Convert degrees to radians

df_to_pw_mat

Convert an edge-list data.frame into a pairwise matrix

dist_gc_hvs

Calculate the Great-Circle distance between two points using the Harve...

dist_gc_slc

Calculate the Great-Circle distance between two points using the Spher...

dist_gc_vicenty

Calculate the Great-Circle distance between two points using the Vince...

dist_great_circle

Compute the Great Circle distance between two points

dist_max_corr

Compute the distance at which the correlation between genetic distance...

g_percol

Prune a graph using the 'percolation threshold' method

gen_graph_indep

Create an independence graph of genetic differentiation from genetic d...

gen_graph_thr

Create a graph of genetic differentiation using a link weight threshol...

gen_graph_topo

Create a graph of genetic differentiation with a specific topology

genepop_to_genind

Convert a GENEPOP file into a genind object

genind_to_genepop

Convert a genind object into a GENEPOP file

genind_to_structure

Convert a genind object into a STRUCTURE file

get_graphab

Download Graphab if not present on the user's machine

get_graphab_linkset

Get linkset computed in the Graphab project

get_graphab_linkset_cost

Get cost values associated with a linkset in a Graphab project

get_graphab_metric

Get metrics computed at the node in the Graphab project

get_graphab_raster_codes

Get unique raster codes from a Graphab project

gini_coeff

Compute Gini coefficient from a numeric vector

graph_modul_compar

Compare the partition into modules of two graphs

graph_node_compar

Compare the local properties of the nodes from two graphs

graph_plan

Create a graph with a minimum planar graph topology

graph_plot_compar

Visualize the topological differences between two spatial graphs on a ...

graph_to_df

Convert a graph into a edge list data.frame

graph_to_shp

Export a spatial graph to shapefile layers

graph_topo_compar

Compute an index comparing graph topologies

graphab_capacity

Computes custom capacities of patches in the Graphab project

graphab_corridor

Computes corridors from least-cost paths already computed in the Graph...

graphab_graph

Create a graph in the Graphab project

graphab_interpol

Creates a raster with interpolated connectivity metric values from met...

graphab_link

Create a link set in the Graphab project

graphab_metric

Compute connectivity metrics from a graph in the Graphab project

graphab_modul

Create modules from a graph in the Graphab project

graphab_pointset

Add a point set to the Graphab project

graphab_project

Create a Graphab project

graphab_project_desc

Describe the objects of a Graphab project

graphab_to_igraph

Create landscape graphs from Graphab link set

gstud_to_genind

Convert a file from gstudio or popgraph into a genind object

harm_mean

Compute the harmonic mean of a numeric vector

kernel_param

Compute dispersal kernel parameters

link_compar

Compare two link sets created in a Graphab project

loci_to_genind

Convert a loci object into a genind object

mat_cost_dist

Compute cost distances between points on a raster

mat_gen_dist

Compute a pairwise matrix of genetic distances between populations

mat_geo_dist

Compute Euclidean geographic distances between points

mat_pw_dps

Compute a pairwise genetic distance matrix between populations using B...

mat_pw_fst

Compute a pairwise FST matrix between populations

mypalette

Vector of custom colors

patch_areas

Extract patch areas from a categorical raster

plot_graph_lg

Plot graphs

plot_w_hist

Plot histograms of link weights

pop_gen_index

Compute population-level genetic indices

pop_rare_gen_index

Compute population-level rarefied genetic indices with ADZE software

pw_mat_to_df

Convert a pairwise matrix into an edge-list data.frame

reorder_mat

Reorder the rows and columns of a symmetric matrix

sample_raster

Sample points or patches on a categorical raster layer

sc01

Scaling function

scatter_dist

Plot scatterplots of genetic distance vs landscape distance

scatter_dist_g

Plot scatterplots of distances to visualize the graph pruning intensit...

structure_to_genind

Convert a file in STRUCTURE format into a genind object

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., 2012) <doi:10.1016/j.envsoft.2012.07.002>, 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) <doi:10.1093/bioinformatics/btn129> 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) <doi:10.1111/j.1365-294X.2004.02177.x> and Greenbaum et Fefferman (2017) <doi:10.1111/mec.14059>, and to analyse distance data (van Strien et al., 2015) <doi:10.1038/hdy.2014.62>.

  • Maintainer: Paul Savary
  • License: GPL-2
  • Last published: 2023-01-30