Skip to content

Commit

Permalink
v0.1.22 fixed max_tips in forest generation
Browse files Browse the repository at this point in the history
  • Loading branch information
annazhukova committed Jul 1, 2024
1 parent b8969cb commit aded37b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ USER root
RUN apt-get update -y && apt-get install -y bc

# Install treesimulator
RUN cd /usr/local/ && pip3 install --no-cache-dir treesimulator==0.1.21
RUN cd /usr/local/ && pip3 install --no-cache-dir treesimulator==0.1.22

# Switch to your new user in the docker image
USER evolbioinfo
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
'Topic :: Software Development',
'Topic :: Software Development :: Libraries :: Python Modules',
],
version='0.1.21',
version='0.1.22',
description='Simulation of rooted phylogenetic trees under a given Multitype Birth–Death model.',
author='Anna Zhukova',
author_email='anna.zhukova@pasteur.fr',
Expand Down
3 changes: 2 additions & 1 deletion treesimulator/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ def simulate_tree_gillespie(model, max_time=np.inf, min_sampled=0, max_sampled=n

logging.debug('Aiming for at most {} sampled cases over time {}'.format(max_sampled, max_time))

target_sampled = np.round(np.random.uniform(low=min_sampled, high=max_sampled, size=1)[0], 0)
target_sampled = np.round(np.random.uniform(low=min_sampled, high=max_sampled, size=1)[0], 0) \
if max_sampled < np.inf else np.inf

while infectious_nums.sum() and sampled_nums.sum() < target_sampled and time < max_time:
# first we need to calculate rate sum
Expand Down

0 comments on commit aded37b

Please sign in to comment.