Package: dartR.base 0.65

dartR.base: Analysing 'SNP' and 'Silicodart' Data - Basic Functions

Facilitates 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.base' is the 'base' package of the 'dartRverse' suits of packages. To install the other packages, we recommend to install the 'dartRverse' package, that supports the installation of all packages in the 'dartRverse'. If you want to cite 'dartR', you find the information by typing citation('dartR.base') in the console.

Authors:Bernd Gruber [aut, cre], Arthur Georges [aut], Jose L. Mijangos [aut], Carlo Pacioni [aut], Peter J. Unmack [ctb], Oliver Berry [ctb], Lindsay V. Clark [ctb], Floriaan Devloo-Delva [ctb], Eric Archer [ctb]

dartR.base_0.65.tar.gz
dartR.base_0.65.zip(r-4.5)dartR.base_0.65.zip(r-4.4)dartR.base_0.65.zip(r-4.3)
dartR.base_0.65.tgz(r-4.4-any)dartR.base_0.65.tgz(r-4.3-any)
dartR.base_0.65.tar.gz(r-4.5-noble)dartR.base_0.65.tar.gz(r-4.4-noble)
dartR.base_0.65.tgz(r-4.4-emscripten)dartR.base_0.65.tgz(r-4.3-emscripten)
dartR.base.pdf |dartR.base.html
dartR.base/json (API)

# Install 'dartR.base' in R:
install.packages('dartR.base', repos = c('https://green-striped-gecko.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/green-striped-gecko/dartr/issues

Datasets:
  • bandicoot.gl - A genlight object created via the read.dart functions This a test data set to test the validity of functions within dartR and is based on a DArT SNP data set of simulated bandicoots across Australia. It contains 96 individuals and 1000 SNPs.
  • possums.gl - A simulated genlight object created to run a landscape genetic example This a test data set to run a landscape genetics example. It contains 10 populations of 30 individuals each and each individual has 300 loci. There are no covariates for individuals or loci.
  • testset.gl - A genlight object created via the gl.read.dart function This is a test data set on turtles. 250 individuals, 255 loci in >30 populations.
  • testset.gs - A genlight object created via the gl.read.silicodart function This is a test data set on turtles. 218 individuals, 255 loci in >30 populations.

On CRAN:

133 exports 4.87 score 86 dependencies 5 dependents 48 mentions 14 scripts 534 downloads

Last updated 10 months agofrom:385244cba4. Checks:OK: 5 NOTE: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKAug 25 2024
R-4.5-winNOTEAug 25 2024
R-4.5-linuxNOTEAug 25 2024
R-4.4-winOKAug 25 2024
R-4.4-macOKAug 25 2024
R-4.3-winOKAug 25 2024
R-4.3-macOKAug 25 2024

Exports:gi2glgl.alfgl.allele.freqgl.amovagl.check.verbositygl.check.wdgl.colorsgl.compliance.checkgl.define.popgl.diagnostics.hwegl.dist.indgl.dist.popgl.drop.indgl.drop.locgl.drop.popgl.edit.recode.indgl.edit.recode.popgl.fdsimgl.filter.allnagl.filter.callrategl.filter.factorloadingsgl.filter.hamminggl.filter.heterozygositygl.filter.hwegl.filter.ldgl.filter.locmetricgl.filter.mafgl.filter.monomorphsgl.filter.overshootgl.filter.pagl.filter.rdepthgl.filter.reproducibilitygl.filter.secondariesgl.filter.taglengthgl.fixed.diffgl.fst.popgl.Hegl.Hogl.hwe.popgl.imputegl.joingl.keep.indgl.keep.locgl.keep.popgl.loadgl.mahal.assigngl.make.recode.indgl.make.recode.popgl.map.interactivegl.merge.popgl.pcoagl.pcoa.plotgl.plot.heatmapgl.print.historygl.propSharedgl.randomize.snpsgl.read.csvgl.read.dartgl.read.fastagl.read.PLINKgl.read.silicodartgl.read.vcfgl.reassign.popgl.recalc.metricsgl.recode.indgl.recode.popgl.rename.popgl.report.basesgl.report.basicsgl.report.callrategl.report.diversitygl.report.factorloadingsgl.report.fstatgl.report.hamminggl.report.heterozygositygl.report.hwegl.report.ldgl.report.ld.mapgl.report.locmetricgl.report.mafgl.report.monomorphsgl.report.overshootgl.report.pagl.report.rdepthgl.report.reproducibilitygl.report.secondariesgl.report.taglengthgl.samplegl.savegl.select.colorsgl.select.shapesgl.set.verbositygl.set.wdgl.sim.crossesgl.sim.genotypesgl.smearplotgl.sortgl.subsample.indgl.subsample.locgl.test.heterozygositygl.tree.njgl.write.csvgl2bayesAssgl2bayescangl2bppgl2demerelategl2eigenstratgl2fastagl2faststructuregl2gdsgl2genalexgl2genepopgl2genogl2gigl2hiphopgl2phylipgl2plinkgl2relatedgl2sagl2snappgl2structuregl2svdquartetsgl2treemixgl2vcftheme_dartRutils.basic.statsutils.check.datatypeutils.flag.startutils.is.fixedutils.jackknifeutils.plink.runutils.plot.saveutils.reset.flags

Dependencies:ade4adegenetapebase64encbootbslibcachemcliclustercodetoolscolorspacecommonmarkcpp11crayondartR.datadata.tabledigestdoParalleldplyrfansifarverfastmapfontawesomeforeachfsgdsfmtgenericsggplot2gluegridExtragtablehtmltoolshttpuvigraphisobanditeratorsjquerylibjsonlitelabelinglaterlatticelifecyclemagrittrMASSMatrixmemoisemgcvmimemunsellnlmepatchworkpegaspermutepillarpixmappkgconfigplyrpromisespurrrR6rappdirsRColorBrewerRcppRcppArmadilloreshape2rlangsassscalessegmentedseqinrshinySNPRelatesourcetoolsspStAMPPstringistringrtibbletidyrtidyselectutf8vctrsveganviridisLitewithrxtable

Readme and manuals

Help Manual

Help pageTopics
indexing dartR objects correctly...[,dartR,ANY,ANY,ANY-method
A genlight object created via the read.dart functions This a test data set to test the validity of functions within dartR and is based on a DArT SNP data set of simulated bandicoots across Australia. It contains 96 individuals and 1000 SNPs.bandicoot.gl
adjust cbind for dartRcbind.dartR
Calculates allele frequency of the first and second allele for each locus A very simple function to report allele frequenciesgl.alf
Generates percentage allele frequencies by locus and populationgl.allele.freq
Performs AMOVA using genlight datagl.amova
Checks the current global verbositygl.check.verbosity
Checks the global working directorygl.check.wd
Returns a list of colors for use in plotsgl.colors
Checks a genlight object to see if it complies with dartR expectations and amends it to comply if necessary @family environmentgl.compliance.check
Defines a new population in a genlight object for specified individualsgl.define.pop
Provides descriptive stats and plots to diagnose potential problems with Hardy-Weinberg proportions @family matched reportgl.diagnostics.hwe
Calculates a distance matrix for individuals defined in a genlight objectgl.dist.ind
Calculates a distance matrix for populations with SNP genotypes in a genlight objectgl.dist.pop
Removes specified individuals from a dartR genlight objectgl.drop.ind
Removes specified loci from a dartR genlight objectgl.drop.loc
Removes specified populations from a dartR genlight objectgl.drop.pop
Creates or edits individual (=specimen) names, creates a recode_ind file and applies the changes to a genlight object @family data manipulationgl.edit.recode.ind
Creates or edits and applies a population re-assignment tablegl.edit.recode.pop
Estimates the rate of false positives in a fixed difference analysisgl.fdsim
Filters loci that are all NA across individuals and/or populations with all NA across locigl.filter.allna
Filters loci or specimens in a genlight {adegenet} object based on call rategl.filter.callrate
Filters loci based on factor loadings for a PCA or PCoAgl.filter.factorloadings
Filters loci based on pairwise Hamming distance between sequence tagsgl.filter.hamming
Filters individuals with average heterozygosity greater than a specified upper threshold or less than a specified lower threshold @family matched filtergl.filter.heterozygosity
Filters loci that show significant departure from Hardy-Weinberg Equilibrium @family matched filtergl.filter.hwe
Filters loci based on linkage disequilibrium (LD)gl.filter.ld
Filters loci on the basis of numeric information stored in other$loc.metrics in a genlight {adegenet} objectgl.filter.locmetric
Filters loci on the basis of minor allele frequency (MAF) in a genlight objectgl.filter.maf
Filters monomorphic loci, including those with all NAsgl.filter.monomorphs
Filters loci for which the SNP has been trimmed from the sequence tag along with the adaptorgl.filter.overshoot
Filters loci that contain private (and fixed alleles) between two populationsgl.filter.pa
Filters loci based on counts of sequence tags scored at a locus (read depth) @family matched filtergl.filter.rdepth
Filters loci in a genlight {adegenet} object based on average repeatability of alleles at a locus @family matched filtergl.filter.reproducibility
Filters loci that represent secondary SNPs in a genlight objectgl.filter.secondaries
Filters loci in a genlight {adegenet} object based on sequence tag length @family matched filtergl.filter.taglength
Generates a matrix of fixed differences and associated statistics for populations taken pairwisegl.fixed.diff
Calculates a pairwise Fst values for populations in a genlight object This script calculates pairwise Fst values based on the implementation in the StAMPP package (?stamppFst). It allows to run bootstrap to estimate probability of Fst values to be different from zero. For detailed information please check the help pages (?stamppFst).gl.fst.pop
Estimates expected Heterozygositygl.He
Estimates observed Heterozygositygl.Ho
Performs Hardy-Weinberg tests over loci and populationsgl.hwe.pop
Imputes missing datagl.impute
Combines two dartR genlight objectsgl.join
Removes all but the specified individuals from a dartR genlight objectgl.keep.ind
Removes all but the specified loci from a genlight objectgl.keep.loc
Removes all but the specified populations from a dartR genlight objectgl.keep.pop
Loads an object from compressed binary format produced by gl.save()gl.load
Assigns individuals to populations with an associated probabilitygl.mahal.assign
Creates a proforma recode_ind file for reassigning individual (=specimen) namesgl.make.recode.ind
Creates a proforma recode_pop_table file for reassigning population names @family data manipulationgl.make.recode.pop
Creates an interactive map (based on latlon) from a genlight objectgl.map.interactive
Merges two or more populations in a dartR genlight object into one populationgl.merge.pop
Ordination applied to genotypes in a genlight object (PCA), in an fd object, or to a distance matrix (PCoA)gl.pcoa
Bivariate or trivariate plot of the results of an ordination generated using gl.pcoa()gl.pcoa.plot
Represents a distance matrix as a heatmapgl.plot.heatmap
Prints history of a genlight objectgl.print.history
Calculates a similarity (distance) matrix for individuals on the proportion of shared alleles @family distancegl.prop.shared gl.propShared
Randomly changes the allocation of 0's and 2's in a genlight objectgl.randomize.snps
Reads SNP data from a csv file into a genlight objectgl.read.csv
Imports DArT data into dartR and converts it into a dartR genlight objectgl.read.dart
Reads FASTA files and converts them to genlight objectgl.read.fasta
Reads PLINK data file into a genlight objectgl.read.PLINK
Imports presence/absence data from SilicoDArT to genlight {agegenet} format (ploidy=1)gl.read.silicodart
Converts a vcf file into a genlight objectgl.read.vcf
Assigns an individual metric as pop in a genlight {adegenet} objectgl.reassign.pop
Recalculates locus metrics when individuals or populations are deleted from a genlight {adegenet} object @family environmentgl.recalc.metrics
Recodes individual (=specimen = sample) labels in a genlight objectgl.recode.ind
Recodes population assignments in a genlight objectgl.recode.pop
Renames a population in a genlight objectgl.rename.pop
Reports summary of base pair frequenciesgl.report.bases
Basic statistics for a genlight objectgl.report.basics
Reports summary of Call Rate for loci or individualsgl.report.callrate
Calculates diversity indexes for SNPsgl.report.diversity
Reports factor loadings for a PCA or PCoAgl.report.factorloadings
Reports various statistics of genetic differentiation between populations with confident intervalsgl.report.fstat
Calculates the pairwise Hamming distance between DArT trimmed DNA sequencesgl.report.hamming
Reports observed, expected and unbiased heterozygosities and FIS (inbreeding coefficient) by population or by individual from SNP datagl.report.heterozygosity
Reports departure from Hardy-Weinberg proportionsgl.report.hwe
Calculates pairwise population based Linkage Disequilibrium across all loci using the specified number of cores @family matched reportgl.report.ld
Calculates pairwise linkage disequilibrium by populationgl.report.ld.map
Reports summary of the slot $other$loc.metricsgl.report.locmetric
Reports minor allele frequency (MAF) for each locus in a SNP datasetgl.report.maf
Reports monomorphic locigl.report.monomorphs
Reports loci for which the SNP has been trimmed from the sequence tag along with the adaptorgl.report.overshoot
Reports private alleles (and fixed alleles) per pair of populationsgl.report.pa
Reports summary of Read Depth for each locusgl.report.rdepth
Reports summary of RepAvg (repeatability averaged over both alleles for each locus) or reproducibility (repeatability of the scores for fragment presence/absence)gl.report.reproducibility
Reports loci containing secondary SNPs in sequence tags and calculates number of invariant sitesgl.report.secondaries
Reports summary of sequence tag length across locigl.report.taglength
Samples individuals from populationsgl.sample
Saves an object in compressed binary format for later rapid retrievalgl.save
Selects colors from one of several palettes and outputs as a vectorgl.select.colors
Selects shapes from the base R shape palette and outputs as a vectorgl.select.shapes
Sets the default verbosity levelgl.set.verbosity
Sets the default working directorygl.set.wd
Generates random crosses between fathers and mothersgl.sim.cross gl.sim.crosses
Generate random genotypesgl.sim.genotypes
Smear plotgl.smearplot
re-sorts genlight objectsgl.sort
Subsample individuals from a genlight objectgl.subsample.ind
Subsample loci from a genlight objectgl.subsample.loc
Tests the difference in heterozygosity between populations taken pairwisegl.test.heterozygosity
Outputs an nj tree to summarize genetic similarity among populationsgl.tree.nj
Writes out data from a genlight object to csv filegl.write.csv
Converts a genlight object into bayesAss (BA3) input formatgl2bayesAss
Converts a genlight object into a format suitable for input to Bayescangl2bayescan
Converts a genlight object into a format suitable for input to the BPP programgl2bpp
Creates a dataframe suitable for input to package {Demerelate} from a genlight {adegenet} objectgl2demerelate
Converts a genlight object into eigenstrat formatgl2eigenstrat
Concatenates DArT trimmed sequences and outputs a FASTA filegl2fasta
Converts a genlight object into faststructure format (to run faststructure elsewhere)gl2faststructure
Converts a genlight object into gds formatgl2gds
Converts a genlight object into a format suitable for input to genalexgl2genalex
Converts a genlight object into genepop format (and file)gl2genepop
Converts a genlight object to geno format from package LEAgl2geno
Converts a genind object into a genlight objectgi2gl gl2gi
Converts a genlight objects into hiphop formatgl2hiphop
Creates a Phylip input distance matrix from a genlight (SNP) {adegenet} objectgl2phylip
Converts a genlight object into PLINK formatgl2plink
Converts a genlight object to format suitable to be run with Coancestrygl2related
Converts genlight objects to the format used in the SNPassoc packagegl2sa
Converts a genlight object to nexus format suitable for phylogenetic analysis by SNAPP (via BEAUti) @family linkergl2snapp
Converts a genlight object to STRUCTURE formatted filesgl2structure
Converts a genlight object to nexus format PAUP SVDquartetsgl2svdquartets
Converts a genlight object to a treemix input filegl2treemix
Converts a genlight object into vcf formatgl2vcf
A simulated genlight object created to run a landscape genetic example This a test data set to run a landscape genetics example. It contains 10 populations of 30 individuals each and each individual has 300 loci. There are no covariates for individuals or loci.possums.gl
adjust rbind for dartRrbind.dartR
A genlight object created via the gl.read.dart function This is a test data set on turtles. 250 individuals, 255 loci in >30 populations.testset.gl
A genlight object created via the gl.read.silicodart function This is a test data set on turtles. 218 individuals, 255 loci in >30 populations.testset.gs
Default theme for dartR plotstheme_dartR
Calculates mean observed heterozygosity, mean expected heterozygosity and FIS per locus, per population and various population differentiation measures @family utilitiesutils.basic.stats
Utility function to check the class of an object passed to a functionutils.check.datatype
An internal function to converts DarT to genlight.utils.dart2genlight
Calculates a distance matrix for individuals defined in a dartR genlight object using binary P/A data (SilicoDArT)utils.dist.binary
Calculates a distance matrix for individuals defined in a genlight object using SNP data (DArTseq)utils.dist.ind.snp
A utility script to flag the start of a scriptutils.flag.start
Calculates the Hamming distance between two DArT trimmed DNA sequencesutils.hamming
An internal function that calculates expected mean heterozygosity per populationind.count utils.het.pop
An internal script [Custodian to provide a title]matrix2gen utils.impute
An internal function to tests if two populations are fixed at a given locusutils.is.fixed
An internal function to conducts jackknife resampling using a genlight objectutils.jackknife
An internal utility function to calculate the number of variant and invariant sites by locusutils.n.var.invariant
Runs PLINK from within Rutils.plink.run
An internal function to save a ggplot object to disk in RDS binary formatutils.plot.save
Utility to import DarT data to Rutils.read.dart
An internal script to read a fastA file into a genlight objectutils.read.fasta
An internal script [Custodian to provide a title]utils.read.ped
A utility function to recalculate intermediate locus metricsutils.recalc.avgpic
A utility script to recalculate the callrate by locus after some populations have been deletedutils.recalc.callrate
A utility script to recalculate the frequency of the heterozygous SNPs by locus after some populations have been deletedutils.recalc.freqhets
#' An internal utility function to recalculate the frequency of the homozygous reference SNP by locus after some populations have been deletedutils.recalc.freqhomref
A utility function to recalculate the frequency of the homozygous alternate SNP by locus after some populations have been deletedutils.recalc.freqhomsnp
A utility function to recalculate the minor allele frequency by locus, typically after some populations have been deletedutils.recalc.maf
#' An internal utility function to reset to FALSE (or TRUE) the locus metric flags after some individuals or populations have been deleted.utils.reset.flags
An internal utility function to transpose a genlight object.utils.transpose
Setting up the package Setting theme, colors and verbosityzzz