Man pages for dartR.base
Analysing 'SNP' and 'Silicodart' Data - Basic Functions

cbind.dartRcbind for dartR objects
gi2glConverts a genind object into a genlight object
gl2bayesAssConverts a genlight object into bayesAss (BA3) input format
gl2bayescanConverts a genlight object into a format suitable for input...
gl2bppConverts a genlight object into a format suitable for input...
gl2demerelateCreates a dataframe suitable for input to package...
gl2eigenstratConverts a genlight object into eigenstrat format
gl2fastaConcatenates DArT trimmed sequences and outputs a FASTA file
gl2faststructureConverts a genlight object into faststructure format (to run...
gl2gapitConverts a genlight object into a format suitable for input...
gl2gdsConverts a genlight object into gds format
gl2genalexConverts a genlight object into a format suitable for input...
gl2genepopConverts a genlight object into genepop format (and file)
gl2genoConverts a genlight object to geno format from package LEA
gl2giConverts a genlight object to genind object
gl2hapmapConverts a genlight object into HapMap format
gl2hiphopConverts a genlight objects into hiphop format
gl2paup.parsimonyConverts a genlight object to nexus format for parsimony...
gl2paup.svdquartetsConverts a genlight object to nexus format PAUP SVDquartets
gl2phylipCreates a Phylip input distance matrix from a genlight (SNP)...
gl2plinkConverts a genlight object into PLINK format
gl2relatedConverts a genlight object to format suitable to be run with...
gl2snapperConverts a genlight object to nexus format suitable for...
gl2structureConverts a genlight object to STRUCTURE formatted files
gl2treemixConverts a genlight object to a treemix input file
gl2vcfConverts a genlight object into vcf format
gl.add.indmetricsAdds metadata into a genlight object
gl.alfCalculates the frequency of the reference and alternate...
gl.allele.freqGenerates percentage allele frequencies by locus and...
gl.check.verbosityReturns the verbosity level a function should use
gl.check.wdChecks the global working directory
gl.colorsReturns a list of colors for use in plots
gl.compliance.checkChecks a genlight object to see if it complies with dartR...
gl.define.popDefines a new population in a genlight object for specified...
gl.diagnostics.hweProvides descriptive stats and plots to diagnose potential...
gl.dist.indCalculates a distance matrix for individuals defined in a...
gl.dist.phyloGenerates a distance matrix from a SNP genlight object taking...
gl.dist.popCalculates a distance matrix for populations with SNP or...
gl.drop.indRemoves specified individuals from a dartR genlight object
gl.drop.locRemoves specified loci from a dartR genlight object
gl.drop.popRemoves specified populations from a dartR genlight object
gl.edit.recode.indCreates or edits individual (=specimen) names, creates a...
gl.edit.recode.popCreates or edits and applies a population re-assignment table
gl.fbm2genConverts a file-backed (FBM) genlight object to a gen-backed...
gl.fbm.cleanupRemoves backing files of file-backed objects that are no...
gl.fdsimEstimates the rate of false positives in a fixed difference...
gl.filter.allnaFilters loci with all NA across individuals and/or...
gl.filter.callrateFilters loci or specimens in a genlight {adegenet} object...
gl.filter.contaminationRemoves individuals flagged as cross-contaminated samples
gl.filter.excess.hetFilters excessively-heterozygous loci from a genlight object...
gl.filter.factorloadingsFilters loci based on factor loadings for a PCA or PCoA
gl.filter.hammingFilters loci by trimmed-sequence similarity using Hamming...
gl.filter.heterozygosityFilters individuals with average heterozygosity greater than...
gl.filter.hweFilters loci that show significant departure from...
gl.filter.ldFilters loci based on linkage disequilibrium (LD)
gl.filter.locmetricFilters loci on the basis of numeric information stored in...
gl.filter.mafFilters loci on the basis of minor allele frequency (MAF) or...
gl.filter.monomorphsFilters monomorphic loci, including those with all NAs
gl.filter.overshootFilters loci for which the SNP has been trimmed from the...
gl.filter.paFilters loci that contain private (and fixed alleles) between...
gl.filter.rdepthFilters loci based on counts of sequence tags scored at a...
gl.filter.replicatesRemove replicated individuals
gl.filter.replicates.KINGRemoves duplicate samples identified by KING-robust kinship
gl.filter.reproducibilityFilters loci in a genlight {adegenet} object based on average...
gl.filter.secondariesFilters loci that represent secondary SNPs in a genlight...
gl.filter.taglengthFilters loci in a genlight {adegenet} object based on...
gl.fixed.diffGenerates a matrix of fixed differences and associated...
gl.fst.popCalculates pairwise Fst between populations in a genlight...
gl.gen2fbmConverts a gen-backed genlight object to a file-backed (FBM)...
gl.HeEstimates expected heterozygosity for each locus
gl.HoEstimates observed heterozygosity for each locus
gl.hwe.popPerforms Hardy-Weinberg tests over loci and populations
gl.imputeImputes missing data
gl.joinCombines two dartR genlight objects
gl.keep.indRemoves all but the specified individuals from a dartR...
gl.keep.locRemoves all but the specified loci from a genlight object
gl.keep.popRemoves all but the specified populations from a dartR...
gl.loadLoads an object from compressed binary format produced by...
gl.make.recode.indCreates a proforma recode_ind file for reassigning individual...
gl.make.recode.popCreates a proforma recode_pop_table file for reassigning...
gl.map.interactiveCreates an interactive map (based on latlon) from a genlight...
glMeanFrequency of the second allele per locus, for dartR and...
gl.merge.popMerges two or more populations in a dartR genlight object...
gl.pcoaOrdination applied to genotypes in a genlight object (PCA),...
gl.pcoa.plotBivariate or trivariate plot of the results of an ordination...
gl.plot.heatmapRepresents a distance matrix as a heatmap
gl.plot.snp.densityPlot SNP density along chromosomes (heat-map)
gl.print.historyPrints the history of a genlight object
gl.propSharedCalculates a similarity matrix for individuals based on the...
gl.randomize.snpsRandomly swaps the homozygote coding (0 and 2) in half of the...
gl.read.csvReads SNP data from a csv file into a genlight object
gl.read.dartImports DArT data into dartR and converts it into a dartR...
gl.read.fastaReads FASTA files and converts them to genlight object
gl.read.PLINKReads PLINK data file into a genlight object
gl.read.silicodartImports presence/absence data from SilicoDArT to genlight...
gl.read.vcfConverts a vcf file into a genlight object
gl.reassign.indReassign specified individuals to a (new or existing)...
gl.reassign.popAssigns an individual attribute in ind.metrics as pop in a...
gl.recalc.metricsRecalculates locus metrics when individuals or populations...
gl.recode.indRecodes individual (=specimen = sample) labels in a genlight...
gl.recode.popRecodes population assignments in a genlight object
gl.rename.popRenames a population in a genlight object
gl.report.allelerichReports allelic richness per population from a genlight...
gl.report.allnaReports loci with all NA across individuals and/or...
gl.report.basesReports summary of base pair frequencies
gl.report.basicsBasic statistics for a genlight object
gl.report.callrateReports summary of Call Rate for loci or individuals
gl.report.contaminationScreens a genlight object for cross-contaminated samples
gl.report.diversityCalculates diversity indexes for SNPs
gl.report.excess.hetReport loci with excess of heterozygosity [deprecated]
gl.report.factorloadingsReports factor loadings for a PCA or PCoA
gl.report.fstatReports various statistics of genetic differentiation between...
gl.report.hammingReports pairwise Hamming distances between trimmed sequence...
gl.report.heterozygosityReports observed, expected and unbiased heterozygosities and...
gl.report.hweReports departure from Hardy-Weinberg proportions
gl.report.ldCalculates pairwise linkage disequilibrium across all loci,...
gl.report.ld.mapCalculates pairwise linkage disequilibrium by population
gl.report.locmetricReports summary of the slot $other$loc.metrics
gl.report.mafReports minor allele frequency (MAF) for each locus in a SNP...
gl.report.monomorphsReports monomorphic loci
gl.report.overshootReports loci for which the SNP has been trimmed from the...
gl.report.paReports private alleles (and fixed alleles) per pair of...
gl.report.polyploid_heterozygosityReports observed, expected and unbiased heterozygosities and...
gl.report.rdepthReports summary of Read Depth for each locus
gl.report.replicatesIdentify replicated individuals
gl.report.replicates.KINGIdentifies duplicate samples by KING-robust kinship
gl.report.reproducibilityReports summary of RepAvg (repeatability averaged over both...
gl.report.secondariesReports loci containing secondary SNPs in sequence tags and...
gl.report.shannonReports Shannon-based diversity profiles (Hill numbers) for...
gl.report.taglengthReports summary of sequence tag length across loci
gl.sampleSamples individuals from populations
gl.saveSaves an object in compressed binary format for later rapid...
gl.select.colorsSelects colors from one of several palettes and outputs as a...
gl.select.shapesSelects shapes from the base R shape palette and outputs as a...
gl.set.verbositySets the default verbosity level
gl.set.wdSets the default working directory
gl.sim.crossesGenerates crosses between fathers and mothers
gl.sim.genotypesGenerate random genotypes
gl.smearplotSmear plot
gl.sortSorts genlight objects by individual, population, or genomic...
gl.subsample.indSubsample individuals from a genlight object
gl.subsample.locSubsample loci from a genlight object
gl.subsample.lociSubsamples n loci from a genlight object [deprecated]
glSumSum of the second allele per locus, for dartR and genlight...
gl.test.heterozygosityTests the difference in heterozygosity between populations...
gl.tree.fitchGenerates a Fitch-Margoliash distance phylogeny
gl.tree.njOutputs a tree to summarize genetic similarity among...
gl.write.csvWrites out data from a genlight object to csv file
rbind.dartRrbind for dartR objects
sub-dartR-ANY-ANY-ANY-methodindexing dartR objects correctly...
theme_dartRDefault theme for dartR plots
utils.allelic.richnessA utility script to calculate allelic richness using...
utils.basic.statsCalculates mean observed heterozygosity, mean expected...
utils.check.datatypeUtility function to check the class of an object passed to a...
utils.collapse.matrixCollapses a distance matrix calculated for individuals to a...
utils.dart2genlightAn internal function to converts DarT to genlight.
utils.dist.binaryCalculates a distance matrix for individuals defined in a...
utils.dist.ind.snpCalculates a distance matrix for individuals defined in a...
utils.fbm.amatAdditive relationship matrix by rrBLUP::A.mat for gen- and...
utils.fbm.blocksBlocks of loci for reading a dartR object
utils.fbm.colblocksApplies a function to blocks of loci and returns the...
utils.fbm.colwiseApplies a per-locus statistic in blocks of loci
utils.fbm.copyCopies (part of) an FBM.code256 into a temporary backing file
utils.fbm.count.meanMeans of counts, formed exactly as rowMeans() forms them
utils.fbm.decodeDecodes the whole genotype matrix, with a memory guard for...
utils.fbm.grmAdditive relationship matrix of a file-backed object, as...
utils.fbm.hasTests whether a dartR object holds its genotypes in a...
utils.fbm.newCreates an FBM.code256 for genotypes in a temporary backing...
utils.fbm.pair.countsPairwise genotype comparisons of all individuals of a...
utils.fbm.readerReader of parts of the decoded genotype matrix
utils.fbm.rowwiseAdds a per-individual sum over loci in blocks of loci
utils.fbm.tempfileFile stem for a new temporary FBM backing file
utils.flag.startA utility script to flag the start of a script
utils.hamming.engineCompiled Hamming comparison engine shared by...
utils.hamming.prepareValidates arguments and prepares trimmed sequences for...
utils.heatmapEnhanced Heat Map
utils.het.popAn internal function that calculates expected mean...
utils.history.callCompacts a call before it is stored in the history of an...
utils.is.fixedAn internal function to test if two populations are fixed at...
utils.jackknifeAn internal function to conduct jackknife resampling using a...
utils.n.var.invariantAn internal utility function to calculate the number of...
utils.ped2plinkReads a PLINK .ped fileset with PLINK allele orientation
utils.plink.runRuns PLINK from within R
utils.plot.saveAn internal function to save a ggplot object to disk in RDS...
utils.read.dartUtility to import DarT data to R
utils.read.fastaAn internal script to read a fastA file into a genlight...
utils.read.pedReads a PLINK .ped file into a SnpMatrix with family and map...
utils.recalc.avgpicA utility function to recalculate intermediate locus metrics
utils.recalc.callrateA utility script to recalculate the callrate by locus after...
utils.recalc.freqhetsA utility script to recalculate the frequency of the...
utils.recalc.freqhomrefAn internal utility function to recalculate the frequency of...
utils.recalc.freqhomsnpA utility function to recalculate the frequency of the...
utils.recalc.mafA utility function to recalculate the minor allele frequency...
utils.reset.flagsAn internal utility function to reset to FALSE (or TRUE) the...
utils.transposeAn internal utility function to transpose a genlight object.
utils.vcf.depthUtility function to read locus depth, allele read counts and...
utils.vcfr2genlight.polyploidUtility function to convert polyploid vcfR object as genlight
zzzSetting up the package Setting theme, colors and verbosity
dartR.base documentation built on Nov. 18, 2026, 9:06 a.m.