NEWS
pegas 1.3 (2023-12-13)
NEW FEATURES
- plot.haploNet() has a new argument 'col.lab' to change the
colors of the haplotype labels. It can be changed through the
option "labels.color" (see ?setHaploNetOptions).
- The R code of mst() has been replaced by a C code which can be
1000 times faster with several 100s observations (this improves
also rmst() and all other functions calling mst()). The code now
scales very nearly as O(n^2) in practice.
- rmst() now returns a network with a "backbone-MST" so that
repeated analyses of the same data are likely to return
graphically similar networks (see issue #82 on GitHub).
BUG FIXES
- tajima.test() may use different sets of sites when computing the
number of segregating sites and the mean pairwise distance. This
has been fixed by adding pairwise.deletion = TRUE to the call to
dist.dna (see issue #77 on GitHub).
- The placement of mutation ticks on alternative links of
haplotype networks has been fixed (see issue #77 on GitHub).
pegas 1.2 (2023-02-23)
NEW FEATURES
- The new function nullAlleles2NA changes genotypes with at least
one ‘null allele’ into NA.
- MMD() now returns invisibly a list with the plotted data (i.e.,
histogram, empirical density, and expected curve under stable
population).
- dist.asd() has now the option 'pairwise.deletion = FALSE'.
BUG FIXES
- The estimator variance in theta.s() has been corrected (thanks
to Carsten Wiuf) and the help page has been updated.
- plot.haploNet() did not handle correctly the 'bg' argument when
it is a vector of colours. This also affected the plot of MJN
networks.
- VCF files with DOS-style end of lines (i.e., CRLF) are now
supported.
- Argument 'bg' was not always well interpreted in plot.haploNet()
and plot.mjn().
OTHER CHANGES
- There is a new (non-interactive) example in ?replot.
- The help page of plot.mjn() has been clarified about the usage
of the arguments 'shape' and 'bg'.
pegas 1.1 (2021-12-16)
BUG FIXES
- plot.haploNet() did not use 'bg' correctly when 'pie' was
used. The help page has been clarified that this argument could
also be a function.
- setHaploNetOptions(pie.colors.function = ) did not work
correcly; similarly for 'pie.inner.segments.color'.
- The argument 'scale.ratio' was not always passed correctly among
internal functions when plotting "haploNet" objects (see issue
#59 on GH).
- haplotype.character() failed to work correctly (see issue #61).
OTHER CHANGES
- amova() now accepts distance objects which inherit the class
"dist" (instead of being strictly equal).
- adegenet has been moved from 'Imports' to 'Suggests'.
pegas 1.0 (2021-04-08)
NEW FEATURES
- The new function mutations() draws mutations on a network (with
many options; see ?mutations).
- The new function write.vcf writes an object of class "loci" into
a VCF file.
- There is a new cophenetic() method for objects of class
"haploNet", and a new labels() method.
- diffHaplo() has been simplified and gains the options 'strict'
and 'trailingGapsAsN' which are passed to ape::seg.sites().
- mjn() has a new option 'quiet = FALSE'; its code has been
improved and is now 10 times faster (25 times with 100 sequences
resulting in running times less than 15 sec). The returned
object have the class c("mjn", "haploNet") and there is a new
plot.mjn() method.
- replot() has been improved: the instructions are more detailed,
there is a new option 'col.identifier' to show the node to be
moved, and the bounding box of the plot is now calculated
correctly so the network does not "shrink" after each move.
- plot.haploNet() has two new options: 'shape' and 'xy' to change
the symbol shapes and their coordinates, respectively.
- There are two new functions, getHaploNetOptions and
setHaploNetOptions, to help users change the graphical
paramaters when plotting haplotype networks.
- There is a new as.loci() method for matrices.
- rmst() implements a new algorithm to stop iterations after no
new links are found: this is controlled by the new options
'stop.criterion' and 'iter.lim'. There is also a new option
'quiet = FALSE'.
- Fst() now runs in the case of a single population, returning the
Fis (and Fit which equates 1).
- There is a new vignette "PlotHaploNet" detailing some aspects of
plotting haplotype networks with pegas, including the new
features and options.
BUG FIXES
- A bug was fixed in geoTrans2().
- as.loci.data.frame() now works with "tibble" objects (thanks to
Jean-Baka Domelevo Entfellner for the fix).
- allelicrichness(, method = "rarefaction") used to return the raw
allelic richness: this is fixed and this function gains the
option 'min.n' to work with this method (common sample size used
for all populations).
- haplotype() on an empty "DNAbin" object returns an empty
"haplotype" object similarly to pegas 0.12 (see issue #53 on GH).
OTHER CHANGES
- adegenet has been moved from 'Depends' to 'Imports'.
- dist.snp() has been removed.
pegas 0.14 (2020-09-16)
NEW FEATURES
- LDscan() gains the option 'what' with two possible choices: "r"
(the default and previously only choice) and "Dprime".
BUG FIXES
- haplotype.DNAbin() failed to assign correctly haplotypes in some
situations with ambiguous bases. This is fixed and the code,
which now relies on ape::seg.sites, is now 2 to 3 times faster
if there are a few haplotypes in the data.
OTHER CHANGES
- In VCFloci(), the option 'chunck.size' has been renamed
'chunk.size'.
pegas 0.13 (2020-03-10)
NEW FEATURES
- haplotype.DNA() now handles ambiguities and gaps in an improved
way (see the reference in ?haplotype.DNA). Two options have been
added to control the behaviour of these analyses: strict = FALSE
and trailingGapsAsN = TRUE.
- The new functions geoTrans2 transforms latitudes and longitudes
from values in decimal degree to character strings (optionally
with LaTeX format).
BUG FIXES
- VCFloci() crashed if a path starting with "~" was used.
- VCF files with large header (> 1 MB) failed to be read.
pegas 0.12 (2019-10-05)
NEW FEATURES
- The new functions F2, F3, and F4 implement the F-statistics
developed by Patterson et al. (2012, Genetics, 192:1065).
- The new function stairway implements the method from Polanski
and Kimmel (2003, Genetics, 165:427) quantifying changes in
population size from the site frequency spectrum (SFS). There are
plot() and lines() method.
- The new function loci2alleles does the reverse operation than
alleles2loci().
- The new function theta.tree.hetero estimates THETA from a
non-ultrametric coalescent tree.
- The new function Rst computes the R_ST index for microsatellites.
- The new function loci2SnpMatrix converts SNPs from a "loci"
object into the S4 class "SnpMatrix" of the BioConductor package
snpStats.
- The three new functions allelicrichness, rarefactionplot, and
rhost analyse allelic richness with various methods.
- There is a new default method sw() which can use genomic
positions. sw() now returns an object of class "sw" for which
there is a plot() method.
- There are two new methods as.phylo() and as.evonet() for the
class "haploNet".
- site.spectrum() is now generic with methods for "DNAbin" (old
code) and for "loci" (new code). The returned object now has an
attribute "sample.size" (useful for folded spectra).
- There is a new summary() method for the class "haplotype" to
extract haplotype absolute frequencies.
- There is a new by() method for the class "loci" that by default
computes allele frequencies by population.
- H() is now generic with a default method (with the old code) and
a "loci" method.
- Fst() has the new option 'na.alleles' ("" by default) to specify
alleles coding for missing data.
- LDscan() is now generic with methods for classes "DNAbin" (new
code) and "loci" (old code). The latter has a new option, depth,
to specify at what depth(s) (or lags) to compute r^2 values.
BUG FIXES
- loci2genind() dropped row and column labels when converting an
object with a single locus.
- The 'dimnames' were not set correctly in sw().
- all.equal.haploNet() failed depending on the order of the
arguments.
- hw.test() failed if some loci were ignored.
- plotNetMDS(, k = 2) did not display the x-axis.
- A bug was fixed in theta.tree() which multiplied the estimates
of THETA by two.
- LDmap() failed if there were NA's in the output from LDscan().
- plot.haploNet(, show.mutation = 2) failed if the network had
reticulations.
- alleles2loci(, ploidy = 1) failed.
- H.loci() did not use the correct values of 'n' (number of
alleles; number of individuals was used before).
OTHER CHANGES
- summary.loci() is around 4 times faster.
- dist.snp() will be removed in the next release: its code has
been incorporated in dist.asd(), and it now gives a warning.
- The default of x[, 1] is now drop = FALSE for "loci" objects.
- print.haplotype() now prints only the first 40 haplotype labels
and frequencies (see the new summary.haplotype() above).
- The BioConductor package snpStats is now suggested.
pegas 0.11 (2018-07-09)
NEW FEATURES
- The new generic function sw computes sliding window averages.
There is a method for "DNAbin" matrices with various options.
- The new function dist.asd computes the allelic sharing distance
(ASD) for all diploid genotypes (phased or unphased, with two
alleles or more).
- The new function dist.snp computes the ASD for strict SNPs (only
for unphased, diploid genotypes).
- The new function unphase unphases the genotypes and eventually
pools those identical once unphased (e.g., A|T and T|A become
A/T).
- The new generic function hap.div computes haplotype diversity.
There are methods for the "haplotype" and "DNAbin" classes.
- The new function getPhi returns Phi-statistics from a vector of
variance components.
- The new function write.pegas.amova contributed by Brian Knaus
writes outputs from amova() into files.
- loci2gening() gains an option unphase (TRUE by default).
- print.amova() now displays the Phi-statistics thanks to a
contribution by Zhian Kamvar.
- VCFloci() and read.vcf() can now read compressed files (.vcf.gz)
remotely.
- There is a new haplotype.numeric() method (for 0/1 sequences but
not only).
BUG FIXES
- read.vcf(file = "~/chr.vcf") made R crash (apparently only under
some OSs). Thanks to Frédéric Michaud for the fix.
- plot.haploNet() failed with the default show.mutation = 1 if the
distances were all less than one. A warning is now issued and
show.mutation is changed to 3.
- Fst() did not use correct sample size with respect to missing
data: the correction is now done locus by locus.
- Fst() failed when the data contained only a single locus.
- amova() failed to compute P-values for the higher levels if the
levels were not arranged as blocks: the data are now rearranged
internally.
- A bug was fixed in unphase().
OTHER CHANGES
- summary.loci() is faster and scales better: 10 times faster with
1000 loci, 100 times faster with 10,000 loci.
- The help page of theta.tree() has been clarified and its example
extended.
- mjn() gives a more explicit error message if failing because of
duplicated sequences.
- getPloidy() now returns a matrix of integers.
pegas 0.10 (2017-05-03)
NEW FEATURES
- The new function mjn computes the median-joining network
(Bandelt et al., 1999, Mol Biol Evol, 16:37).
- The new function msn computes the minimum spanning network
(Bandelt et al., 1999, Mol Biol Evol, 16:37).
- The new function rmst computes the randomized minimum spanning
tree (Paradis, in prep.)
- The new function plotNetMDS plots a network (class "haploNet")
using the coordinates of the haplotypes from an MDS done on the
distance matrix.
- The new function dist.hamming implements a general purpose
Hamming distance. It can be used for many types of data,
particularly the output of haplotype.character().
- There is a new haplotype.character() method.
- There is a new all.equal.haploNet() method to compare two
haplotype networks.
- haplotype.loci() has a new option (check.phase) to optionally
skip the check of genotype phasing. The code is also now 2-5
times faster.
- haploNet() has a new option, getProb = TRUE, to control whether
to calculate Templeton's probabilities (in case of difficulties
with very divergent sequences).
- The option 'show.mutation' of plot.haploNet() now takes an
integer between 0 and 3. The default (1) is to show the
mutations with small segments on the links.
- loci2genind() has the new option 'ploidy' which is by default
taken from the data with getPloidy().
- MMD() has a new option, bw, to specify the bandwidth of the
empirical density curve.
BUG FIXES
- plot.haploNet() failed with two haplotypes.
- loci2genind() handles correctly missing alleles with a new
option na.alleles = c("0", "."). The default value of 'ploidy'
is now 2 (see explanation in the help page).
- haplotype.DNAbin() failed with too many missing data.
- A bug was fixed in na.omit.loci().
OTHER CHANGES
- The arguments xlab and ylab in plot.haplotype can now be
modified from the plot() call.
pegas 0.9 (2016-04-16)
NEW FEATURES
- The new functions LDscan and LDmap analyse linkage
disequilibrium with multiple loci and phased genotypes.
- The new function na.omit.loci drops observations with unclearly
identified genotypes. By default, "0" and "." are considered as
missing alleles.
- nuc.div() is now generic with methods for the classes "DNAbin"
and "haplotype".
- theta.s() is now generic with a default method (the previous
code; the argument 's' has been renamed 'x') and a method for
the class "DNAbin".
- haplotype.loci() has a new option (compress) to return all
observed haplotypes without checking their frequencies (mostly
for internal use).
BUX FIXES
- read.vcf() and VCFlabels() failed when the VCF file has a large
header (> 1e5 bytes). The chunk read is now 1 Mb.
- read.vcf() made R crash when reading files with 1000s of loci
for a single individual.
- loci2genind() now treats '.' as a missing allele.
- amova() with three levels did not work correctly: several bugs
were fixed.
- read.vcf() failed to read correctly the last genotype in a row
if the previous one was different from all the others and if
only the genotypes are in the file.
- alleles2loci() now returns the 'population' column as a factor.
OTHER CHANGES
- haplotype.loci() is 5 to 10 times faster.
pegas 0.8-2 (2015-09-25)
NEW FEATURES
- There is now a print method for objects of class "haploNet".
- as.igraph.haploNet() and as.network.haploNet() gains a new
option, altlinks, to output the alternative links in the
converted object (TRUE by default).
BUX FIXES
- haplotype.DNAbin() ignored alignment gaps so that identical
sequences were considered as different if they contained gaps.
- haplotype.DNAbin() failed with very short sequences (1 or 2
nucleotides).
- alleles2loci() did not handle correctly its 'population' option.
- amova() could not be called within a function. This is fixed.
OTHER CHANGES
- Updated NAMESPACE file for r-devel.
- haplotype.loci() is now 2-8 times faster and gains a new option
(quiet = FALSE) to display or not a message of the progress of
the analysis.
pegas 0.8-1 (2015-06-24)
OTHER CHANGES
- Minor correction in Fst.Rd.
pegas 0.8 (2015-05-20)
NEW FEATURES
- Seven new functions (VCFloci, VCFheader, VCFlabels, rangePOS,
is.snp.VCFinfo, selectQUAL, getINFO) are provided to read
information from VCF files.
- The new function alleles2loci transforms a matrix of alleles
(typical for microsatellites) into an object of class "loci".
- read.vcf() has been completely rewritten with new options.
- hw.test() is now generic with methods for classes "loci" and
"genind" (contributed by Thibaut Jombart).
- is.snp() is now generic with methods for classes "loci" and
"VCFinfo".
- There is now a subset method for objects of class "haplotype"
giving the possibility to select haplotypes with respect to
their absolute frequency and/or frequency of missing data.
- There is a new data set (jaguar) with microsatellites from four
populations of jaguars.
BUG FIXES
- Subsetting "loci" objects failed when some column names were the
same (often when reading VCF files).
- haploNet() failed when no alternative links were found.
- amova() failed when the factors in the rhs of the formula were
in a data frame. Thanks to Zhian Kamvar for the fix.
OTHER CHANGES
- The vignette "ReadingFiles" has been revised and extended.
pegas 0.7 (2015-03-05)
NEW FEATURES
- The new function geod calculates geodesic (aka great-circle)
distances from coordinates in (decimal) degrees.
- The new function geoTrans transforms strings such as
43°12'34" into a numerical value.
- The new function replot edits the layout of a haplotype network
interactively or with specified coordinates (typically from a
previous call to replot).
- The new function diffHaplo outputs details of the differences
between two haplotypes.
- haploNet() now outputs alternative links of a haplotype network.
- plot.haploNet() has been improved (a bit faster) and has a new
option 'threshold' to control how alternative links of the
network are displayed.
- The option 'show.mutation' of plot.haploNet() has been extended.
OTHER CHANGES
- haplotype() now takes base ambiguities into account when
comparing sequences. For consistency, haploNet() now uses
pairwise deletion when comparing sequences of haplotypes.
- The attribute "CHR" returned by read.vcf() is now character (was
integer before).
pegas 0.6 (2014-08-21)
NEW FEATURES
- The new function read.vcf reads VCF files.
- The new function is.snp tests whether a locus is a SNP.
- The new function is.phased tests whether a genotype is phased.
- The new function proba.genotype computes expected genotype
probabilities under Hardy-Weinberg equilibrium for all levels
of ploidy and any number of alleles.
- The new function haplotype.loci extracts haplotypes from phased
genotypic data.
- The new function dist.haplotype.loci computes distances among
haplotypes extracted from loci data.
- Two new functions, LD and LD2, test for linkage disequilibrium
with phased and unphased genotypes, respectively.
- haplotype() is now generic with methods for "DNAbin" and "loci"
objects.
- There is a sort() method for objects of class "haplotype".
- expand.genotype() now works with all levels of ploidy and any
number of alleles.
BUG FIXES
- site.spectrum( , folded = FALSE) dit not work correctly.
- Genotypes with alleles not separated by the default slash (e.g.,
a|A) were not read correctly.
- Reordering of alleles has been improved: alleles are now always
sorted alphabetically within an unphased genotype, e.g., a/A is
changed to A/a even if A/a was not observed (this was not the
case before).
- hw.test() now checks more carefully for ploidy level and accepts
data with mixed levels of ploidy.
OTHER CHANGES
- amova() now checks that the term(s) in the rhs of the formula is
(are) factor(s).
- Plotting haplotype networks with pies can now be done with
user-chosen colours for the slices (thanks to Marius Wenzel for
pointing this out).
- tajima.test() now returns a warning with less than 4
observations as this test cannot be done in this situation (an
error occured before).
pegas 0.5-1 (2014-01-10)
NEW FEATURES
- MMD() now plots the expected distribution of mismatches under
the assumption of a stable population together with the
empirical curve (contribution by David Winter). The new option
'lty' can specify the types of lines. The legend is now at the
top of the plot.
BUG FIXES
- theta.tree() returned estimates of Theta divided by 2 (scaled on
Nu). The estimates are now correct (ie, scaled on 2Nu).
pegas 0.5 (2013-10-08)
NEW FEATURES
- The new function theta.msat computes THETA from micro-satellite
data using three different estimators.
- The new function haploFreq extracts the haplotype frequencies,
possibly using the labels of the original sequences; see
?haploFreq for details.
- plot.haploNet() has the new option 'show.mutation' to display
the mutations on the links of the network.
OTHER CHANGES
- Improved DESCRIPTION and NAMESPACE files.
- The packages igraph and network are no more required.
pegas 0.4-5 (2013-06-06)
OTHER CHANGES
pegas 0.4-4 (2013-01-23)
NEW FEATURES
- theta.tree() has a new option, analytical = TRUE, to compute
THETA and its standard-error with analytical formulae. If FALSE,
a numerical optimisation is done (as in previous versions).
- The function mst (minimum spanning tree) has been moved from ape
to pegas with a new code.
BUG FIXES
- hw.test() should have one less ddl to its chi2 tests (thanks to
Gabriel Terraz for the fix).
- Extracting sequence(s) from an object of class "haplotype" could
not be printed correctly: this is fixed with a new '[' method
for this class.
- The reference to Chakraborty and Weiss (1991) was corrected
thanks to Kari Vepsäläinen.
pegas 0.4-3 (2012-07-31)
OTHER CHANGES
- Changed some coding in summary.loci().
pegas 0.4-2 (2012-05-11)
BUG FIXES
- amova() did not randomize correctly at the highest level,
resulting in P-values that were always equal to 1.
pegas 0.4-1 (2012-01-19)
BUG FIXES
- site.spectrum(, folded = FALSE) failed.
- The variances returned by nuc.div() were inflated (thanks to
Paulina Ossa for the report).
pegas 0.4 (2011-07-23)
NEW FEATURES
- The new function rr.test by Alastair Potts performs Tajima's test
of a molecular clock (Genetics, 1993, 135:599).
- haploNet() has a new argument 'd = NULL' to specify an
alternative distance matrix among haplotypes.
- There are two new functions, as.network.haploNet() and
as.igraph.haploNet() for converting networks of class
"haploNet" towards other packages.
BUG FIXES
- plot.haploNet() has now by default asp = 1.
pegas 0.3-4 (2011-04-01)
OTHER CHANGES
- The help command ?loci now points to the man page of read.loci()
where this class is described.
pegas 0.3-3 (2010-11-26)
BUG FIXES
- read.loci() failed with haploid data. It also failed in some
situations with the population column. The default behaviour is now
more flexible and more reliable.
- Variance components were not correctly computed by amova() in the
single-level case.
- print.amova() did not work correctly when amova() was called with
'nperm = 0'.
pegas 0.3-2 (2010-06-10)
BUG FIXES
- A bug was fixed in Fst().
pegas 0.3-1 (2010-05-19)
OTHER CHANGES
- The default of 'loci.sep' in read.loci() is now "".
pegas 0.3 (2009-12-03)
NEW FEATURES
- The new function edit.loci allows to edit allelic data frame while
keeping the attributes correct (which edit.data.frame doesn't).
- There are new rbind() and cbind() methods for objects of class
"loci".
- There is a print 'method' for the class "haplotype".
- ‘[.loci' has now an option ’drop = TRUE'.
- There is a vignette detailing how to read allelic data files of
various formats into R: type vignette("ReadingFiles") in R.
BUG FIXES
- amova() did not compute SSD correctly with a single level.
- getAlleles() did not work correctly.
- read.loci() did not work when 'col.pop' was used.
- Checking for ordered alleles did not work (i.e, A/a and a/A were
treated as different genotypes: they are now pooled).
- The display of haplotype labels by plot.haploNet() was not
effective.
OTHER CHANGES
- read.loci() loses the 'skip' option which is replaced by '...'.
pegas 0.2 (2009-10-07)
NEW FEATURES
- The new function site.spectrum computes the (un)folded site
frequency spectrum of a set of DNA sequences.
- The new function theta.tree estimates THETA from a phylogenetic tree
under a simple coalescent model by maximum likelihood.
- There is now a "[" method for the class "loci".
- haplotype() has now an option 'labels' to give as rownames of
the returned object.
- amova() has a new option 'is.squared' to specify whether the
distance matrix has been squared beforefand (FALSE by default).
- write.loci() has a new argument '...' passed to write.table().
- The functions heterozygosity, nuc.div, theta.h, theta.k and
theta.s have been moved from ape to pegas.
BUG FIXES
- amova() did not compute SSD correctly.
- summary.loci() failed in the presence of NA's.