spgs-package: Statistical Patterns in Genomic Sequences


provides functions for exploring and testing statistical properties and patterns in DNA sequences.


Package: spgs
Type: Package
License: GPL (>= 2)

This package provides a range of statistical tests for various properties of DNA and/or other genomic sequences. There are eight groups of functions:

Testing for Chargaff's second parity rule in bacteria and other DNA sequences

chargaff0.test, chargaff1.test, chargaff2.test, chargaff.gibbs.test, oligoProfile

Testing for purine-pyrimidine parity in viruses and other DNA sequences

ag.test, agct.test

Testing for Bernoulli/Markov processes

markov.test, diid.test

Independence tests

diffsign.test, turningpoint.test, rank.test, lb.test

Tests for uniform distribution

ks.unif.test, chisq.unif.test

Simulation of random vectors, stochastic matrices, Bernoulli processes and Markov chains

simulateMarkovChain, estimateMarkovChain, rstochvec, rstochmat, rcspr2mat

Functions for obtaining the complement or reverse complement of a DNA sequence

complement, reverseComplement

Functions for counting words/k-mers and cylinders in symbolic sequences

pair.counts, triple.counts, quadruple.counts, cylinder.counts

The word/k-mer counting functions are general and can deal with arbitrary symbolic sequences, not only DNA sequences.

Functions which take a DNA sequence as input are able to work with sequences stored as SeqFastadna objects generated by the seqinr package.


Andrew Hart and Servet Mart<ed>nez

Maintainer: Andrew Hart <ahart@dim.uchile.cl>


Hart, A.G. and Mart<ed>nez, S. (2011) Statistical testing of Chargaff's second parity rule in bacterial genome sequences. Stoch. Models 27(2), 1–46.

Hart, A.G. and Mart<ed>nez, S. (2014) Markovianness and Conditional Independence in Annotated Bacterial DNA. Stat. Appl. Genet. Mol. Biol. 13(6), 693-716. arXiv:1311.4411 [q-bio.QM].

Hart, A.G. and Mart<ed>nez, S. (2012) A Gibbs approach to Chargaff's second parity rule. J. Stat. Phys. 146(2), 408-422. arXiv:1105.0685 [math.pr].

See Also


Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.