Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ example_snps.vcf
sims.make
example_sim.vcf
.ipynb_checkpoints
example_sim2.vcf
10 changes: 10 additions & 0 deletions docs/python_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ Here is a quick reference to some of the methods:
individuals_alive_at
mutation_metadata
next_slim_mutation_id
mutation_at
nucleotide_at
nodes_vacant
population_size
recapitate
Expand Down Expand Up @@ -156,6 +158,14 @@ Additionally, ``pyslim`` contains the following methods:
.. autofunction:: is_current_version
```

```{eval-rst}
.. autofunction:: nucleotide_at
```

```{eval-rst}
.. autofunction:: mutation_at
```


## Metadata

Expand Down
6 changes: 5 additions & 1 deletion pyslim/slim_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,10 +786,14 @@ def default_slim_metadata(name, num_chromosomes=1, num_traits=1, **kwargs):
metadata dictionary: for each such key=value pair the returned dictionary
has `value` (re)assigned to `key`.

For top-level ("tree_sequence") metadata, this method does not provide entries
for more than one chromosome under the key "chromosomes", since this is
considered optional by SLiM.

:param str name: The type of metadata requested.
:param int num_chromosomes: The number of chromosomes (only relevant for "node").
:param int num_traits: The number of traits
(only relevant for "individual" and "mutation_list_entry").
(only relevant for "tree_sequence", "individual" and "mutation_list_entry").
:rtype dict:
"""
if name == "tree_sequence":
Expand Down
2 changes: 1 addition & 1 deletion pyslim/slim_tree_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def nucleotide_at(ts, node, position, time=None, mut_metadata=None):
mutation IDs in its metadata.

This method uses a dictionary of mutation metadata, computed by
:meth:`mut_metadata`. This step can be expensive if there are
:meth:`mutation_metadata`. This step can be expensive if there are
many mutations, so this can be pre-computed and passed in as
``mutations``. If not provided, it will be computed.

Expand Down
Loading