Learn R Programming

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



strataG

Description

strataG is a toolkit for haploid sequence and multilocus genetic data summaries, and analyses of population structure.

Installation

To install the stable version from CRAN:

install.packages('strataG')

To install the latest version from GitHub:

# make sure you have Rtools installed
if (!require('devtools')) install.packages('devtools')
# install from GitHub
devtools::install_github('ericarcher/strataG', build_vignettes = TRUE)

Vignettes

# To see the list of available vignettes
browseVignettes("strataG") 

# To open a specific vignette
vignette("gtypes")

Citation

The paper can be obtained here, and is cited as (preferred):

Archer, F. I., Adams, P. E. and Schneiders, B. B. (2016), strataG: An R package for manipulating, summarizing and analysing population genetic data. Mol Ecol Resour. doi:10.1111/1755-0998.12559

If desired, the current release version of the package can be cited as:

Archer, F. 2016. strataG: An R package for manipulating, summarizing and analysing population genetic data. R package version 1.0.6. Zenodo. http://doi.org/10.5281/zenodo.60416

Contact

version 2.0.2 (current on GitHub)

  • NOTE: In order to speed up indexing the data in large data sets, this version changes the underlying structure of the gtypes object by replacing the @loci data.frame slot with a @data data.table slot. The data.table has a id character column, a strata character column, and every column afterwards represents one locus. The @strata slot has been removed.
  • The loci accessor has been removed.
  • Added as.array which returns a 3-dimensional array with dimensions of [id, locus, allele].
  • The print (show) function for gtypes objects no longer shows a by-locus summary. The display was getting too slow for data sets with a large number of loci.
  • The summary function now includes by-sample results.
  • Fixed computational errors in population structure metrics due to incorrect sorting of stratification.
  • Added maf to return minimum allele frequency for each locus.
  • Added ldNe to calculate Ne.

version 1.0.6

  • Added read.arlequin back. Fixed missing function error with write.arlequin.
  • Added summarizeSamples
  • Changed evanno from base graphics to ggplot2
  • Updated logic in labelHaplotypes to assign haplotypes if possible alternative site combinations match a present haplotype
  • Added Zenodo DOI
  • Added shiny app (strataGUI) for creating gtypes objects, QA/QC, and population structure analyses
  • Added type argument to structurePlot to select between area and bar charts
  • Changed haplotypeLikelihoods to sequenceLikelihoods
  • neiDa now creates haplotypes before calculating metric
  • Fixed error in writePhase that was creating improper input files for PHASE

version 1.0.5

  • Fixed error in dupGenotypes, propSharedLoci, and propSharedIDs where missing genotypes were not being properly counted.
  • Added as.data.frame.gtypes.
  • Removed gtypes2df.
  • Added arguments to as.matrix.gtypes to include id and strata columns in output.
  • Removed the jmodeltest function as this functionality is available in the modeltest function in the phangorn package.
  • Added conversion functions gtypes2phyDat and phyDat2gtypes to facilitate interoperability with the phangorn package.
  • Removed read.arlequin.
  • Added alleleNames accessor for gtypes object, which returns list of allele names for each locus.

version 1.0

  • New version with different gtypes format from previous versions. See vignettes for instructions and examples.

Copy Link

Version

Install

install.packages('strataG')

Monthly Downloads

72

Version

2.0.2

License

GNU General Public License

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

April 11th, 2017

Functions in strataG (2.0.2)

as.data.frame.gtypes

Convert gtypes To data.frame
as.matrix,gtypes-method

Convert gtypes To matrix
alleleSplit

Split Alleles For Diploid Data
allelicRichness

Allelic Richness
dolph.haps

Dolphin mtDNA Haplotype Sequences
dolph.msats

Dolphin Microsatellite Genotypes
fixedDifferences

Fixed Differences
fixedSites

Fixed Sites
arlequin

Read and Write Arlequin Files
as.array.gtypes

Convert gtypes To array
clumpp

Run CLUMPP
createConsensus

Consensus Sequence
fastsimcoal

Run fastsimcoal
fastsimcoal.input

Input functions for fastsimcoal parameters
alleleFreqFormat

Compiles and Formats Allele Frequencies
alleleFreqs

Allele Frequencies
as.multidna

Convert to multidna
expandHaplotypes

Expand haplotypes
fasta

Read and Write FASTA
freq2GenData

Convert Haplotype Frequency Matrices
hweTest

Hardy-Weinberg Equilibrium
initialize,gtypes-method

gtypes Constructor
mega

Read and Write MEGA
bowhead.snp.position

Bowhead Whale SNP Genotype Groups
bowhead.snps

Bowhead Whale SNP Genotypes
dolph.seqs

Dolphin mtDNA D-loop Sequences
dolph.strata

Dolphin Genetic Stratification and Haplotypes
gtypes-class

gtypes Class
gtypes.accessors

gtypes Accessors
jackHWE

Hardy-Weinberg Equlibrium Jackknife
LDgenepop

Linkage Disequlibrium
TiTvRatio

Transition / Transversion Ratio
df2gtypes

Convert a data.frame to gtypes
dloop.g

Dolphin dLoop gtypes Object
labelHaplotypes

Find and label haplotypes
mafft

MAFFT Alignment
phase

PHASE
gtypes2genind

Convert Between gtypes And genind objects.
gtypes2loci

Convert Between gtypes And loci objects.
mRatio

M ratio
maf

Minimum Allele Frequencies
fusFs

Fu's Fs
mostRepresentativeSequences

Representative Sequences
msats.g

Dolphin Microsatellite gtypes Object
stratify

Stratify gtypes
maverickRun

Run MavericK
baseFreqs

Base Frequencies
dupGenotypes

Duplicate Genotypes
evanno

Run Evanno Method on STRUCTURE Results
popGenEqns

Population Genetics Equations
removeSequences

Remove Sequences
sequence2gtypes

Convert Sequences To gtypes
structure

STRUCTURE
gelato

GELATo - Group ExcLusion and Assignment Test
genepop

Run GENEPOP
is.gtypes

Test if object is gtypes
iupacCode

IUPAC Code
gtypes2phyDat

Convert Between gtypes And phyDat objects.
heterozygosity

Observed and Expected Heterozygosity
ldNe

ldNe
lowFreqSubs

Low Frequency Substitutions
numGenotyped

Number of Individuals Genotyped
numMissing

Number Missing Data
sequenceLikelihoods

Sequence Likelihoods
sharedLoci

Shared Loci
nucleotideDiversity

Nucleotide Diversity
numAlleles

Number of Alleles
popStructStat

Population structure statistics
popStructTest

Population Differentiation Tests
qaqc

Quality Assurance/Quality Control
mostDistantSequences

Most Distant Sequences
privateAlleles

Private Alleles
propUniqueAlleles

Proportion Unique Alleles
strataG-internal

Internal Functions
neiDa

Nei's Da
nucleotideDivergence

Nucleotide Divergence
numericSNPmat

Create a numeric SNP matrix
permuteStrata

Permute strata
show,gtypes-method

Show a gtypes object
strataG-package

Summaries and population structure analyses of DNA sequence genotypic data
summarizeSamples

Sample Summaries
summarizeSeqs

Sequence Summaries
write.gtypes

Write gtypes
write.nexus.snapp

Write NEXUS File for SNAPP
summary,gtypes-method

Summarize gtypes Object
tajimasD

Tajima's D
validIupacCodes

Valid IUPAC Codes
variableSites

Variable Sites
readGenData

Read Genetic Data
strataGUI

strataG GUI
strataSplit

Split Strata
simGammaHaps

Simulate Haplotypes
structurePlot

Plot STRUCTURE Results
summarizeLoci

Locus Summaries
theta

Theta
trimNs

Trim N's From Sequences