Learn R Programming

⚠️There's a newer version (2.9.9.5) of this package.Take me there.

dartR (version 0.80)

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

Description

Functions are provided that facilitate the import and analysis of snp and silicodart (presence/absence) data. The main focus is on data generated by DarT (Diversity Arrays Technology). However, once SNP or related fragment presence/absence data from any source is imported into a genlight object many of the functions can be used. Functions are available for input and output of snp and silicodart data, for reporting on and filtering on various criteria (e.g. CallRate, Heterozygosity, Reproducibility, maximum allele frequency). Advanced filtering is based on Linkage Disequilibrium and HWE. Other functions are available for visualization after PCoA, or to facilitate transfer of data between genlight/genind objects and newhybrids, related, phylip packages etc.

Copy Link

Version

Install

install.packages('dartR')

Monthly Downloads

4,205

Version

0.80

License

GPL-2

Maintainer

Bernd Gruber

Last Published

June 23rd, 2017

Functions in dartR (0.80)

gl.dist

Calculate a distance matrix for populations defined in an {adegenet} genlight object
gl.edit.recode.ind

Create or edit a individual (=specimen) names and create an recode_ind file
gi.hwe.pop

Filter function to facilitate analysing of dart data
gi.outflank

Functio to identify loci under selection per population using the outflank method of Whitlock and Lotterhos (2015)
gl.collapse

Collapse a distance matrix by amalgamating populations
gl.collapse.recursive

Recursively collapse a distance matrix by amalgamating populations
dart2genlight

Convert DarT to genlight
filter.dart

Filter function to facilitate analysing of dart data [deprecated use explicit filter functions gl.filter...]
gi.report.ld

Calculates pairwise population based Linkage Disequilibirum across all loci using the specifyied number of cores
gi2gl

Converts a genind object to genlight object
gl.filter.cloneid

Filter for CloneID to select only unique SNPs
gl.filter.dups

Filter duplicated loci in a genlight {adegenet} object
gl.fixed.diff

Generate a matrix of fixed differences from a genelight or genind object {adegenet}
gl.gene.freq

Calculate a statistic for each locus by group An internal function essentially to convey readability to rather contorted R code. It takes as input a genlight {adegenet} object with an index variable (say, population) and calculates the selected statistic for each locus, broken down by the groups defined by the index variable.
gl.pcoa.plot

Bivariate plot of the results of a PCoA ordination
gl.pcoa.pop

PCoA ordination of populations
gl.edit.recode.pop

Create or edit a population re-assignment table
gl.filter.callrate

Filter loci or specimens in a genlight {adegenet} object based on call rate
gl.read.dart

Import DarT data into R and conver it to a genlight object
gl.make.recode.ind

Create a proforma recode_ind file for reassigning individual (=specimen) names
gl.make.recode.pop

Create a proforma recode_ind_table file for reassigning individual (=specimen) names
gl.report.callrate

Report summary of Call Rate for loci or individuals
gl.report.dups

Report duplicated loci in a genlight {adegenet} object
gl2faststructure

Export DArT genlight object {adegenet} to faststructure format (to run faststructure elsewhere)
gl2gds

Convert a genlight object to gds format SNPRelate
testset.gl

A genlight object created via the read.dart functions
testset_SNPs_2Row

Testfile in DArT format (as provided by DArT)
gl.filter.hamming

Filters loci in a genlight object based on pairwise Hamming distance between sequence tags
gl.filter.hwe

Filters loci that show significant departure from Hardy-Weinberg Equilibrium
gl.pcoa

PCoA ordination (glPca)
gl.pcoa.plot.3d

3D interactive plot of the results of a PCoA ordination
gl.read.silicodart

Import presence/absence data from SilicoDArT and convert to genind {agegenet} format
gl.recode.ind

Recode individual (=specimen) labels in a genelight or genind object {adegenet}
gl2demerelate

Create a dataframe suitable for input to package {Demerelate} from a genlight {adegenet} object
gl2fasta

Concatenates DArT trimmed sequences and outputs a fastA file.
gl2phylip

Create a Phylip input distance matrix from a genlight (SNP) or genind (SilicoDarT) {adegenet} object
is.fixed

Test to see if two populations are fixed at a given locus
gl.report.hwe

Reports departure from Hardy-Weinberg Equilibrium
gl.report.monomorphs

Report monomorphic loci, including those with all NAs
gl.report.repavg

Report summary of RepAvg, reproducibility averaged over both alleles for each locus in a genlight adegenet object
gl.read.dart.arthur

Import SNP data from DArT and convert to genlight {agegenet} format (gl)
gl.report.hamming

Calculates the pairwise Hamming distance between DArT trimmed DNA sequences
gl.report.heterozygosity

Reports hetrozygosity
gl.tree.nj

Output an nj tree to summarize genetic similarity among populations
gl.write.csv

prob.hwe

Exact SNP test of Hardy-Weinberg Equilibrium
read.dart

Import DarT data to R
gl.subsample.loci

Subsample n loci from a genlight object and return as a genlight object
utils.hamming

Calculates the Hamming distance between two DArT trimmed DNA sequences
utils.hwe

Calculates departure from Hardy-Weinberg Equilibrium. Utility script not meant for end users.
gl.filter.monomorphs

Remove monomorphic loci, including those with all NAs
gl.filter.repavg

Filter loci in a genlight {adegenet} object based on average reproducibility of alleles at a locus
gl.pcoa.scree

Produce a plot of eigenvalues, standardized as percentages, derived from a PCoA
gl.percent.freq

Generate percentage allele frequencies by locus and population
gl.recode.pop

Recode population assignments in a genelight or genind object {adegenet}
gl.report.bases

Summary of base pair frequencies
gl2gi

Converts a genlight object to genind object
gl2nhyb

Create an input file for the program NewHybrids
testset_metadata

Metadata file. Can be integrated via the dart2genlight function.
testset_pop_recode

Recode file to be used with the function.