<CRANTaskView>

  <name>Genetics</name>
  <topic>Statistical Genetics</topic>
  <maintainer email="g.montana@imperial.ac.uk">Giovanni Montana</maintainer>
  <version>2015-05-29</version>
  <info>
      <p>
        Great advances have been made in the field of genetic analysis over the last years. The availability of millions
        of single nucleotide polymorphisms (SNPs) in widely available databases, coupled with major advances in SNP genotyping
        technology that reduce costs and increase throughput, are enabling a host of studies aimed at elucidating the genetic basis
        of complex disease. The focus in this task view is on R packages implementing statistical methods and algorithms for the
        analysis of genetic data and for related population genetics studies.
      </p>
      <p>
        A number of R packages are already available and many more are most likely to be developed in the near future.
        Please send your comments and suggestions to the task view maintainer.
      </p>
      <ul>
        <li>
          <i>
            Population Genetics
          </i>:
<pkg>genetics</pkg>
          implements classes and methods for representing genotype and haplotype data, and has several
          functions for population genetic analysis (e.g. functions for estimation and testing of 
          Hardy-Weinberg and linkage disequilibria, etc.).
<pkg>Geneland</pkg>
          has functions for detecting spatial structures from genetic data
          within a Bayesian framework via MCMC estimation.
<pkg>rmetasim</pkg>
          provides an interface to the metasim engine
      for population genetics simulations.
          A few population genetics functions are also implemeted in
<pkg>gap</pkg>.
<pkg>LDheatmap</pkg>
          creates a heat map plot of measures of pairwise LD.
<pkg>hwde</pkg>
          fits models for genotypic disequilibria.  Whilst
<pkg>HardyWeinberg</pkg>
          provides graphical representation of disequilibria via ternary plots (also known as de Finetti diagrams).
<pkg>Biodem</pkg>
          package provides functions for Biodemographical analysis, e.g.
          <code>
            Fst()
          </code>
          calculates the Fst from the conditional kinship matrix. The
<pkg>adegenet</pkg> package implements a number of different methods for analysing population structure using multivariate
          statistics, graphics and spatial statistics.
The <pkg>hierfstat</pkg> package allows the estimation of hierarchical F-statistics from haploid or diploid genetic data with any numbers of levels in the hierarchy. 
        </li>

        <li>
          <i>
            Phylogenetics
          </i>:
	  The <view>Phylogenetics</view> view has more detailed information,
	  the most important packages are also mentioned here.	  
          Phylogenetic and evolution analyses can be performed via
<pkg>ape</pkg>. Package
<pkg>ouch</pkg>
          provides Ornstein-Uhlenbeck models for phylogenetic comparative hypotheses.
<pkg>stepwise</pkg>
          implements a method for stepwise detection of recombination breakpoints in
          sequence alignments.
<pkg>phangorn</pkg>
          estimates phylogenetic trees and networks using maximum likelihood, maximum parsimony, distance
          methods and Hadamard conjugation.
        </li>
        <li>
          <i>
            Linkage
          </i>:
          There are few native packages for performing parametric or non-parametric linkage analysis 
          from within R itself, the calculations must be performed using external packages.  However,
          there are a number of ancillary R packages that facilitate interface with these stand-alone
          programs and using the results for further analysis and presentation.
<pkg>ibdreg</pkg>
          uses Identity By Descent (IBD) Non-Parametric Linkage (NPL) statistics for related pairs calculated
          externally to test for genetic linkage with covariates by regression modelling. 
<pkg>multic</pkg>
          also utilises IBD sharing statistics calculated externally for detecting quantitative trait loci
          under polygenic and major gene models via variance components. Whilst not 
          official R packages one software suite in particular is worthy of mention.
<a href="http://pngu.mgh.harvard.edu/~purcell/plink/">
  PLINK
</a>
          is a C++ program for genome wide linkage analysis that supports R-based plug-ins via Rserve allowing
          users to utilise the rich suite of statistical functions in R for analysis.

        </li>
        <li>
          <i>
            QTL mapping
          </i>:
          Packages in this category develop methods for the analysis of experimental crosses
          to identify markers contributing to variation in quantitative traits.
<pkg>bqtl</pkg>
          implement both likelihood-based and Bayesian methods for inbred crosses and recombinant inbred
          lines.
<pkg>qtl</pkg>
          provides several functions and a data structure for QTL mapping, including a function
          <code>
            scanone()
          </code>
          for genome-wide scans.
<pkg>wgaim</pkg>
          builds on the <pkg>qtl</pkg> by including functions for the modelling and summary of QTL intervals from the
          full linkage map whilst
<pkg>dlmap</pkg>
          can be used to perform QTL mapping in a mixed model framework with separate detection and localization stages.
        </li>
        <li>
          <i>
            Association
          </i>: 
          Packages in this category provide statistical methods to test associations between individual genetic markers 
          and a phenotype.
<pkg>gap</pkg>
          is a package for genetic data analysis of both population and family data; it contains functions for sample 
          size calculations, probability of familial disease aggregation, kinship calculation, and some tests for linkage
          and association analyses. Among the other functions,
          <code>
            genecounting()
          </code>
          estimates haplotype frequencies from genotype data, and
          <code>
            gcontrol()
          </code>
          implements a Bayesian genomic control statistics for association studies. For family data,
<pkg>tdthap</pkg>
          offers an implementation of the Transmission/Disequilibrium Test (TDT) for extended marker haplotypes.
        </li>
        <li>
          <i>
            Linkage Disequilibrium and haplotype mapping
          </i>:
          A number of packages provide haplotype estimation for unrelated individuals with amnbiguous haplotypes 
          (due to unkown linkage phase) and allow testing for associations between the estimated haplotypes and
          phenotypes (including co-variates) under a GLM framework.
<pkg>hapassoc</pkg>
          performs likelihood inference of trait associations with haplotypes in GLMs.
<pkg>haplo.stats</pkg>
          also contains tests for haplotype associations under a GLM framework, but also provides score tests of
          association as well as providing novel functionality for building haplotypes in a sequential manner, 
          power and sample-size calculations and the preparation of data matrices for use in other methods.
<pkg>haplo.ccs</pkg>
          utilises the haplotype estimation of <pkg>haplo.stats</pkg> and performs case-control association tests
          via weighted logistic regression.
<pkg>tdthap</pkg>
          implements transmission/disequilibrium tests for extended marker haplotypes.
<pkg>LDheatmap</pkg>
          creates a heat map plot of measures of pairwise LD.
        </li>
        <li>
          <i>
            Genome-Wide Association Studies (GWAS)
          </i>:
          With recent technical advances in high-throughput genotyping technologies the possibility of performing 
          Genome-Wide Association Studies is now a feasible strategy.  A number of packages are available to facilitate
          the analysis of these large data sets.
<pkg>GenABEL</pkg> 
          is designed for the efficent storage and handling of GWAS data with fast analysis tools for quality control,
          association with binary and quantitative traits, as well as tools for visualizing results.
<pkg>pbatR</pkg>
          provides a GUI to the powerful PBAT software which performs family and population based family and 
          population based studies.  The software has been implemented to take advantage of parallel processing, which
          vastly reduces the computational time required for GWAS.
<!-- <pkg>SNPassoc</pkg>
          is another package for carrying out GWAS analysis.  It provides descriptive statistics of the data 
          (inlcuding patterns of missing data) and tests for Hardy-Weinberg equilibrium.  Single-point analyses with binary 
          or quantitative traits are implemented via generalized linear models, and multiple SNPs can be anlaysed for 
          haplotypic associations or epistasis. -->
<a href="http://www.bioconductor.org/packages/2.8/bioc/html/snpMatrix.html">snpMatrix</a>
	  Implements classes and methods for large-scale SNP association studies.
        </li>        
        <li>
          <i>
            Multiple testing
          </i>:
          The package
<bioc>qvalue</bioc> on Bioconductor
          implements False Discovery Rate; the main function
          <code>
            qvalue()
          </code>
          estimates the q-values from a list of p-values.
          Package
<bioc>multtest</bioc> on Bioconductor
          also offers several non-parametric bootstrap and permutation resampling-based multiple testing procedures.
        </li>
        <li>
          <i>
            Importing Sequence Data
          </i>:
          There are utilities in the
<pkg>seqinr</pkg>
          package to import sequence data from various sources, including files of aligned sequences in mase, clustal,
          phylip, fasta and msf format which will be of utility to some population genetic analysis.  Users interested in
          using R for sequence data and bioinformatics are also referred to the
          <a href="http://www.bioconductor.org/">
            BioConductor
          </a>
          project.
        </li>
      </ul>
  </info>

  <packagelist>
    <pkg>adegenet</pkg>
    <pkg>ape</pkg>
    <pkg>Biodem</pkg>
    <pkg>bqtl</pkg>
    <pkg>dlmap</pkg>
    <pkg priority="core">gap</pkg>
    <pkg>GenABEL</pkg>
    <pkg>Geneland</pkg>
    <pkg priority="core">genetics</pkg>
    <pkg>hapassoc</pkg>
    <pkg>haplo.ccs</pkg>
    <pkg>HardyWeinberg</pkg>
    <pkg priority="core">haplo.stats</pkg>
    <pkg>hierfstat</pkg>
    <pkg>hwde</pkg>
    <pkg>ibdreg</pkg>
    <pkg>LDheatmap</pkg>
    <pkg>luca</pkg>
    <pkg>multic</pkg>
    <pkg>ouch</pkg>
    <pkg>pbatR</pkg>
    <pkg>phangorn</pkg>
    <pkg>qtl</pkg>
    <pkg>rmetasim</pkg>
    <pkg>seqinr</pkg>
    <pkg>SNPmaxsel</pkg>
    <pkg>snp.plotter</pkg>
    <pkg>stepwise</pkg>
    <pkg>tdthap</pkg>
    <pkg>untb</pkg>
    <pkg>wgaim</pkg>
  </packagelist>

  <links>
    <view>Phylogenetics</view>
    <a href="http://www.bioconductor.org/">
      Bioconductor
    </a> 
    <bioc>multtest</bioc>
    <bioc>qvalue</bioc>
    <a href="http://www.bioconductor.org/packages/2.8/bioc/html/snpMatrix.html">Bioconductor package snpMatrix (2.8)</a>
    <a href="http://www.mayo.edu/research/departments-divisions/department-health-sciences-research/division-biomedical-statistics-informatics/software/s-plus-r-functions">
     R packages from Divison of Biostatistics, Mayo Clinic
    </a> 
    <a href="http://watson.hgen.pitt.edu/register/">
      QTL-ALL :  provides interfaces between Merlin and/or Simwalk2 and plotting of results in R.
    </a> 
    <a href="http://legacy.mrc-epid.cam.ac.uk/~jinghua.zhao/software.htm">
      Computer programs by Jing Hua Zhao (some are included in the gap package)
    </a>
    <a href="http://www-gene.cimr.cam.ac.uk/clayton/software/">
      R Software by David Clayton
    </a>
    <a href="http://www.qimr.edu.au/davidD/#R">
      R Software by David Duffy
    </a>
    <a href="http://bcb.dfci.harvard.edu/bayesmendel/">
      BayesMendel
    </a>
    <a href="http://linkage.rockefeller.edu/yyang/resources.html">
      R code for estimating haplotype frequencies from pooled DNA samples
    </a>
    <a href="http://linkage.rockefeller.edu/soft/">
      An alphabetic list of genetic analysis software
    </a>
    <a href="http://wpicr.wpic.pitt.edu/WPICCompGen/hclust/hclust.htm">
      Hclust.R, software for Choosing Tag SNPs
    </a>
    <a href="http://wpicr.wpic.pitt.edu/WPICCompGen/bars.htm">
      Bayesian Adaptive Regression Splines (BARS)
    </a>
    <a href="http://www.stat.auckland.ac.nz/~yee/VGAM/">
      Vector Generalized Linear and Additive Models (VGLMs/VGAMs)
    </a>
    <a href="http://pbil.univ-lyon1.fr/software/mareymap/">
      MareyMap GUI for comparing physical and genetic maps.
    </a>
    <a href="http://csg.sph.umich.edu/boehnke/p_act.php">
      p_ACT adjustments for multiple testing
    </a> 
    <a href="http://watson.hgen.pitt.edu/register">
      SNPCaller family-based genotype calling methods.
    </a>
  </links>

</CRANTaskView>
