Analysing 'SNP' and 'Silicodart' Data - Basic Functions


[Up] [Top]

Documentation for package ‘dartR.base’ version 1.3.0

Help Pages

C G R T U Z misc

-- C --

cbind.dartR cbind for dartR objects

-- G --

gi2gl Converts a genind object into a genlight object
gl.add.indmetrics Adds metadata into a genlight object
gl.alf Calculates the frequency of the reference and alternate allele for each locus
gl.allele.freq Generates percentage allele frequencies by locus and population
gl.check.verbosity Returns the verbosity level a function should use
gl.check.wd Checks the global working directory
gl.colors Returns a list of colors for use in plots
gl.compliance.check Checks a genlight object to see if it complies with dartR expectations and amends it to comply if necessary @family environment
gl.define.pop Defines a new population in a genlight object for specified individuals
gl.diagnostics.hwe Provides descriptive stats and plots to diagnose potential problems with Hardy-Weinberg proportions
gl.dist.ind Calculates a distance matrix for individuals defined in a genlight object
gl.dist.phylo Generates a distance matrix from a SNP genlight object taking into account a substitution model
gl.dist.pop Calculates a distance matrix for populations with SNP or Silicodart genotypes in a genlight object
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 file and applies the changes to a genlight object @family data manipulation
gl.edit.recode.pop Creates or edits and applies a population re-assignment table
gl.fbm.cleanup Removes backing files of file-backed objects that are no longer used
gl.fbm2gen Converts a file-backed (FBM) genlight object to a gen-backed one
gl.fdsim Estimates the rate of false positives in a fixed difference analysis
gl.filter.allna Filters loci with all NA across individuals and/or individuals with all NA across loci
gl.filter.callrate Filters loci or specimens in a genlight {adegenet} object based on call rate
gl.filter.contamination Removes individuals flagged as cross-contaminated samples
gl.filter.excess.het Filters excessively-heterozygous loci from a genlight object [deprecated]
gl.filter.factorloadings Filters loci based on factor loadings for a PCA or PCoA
gl.filter.hamming Filters loci by trimmed-sequence similarity using Hamming distance
gl.filter.heterozygosity Filters individuals with average heterozygosity greater than a specified upper threshold or less than a specified lower threshold
gl.filter.hwe Filters loci that show significant departure from Hardy-Weinberg Equilibrium
gl.filter.ld Filters loci based on linkage disequilibrium (LD)
gl.filter.locmetric Filters loci on the basis of numeric information stored in other$loc.metrics in a genlight {adegenet} object
gl.filter.maf Filters loci on the basis of minor allele frequency (MAF) or minor allele count (MAC)
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 along with the adaptor
gl.filter.pa Filters loci that contain private (and fixed alleles) between two populations
gl.filter.rdepth Filters loci based on counts of sequence tags scored at a locus (read depth)
gl.filter.replicates Remove replicated individuals
gl.filter.replicates.KING Removes duplicate samples identified by KING-robust kinship
gl.filter.reproducibility Filters loci in a genlight {adegenet} object based on average repeatability of alleles at a locus
gl.filter.secondaries Filters loci that represent secondary SNPs in a genlight object
gl.filter.taglength Filters loci in a genlight {adegenet} object based on sequence tag length
gl.fixed.diff Generates a matrix of fixed differences and associated statistics for populations taken pairwise
gl.fst.pop Calculates pairwise Fst between populations in a genlight object
gl.gen2fbm Converts a gen-backed genlight object to a file-backed (FBM) one
gl.He Estimates expected heterozygosity for each locus
gl.Ho Estimates observed heterozygosity for each locus
gl.hwe.pop Performs Hardy-Weinberg tests over loci and populations
gl.impute Imputes missing data
gl.join Combines two dartR 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.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 (=specimen) names
gl.make.recode.pop Creates a proforma recode_pop_table file for reassigning population names
gl.map.interactive Creates an interactive map (based on latlon) from a genlight object
gl.merge.pop Merges two or more populations in a dartR genlight object into one population
gl.pcoa Ordination applied to genotypes in a genlight object (PCA), in an fd object, or to a distance matrix (PCoA)
gl.pcoa.plot Bivariate or trivariate plot of the results of an ordination generated using gl.pcoa()
gl.plot.heatmap Represents a distance matrix as a heatmap
gl.plot.snp.density Plot SNP density along chromosomes (heat-map)
gl.print.history Prints the history of a genlight object
gl.propShared Calculates a similarity matrix for individuals based on the proportion of shared alleles
gl.randomize.snps Randomly swaps the homozygote coding (0 and 2) in half of the loci
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 object
gl.read.fasta Reads FASTA files and converts them to genlight object
gl.read.PLINK Reads PLINK data file into a genlight object
gl.read.silicodart Imports presence/absence data from SilicoDArT to genlight {agegenet} format (ploidy=1)
gl.read.vcf Converts a vcf file into a genlight object
gl.reassign.ind Reassign specified individuals to a (new or existing) population
gl.reassign.pop Assigns an individual attribute in ind.metrics as pop in a genlight {adegenet} object
gl.recalc.metrics Recalculates locus metrics when individuals or populations are deleted from a genlight {adegenet} object
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.allelerich Reports allelic richness per population from a genlight object
gl.report.allna Reports loci with all NA across individuals and/or individuals with all NA across loci
gl.report.bases Reports summary of base pair frequencies
gl.report.basics Basic statistics for a genlight object
gl.report.callrate Reports summary of Call Rate for loci or individuals
gl.report.contamination Screens a genlight object for cross-contaminated samples
gl.report.diversity Calculates diversity indexes for SNPs
gl.report.excess.het Report loci with excess of heterozygosity [deprecated]
gl.report.factorloadings Reports factor loadings for a PCA or PCoA
gl.report.fstat Reports various statistics of genetic differentiation between populations with confidence intervals
gl.report.hamming Reports pairwise Hamming distances between trimmed sequence tags and the loci that gl.filter.hamming would remove
gl.report.heterozygosity Reports observed, expected and unbiased heterozygosities and FIS (inbreeding coefficient) by population or by individual from SNP data
gl.report.hwe Reports departure from Hardy-Weinberg proportions
gl.report.ld Calculates pairwise linkage disequilibrium across all loci, pooled over all individuals
gl.report.ld.map Calculates pairwise linkage disequilibrium by population
gl.report.locmetric Reports summary of the slot $other$loc.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 along with the adaptor
gl.report.pa Reports private alleles (and fixed alleles) per pair of populations
gl.report.polyploid_heterozygosity Reports observed, expected and unbiased heterozygosities and FIS (inbreeding coefficient) by population or by individual from polyploid (dosage) SNP data
gl.report.rdepth Reports summary of Read Depth for each locus
gl.report.replicates Identify replicated individuals
gl.report.replicates.KING Identifies duplicate samples by KING-robust kinship
gl.report.reproducibility Reports summary of RepAvg (repeatability averaged over both alleles for each locus) or reproducibility (repeatability of the scores for fragment presence/absence)
gl.report.secondaries Reports loci containing secondary SNPs in sequence tags and calculates number of invariant sites
gl.report.shannon Reports Shannon-based diversity profiles (Hill numbers) for individuals and populations
gl.report.taglength Reports summary of sequence tag length across loci
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 outputs 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.set.wd Sets the default working directory
gl.sim.crosses Generates crosses between fathers and mothers
gl.sim.genotypes Generate random genotypes
gl.smearplot Smear plot
gl.sort Sorts genlight objects by individual, population, or genomic position
gl.subsample.ind Subsample individuals from a genlight object
gl.subsample.loc Subsample loci from a genlight object
gl.subsample.loci Subsamples n loci from a genlight object [deprecated]
gl.test.heterozygosity Tests the difference in heterozygosity between populations taken pairwise
gl.tree.fitch Generates a Fitch-Margoliash distance phylogeny
gl.tree.nj Outputs a tree to summarize genetic similarity among populations (e.g. phenogram)
gl.write.csv Writes out data from a genlight object to csv file
gl2bayesAss Converts a genlight object into bayesAss (BA3) input format
gl2bayescan Converts a genlight object into a format suitable for input to Bayescan
gl2bpp Converts a genlight object into a format suitable for input to the BPP program
gl2demerelate Creates a dataframe suitable for input to package {Demerelate} from a genlight {adegenet} object
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 faststructure elsewhere)
gl2gapit Converts a genlight object into a format suitable for input to GAPIT
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
gl2hapmap Converts a genlight object into HapMap format
gl2hiphop Converts a genlight objects into hiphop format
gl2paup.parsimony Converts a genlight object to nexus format for parsimony phylogeny analysis in PAUP and, optionally produces accompanying files for parallel processing
gl2paup.svdquartets Converts a genlight object to nexus format PAUP SVDquartets
gl2phylip Creates a Phylip input distance matrix from a genlight (SNP) object
gl2plink Converts a genlight object into PLINK format
gl2related Converts a genlight object to format suitable to be run with Coancestry
gl2snapper Converts a genlight object to nexus format suitable for phylogenetic analysis by Snapper (via BEAUti)
gl2structure Converts a genlight object to STRUCTURE formatted files
gl2treemix Converts a genlight object to a treemix input file
gl2vcf Converts a genlight object into vcf format
glMean Frequency of the second allele per locus, for dartR and genlight objects
glSum Sum of the second allele per locus, for dartR and genlight objects

-- R --

rbind.dartR rbind for dartR objects

-- T --

theme_dartR Default theme for dartR plots

-- U --

utils.check.datatype Utility function to check the class of an object passed to a function
utils.dart2genlight An internal function to converts DarT to genlight.
utils.read.dart Utility to import DarT data to R
utils.read.fasta An internal script to read a fastA file into a genlight object
utils.vcf.depth Utility function to read locus depth, allele read counts and genotype likelihoods from a vcfR object
utils.vcfr2genlight.polyploid Utility function to convert polyploid vcfR object as genlight

-- Z --

zzz Setting up the package Setting theme, colors and verbosity

-- misc --

[-method indexing dartR objects correctly...