dartR2.9.9.5 package

Importing and Analysing 'SNP' and 'Silicodart' Data Generated by Genome-Wide Restriction Fragment Analysis

bandicoot.gl

A genlight object created via the read.dart functions

cbind.dartR

adjust cbind for dartR

gi2gl

Converts a genind object into a genlight object

gl.alf

Calculates allele frequency of the first and second allele for each lo...

gl.allele.freq

Generates percentage allele frequencies by locus and population

gl.amova

Performs AMOVA using genlight data

gl.assign.grm

Population assignment using grm

gl.assign.mahalanobis

Assign an individual of unknown provenance to population based on Maha...

gl.assign.pa

Eliminates populations as possible source populations for an individua...

gl.assign.pca

Assign an individual of unknown provenance to population based on PCA

gl.basic.stats

Calculates basic statistics for each loci (Hs, Ho, Fis etc.)

gl.blast

Aligns nucleotides sequences against those present in a target databas...

gl.check.verbosity

Checks the current global verbosity

gl.check.wd

Checks the global working directory

gl.collapse

Collapses a distance matrix by amalgamating populations with pairwise ...

gl.colors

This is a helper function that supports the creation of color palettes...

gl.compliance.check

Checks a genlight object to see if it complies with dartR expectations...

gl.costdistances

Calculates cost distances for a given landscape (resistance matrix)

gl.define.pop

Defines a new population in a genlight object for specified individual...

gl.diagnostics.hwe

Provides descriptive stats and plots to diagnose potential problems wi...

gl.diagnostics.sim

Comparing simulations against theoretical expectations

gl.dist.ind

Calculates a distance matrix for individuals defined in a genlight obj...

gl.dist.pop

Calculates a distance matrix for populations with SNP genotypes in a g...

gl.drop.ind

Removes specified individuals from a dartR genlight object

gl.drop.loc

Removes specified loci from a dartR genlight object

gl.drop.pop

Removes specified populations from a dartR genlight object

gl.edit.recode.ind

Creates or edits individual (=specimen) names, creates a recode_ind fi...

gl.edit.recode.pop

Creates or edits and applies a population re-assignment table

gl.evanno

Creates an Evanno plot from a STRUCTURE run object

gl.fdsim

Estimates the rate of false positives in a fixed difference analysis

gl.filter.allna

Filters loci that are all NA across individuals and/or populations wit...

gl.filter.callrate

Filters loci or specimens in a genlight {adegenet} object based on cal...

gl.filter.hamming

Filters loci based on pairwise Hamming distance between sequence tags

gl.filter.heterozygosity

Filters individuals with average heterozygosity greater than a specifi...

gl.filter.hwe

Filters loci that show significant departure from Hardy-Weinberg Equil...

gl.filter.locmetric

Filters loci on the basis of numeric information stored in other$loc.m...

gl.filter.maf

Filters loci on the basis of minor allele frequency (MAF) in a genligh...

gl.filter.monomorphs

Filters monomorphic loci, including those with all NAs

gl.filter.overshoot

Filters loci for which the SNP has been trimmed from the sequence tag ...

gl.filter.pa

Filters loci that contain private (and fixed alleles) between two popu...

gl.filter.parent.offspring

Filters putative parent offspring within a population

gl.filter.rdepth

Filters loci based on counts of sequence tags scored at a locus (read ...

gl.filter.reproducibility

Filters loci in a genlight {adegenet} object based on average repeatab...

gl.filter.secondaries

Filters loci that represent secondary SNPs in a genlight object

gl.filter.sexlinked

Filters loci that are sex linked

gl.filter.taglength

Filters loci in a genlight {adegenet} object based on sequence tag len...

gl.fixed.diff

Generates a matrix of fixed differences and associated statistics for ...

gl.fst.pop

Calculates a pairwise Fst values for populations in a genlight object

gl.genleastcost

Performs least-cost path analysis based on a friction matrix

gl.grm.network

Represents a genomic relationship matrix (GRM) as a network

gl.grm

Calculates an identity by descent matrix

gl.He

Estimates expected Heterozygosity

gl.Ho

Estimates observed Heterozygosity

gl.hwe.pop

Performs Hardy-Weinberg tests over loci and populations

gl.ibd

Performs isolation by distance analysis

gl.impute

Imputates missing data

gl.install.vanilla.dartR

Installs all required packages for using all functions available in da...

gl.join

Combines two genlight objects

gl.keep.ind

Removes all but the specified individuals from a dartR genlight object

gl.keep.loc

Removes all but the specified loci from a genlight object

gl.keep.pop

Removes all but the specified populations from a dartR genlight object

gl.ld.distance

Plots linkage disequilibrium against distance by population disequilib...

gl.ld.haplotype

Visualize patterns of linkage disequilibrium and identification of hap...

gl.LDNe

Estimates effective population size using the Linkage Disequilibrium m...

gl.list.reports

Prints dartR reports saved in tempdir

gl.load

Loads an object from compressed binary format produced by gl.save()

gl.make.recode.ind

Creates a proforma recode_ind file for reassigning individual (=specim...

gl.make.recode.pop

Creates a proforma recode_pop_table file for reassigning population na...

gl.map.interactive

Creates an interactive map (based on latlon) from a genlight object

gl.map.structure

Maps a STRUCTURE plot using a genlight object

gl.merge.pop

Merges two or more populations in a genlight object into one populatio...

gl.nhybrids

Creates an input file for the program NewHybrids and runs it if NewHyb...

gl.outflank

Identifies loci under selection per population using the outflank meth...

gl.pcoa.plot

Bivariate or trivariate plot of the results of an ordination generated...

gl.pcoa

Ordination applied to genotypes in a genlight object (PCA), in an fd o...

gl.percent.freq

Generates percentage allele frequencies by locus and population

gl.play.history

Replays the history and applies it to a genlight object

gl.plot.faststructure

Plots fastStructure analysis results (Q-matrix)

gl.plot.heatmap

Represents a distance matrix as a heatmap

gl.plot.network

Represents a distance or dissimilarity matrix as a network

gl.plot.structure

Plots STRUCTURE analysis results (Q-matrix)

gl.print.history

Prints history of a genlight object

gl.print.reports

Prints dartR reports saved in tempdir

gl.propShared

Calculates a similarity (distance) matrix for individuals on the propo...

gl.random.snp

Randomly changes the allocation of 0's and 2's in a genlight object

gl.read.csv

Reads SNP data from a csv file into a genlight object

gl.read.dart

Imports DArT data into dartR and converts it into a dartR genlight obj...

gl.read.fasta

Reads FASTA files and converts them to genlight object

gl.read.silicodart

Imports presence/absence data from SilicoDArT to genlight {agegenet} f...

gl.read.vcf

Converts a vcf file into a genlight object

gl.reassign.pop

Assigns an individual metric as pop in a genlight {adegenet} object

gl.recalc.metrics

Recalculates locus metrics when individuals or populations are deleted...

gl.recode.ind

Recodes individual (=specimen = sample) labels in a genlight object

gl.recode.pop

Recodes population assignments in a genlight object

gl.rename.pop

Renames a population in a genlight object

gl.report.bases

Reports summary of base pair frequencies

gl.report.callrate

Reports summary of Call Rate for loci or individuals

gl.report.diversity

Calculates diversity indexes for SNPs

gl.report.fstat

Reports various statistics of genetic differentiation between populati...

gl.report.hamming

Calculates the pairwise Hamming distance between DArT trimmed DNA sequ...

gl.report.heterozygosity

Reports observed, expected and unbiased heterozygosities and FIS (inbr...

gl.report.hwe

Reports departure from Hardy-Weinberg proportions

gl.report.ld.map

Calculates pairwise linkage disequilibrium by population

gl.report.locmetric

Reports summary of the slot otherotherloc.metrics

gl.report.maf

Reports minor allele frequency (MAF) for each locus in a SNP dataset

gl.report.monomorphs

Reports monomorphic loci

gl.report.overshoot

Reports loci for which the SNP has been trimmed from the sequence tag ...

gl.report.pa

Reports private alleles (and fixed alleles) per pair of populations

gl.report.parent.offspring

Identifies putative parent offspring within a population

gl.report.rdepth

Reports summary of Read Depth for each locus

gl.report.replicates

Identify replicated individuals

gl.report.reproducibility

Reports summary of RepAvg (repeatability averaged over both alleles fo...

gl.report.secondaries

Reports loci containing secondary SNPs in sequence tags and calculates...

gl.report.sexlinked

Identifies loci that are sex linked

gl.report.taglength

Reports summary of sequence tag length across loci

gl.run.faststructure

Runs a faststructure analysis using a genlight object

gl.run.structure

Runs a STRUCTURE analysis using a genlight object

gl.sample

Samples individuals from populations

gl.save

Saves an object in compressed binary format for later rapid retrieval

gl.select.colors

Selects colors from one of several palettes and output as a vector

gl.select.shapes

Selects shapes from the base R shape palette and outputs as a vector

gl.set.verbosity

Sets the default verbosity level

gl.sfs

Creates a site frequency spectrum based on a dartR or genlight object

gl.sim.create_dispersal

Creates a dispersal file as input for the function gl.sim.WF.run

gl.sim.emigration

Simulates emigration between populations

gl.sim.ind

Simulates individuals based on the allele frequencies provided via a g...

gl.sim.mutate

Simulates mutations within a genlight object

gl.sim.offspring

Simulates a specified number of offspring based on alleles provided by...

gl.sim.WF.run

Runs Wright-Fisher simulations

gl.sim.WF.table

Creates the reference table for running gl.sim.WF.run

gl.smearplot

Smear plot of SNP or presence/absence (SilicoDArT) data

gl.sort

re-sorts genlight objects

gl.spatial.autoCorr

Spatial autocorrelation following Smouse and Peakall 1999

gl.subsample.loci

Subsamples n loci from a genlight object and return it as a genlight o...

gl.test.heterozygosity

Tests the difference in heterozygosity between populations taken pairw...

gl.tree.nj

Outputs an nj tree to summarize genetic similarity among populations

gl.write.csv

Writes out data from a genlight object to csv file

gl2bayescan

Converts a genlight object into a format suitable for input to Bayesca...

gl2bpp

Converts a genlight object into a format suitable for input to the BPP...

gl2dartR

Convert a genlight object to a dartR object

gl2demerelate

Creates a dataframe suitable for input to package {Demerelate} from a ...

gl2eigenstrat

Converts a genlight object into eigenstrat format

gl2fasta

Concatenates DArT trimmed sequences and outputs a FASTA file

gl2faststructure

Converts a genlight object into faststructure format (to run faststruc...

gl2gds

Converts a genlight object into gds format

gl2genalex

Converts a genlight object into a format suitable for input to genalex

gl2genepop

Converts a genlight object into genepop format (and file)

gl2geno

Converts a genlight object to geno format from package LEA

gl2gi

Converts a genlight object to genind object

gl2hiphop

Converts a genlight objects into hiphop format

gl2phylip

Creates a Phylip input distance matrix from a genlight (SNP) {adegenet...

gl2plink

Converts a genlight object into PLINK format

gl2related

Converts a genlight object to format suitable to be run with Coancestr...

gl2sa

Converts genlight objects to the format used in the SNPassoc package

gl2sfs

Converts a genlight object into a sfs input file

gl2shp

Converts a genlight object to ESRI shapefiles or kml files

gl2snapp

Converts a genlight object to nexus format suitable for phylogenetic a...

gl2structure

Converts a genlight object to STRUCTURE formatted files

gl2svdquartets

Converts a genlight object to nexus format PAUP SVDquartets

gl2treemix

Converts a genlight object to a treemix input file

gl2vcf

Converts a genlight object into vcf format

interactive_reference

Shiny app for the input of the reference table for the simulations

interactive_sim_run

Shiny app for the input of the simulations variables

is.fixed

Tests if two populations are fixed at a given locus

platy

Example data set as text file to be imported into a genlight object

rbind.dartR

adjust rbind for dartR

sub-dartR-ANY-ANY-ANY-method

indexing dartR objects correctly...

testset_metadata

Metadata file. Can be integrated via the dart2genlight function.

testset_pop_recode

Recode file to be used with the function.

testset_SNPs_2Row

Testfile in DArT format (as provided by DArT)

theme_dartR

dartR theme

utils.assignment_2

Population assignment probabilities

utils.assignment_3

Population assignment probabilities

utils.assignment_4

Population assignment probabilities

utils.assignment

Population assignment probabilities

utils.basic.stats

Calculates mean observed heterozygosity, mean expected heterozygosity ...

utils.check.datatype

Utility function to check the class of an object passed to a function

utils.clumpp

Functions from package starmie for merging Q matrices from Structure r...

utils.dart2genlight

Converts DarT to genlight.

utils.dist.binary

Calculates a distance matrix for individuals defined in a dartR genlig...

utils.dist.ind.snp

Calculates a distance matrix for individuals defined in a dartR genlig...

utils.flag.start

A utility script to flag the start of a script

utils.hamming

Calculates the Hamming distance between two DArT trimmed DNA sequences

utils.het.pop

Calculates expected mean expected heterozygosity per population

utils.jackknife

Conducts jackknife resampling using a genlight object

utils.n.var.invariant

A utility script to calculate the number of variant and invariant site...

utils.outflank.MakeDiploidFSTMat

Creates OutFLANK input file from individual genotype info.

utils.outflank.plotter

Plotting functions for Fst distributions after OutFLANK

utils.outflank

OutFLANK: An Fst outlier approach by Mike Whitlock and Katie Lotterhos...

utils.plot.save

An internal function to save a ggplot object to disk in RDS binary for...

utils.read.dart

utility function to read in DArT data

utils.recalc.avgpic

A utility script to recalculate the OneRatioRef, OneRatioSnp, PICRef, ...

utils.recalc.callrate

A utility script to recalculate the callrate by locus after some popul...

utils.recalc.freqhets

A utility script to recalculate the frequency of the heterozygous SNPs...

utils.recalc.freqhomref

A utility script to recalculate the frequency of the homozygous refere...

utils.recalc.freqhomsnp

A utility script to recalculate the frequency of the homozygous altern...

utils.recalc.maf

A utility script to recalculate the minor allele frequency by locus, t...

utils.reset.flags

A utility script to reset to FALSE (or TRUE) the locus metric flags af...

utils.spautocor

Spatial autocorrelation coefficient calculations

utils.structure.evanno

Util function for evanno plots

utils.structure.genind2gtypes

structure util functions

utils.structure.run

Utility function to run Structure

zzz

Setting up the package

Functions are provided that facilitate the import and analysis of 'SNP' (single nucleotide polymorphism) and 'silicodart' (presence/absence) data. The main focus is on data generated by 'DarT' (Diversity Arrays Technology), however, data from other sequencing platforms can be used once 'SNP' or related fragment presence/absence data from any source is imported. Genetic datasets are stored in a derived 'genlight' format (package 'adegenet'), that allows for a very compact storage of data and metadata. Functions are available for importing and exporting of 'SNP' and 'silicodart' data, for reporting on and filtering on various criteria (e.g. 'CallRate', heterozygosity, reproducibility, maximum allele frequency). Additional functions are available for visualization (e.g. Principle Coordinate Analysis) and creating a spatial representation using maps. 'dartR' supports also the analysis of 3rd party software package such as 'newhybrid', 'structure', 'NeEstimator' and 'blast'. Since version 2.0.3 we also implemented simulation functions, that allow to forward simulate 'SNP' dynamics under different population and evolutionary dynamics. Comprehensive tutorials and support can be found at our 'github' repository: github.com/green-striped-gecko/dartR/. If you want to cite 'dartR', you find the information by typing citation('dartR') in the console.

  • Maintainer: Bernd Gruber
  • License: GPL (>= 3)
  • Last published: 2025-03-25