Skip to content

Commit

Permalink
fixed issue #82
Browse files Browse the repository at this point in the history
  • Loading branch information
xflouris committed May 14, 2018
1 parent ab45f55 commit 3fd12fb
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 9 deletions.
6 changes: 6 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
All notable changes to `mptp` will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [0.2.4] - 2018-05-14
### Fixed
- If we do not manage to generate a random starting delimitation with the
wanted number of species (randomly chosen), we use the currently generated
delimitation instead.

## [0.2.3] - 2017-07-25
### Fixed
- Replaced hsearch which was causing problems on APPLE with custom hashtable
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ where `DIR` is the directory where bash autocompletion is stored. You can use
and the documentation, use the following commands:

```bash
wget https://github.com/Pas-Kapli/mptp/releases/download/v0.2.3/mptp-src-0.2.3.tar.gz
tar zxvf mptp-src-0.2.3.tar.gz
cd mptp-src-0.2.3
wget https://github.com/Pas-Kapli/mptp/releases/download/v0.2.4/mptp-src-0.2.4.tar.gz
tar zxvf mptp-src-0.2.4.tar.gz
cd mptp-src-0.2.4
./configure
make
make install # as root, or run sudo make install
Expand Down Expand Up @@ -110,12 +110,12 @@ To use the pre-compiled binary, download the appropriate executable for your
system using the following commands if you are using a Linux system:

```bash
wget https://github.com/Pas-Kapli/mptp/releases/download/v0.2.3/mptp-0.2.3-linux-x86_64.tar.gz
tar zxvf mptp-0.2.3-linux-x86_64.tar.gz
wget https://github.com/Pas-Kapli/mptp/releases/download/v0.2.4/mptp-0.2.4-linux-x86_64.tar.gz
tar zxvf mptp-0.2.4-linux-x86_64.tar.gz
```

You will now have the binary distribution in a folder called
`mptp-0.2.3-linux-x86_64` in which you will find three subfolders `bin`, `man`
`mptp-0.2.4-linux-x86_64` in which you will find three subfolders `bin`, `man`
and `doc`. We recommend making a copy or a symbolic link to the mptp binary
`bin/mptp` in a folder included in your `$PATH`, and a copy or a symbolic link
to the mptp man page `man/mptp.1` in a folder included in your `$MANPATH`. The
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.63])
AC_INIT([mptp], [0.2.3], [Tomas.Flouri@h-its.org])
AC_INIT([mptp], [0.2.4], [t.flouris@ucl.ac.uk])
AM_INIT_AUTOMAKE([subdir-objects])
AC_LANG([C])
AC_CONFIG_SRCDIR([src/mptp.c])
Expand Down
7 changes: 6 additions & 1 deletion man/mptp.1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.\" -*- coding: utf-8 -*-
.\" ============================================================================
.TH mptp 1 "January 31, 2017" "mptp 0.2.2" "USER COMMANDS"
.TH mptp 1 "May 14, 2018" "mptp 0.2.4" "USER COMMANDS"
.\" ============================================================================
.SH NAME
mptp \(em single-locus species delimitation
Expand Down Expand Up @@ -354,5 +354,10 @@ incorrectly formatted trees.
.TP
.BR v0.2.3\~ "released July 25th, 2017"
Replaced hsearch() with custom hashtable. Fixed minor output error messages.
.TP
.BR v0.2.4\~ "released May 14th, 2018"
If we do not manage to generate a random starting delimitation with the wanted
number of species (randomly chosen), we use the currently generated
delimitation instead.
.RE
.LP
9 changes: 8 additions & 1 deletion src/random.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,14 @@ double random_delimitation(rtree_t * root,
root->edgelen_sum - edgelen_sum);

free(inner_node_list);


assert(count <= species_count);
if (count < species_count)
{
/* TODO: This fixes issue #82, but we should implement a better, non-biased
way of generatng random starting delimitations */
species_count = count;
}
assert(count == species_count);

*delimited_species = species_count;
Expand Down

0 comments on commit 3fd12fb

Please sign in to comment.