diff --git a/ChangeLog.md b/ChangeLog.md index 030c955..9a168bb 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -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 diff --git a/README.md b/README.md index 8f7409c..382add1 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/configure.ac b/configure.ac index 24112b3..7638c89 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) diff --git a/man/mptp.1 b/man/mptp.1 index 7080a3a..fea91df 100644 --- a/man/mptp.1 +++ b/man/mptp.1 @@ -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 @@ -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 diff --git a/src/random.c b/src/random.c index 4bbc385..9a14c4d 100644 --- a/src/random.c +++ b/src/random.c @@ -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;