Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Link to cogent3 docs in README
  • Loading branch information
GavinHuttley authored Jul 5, 2024
1 parent 1bf01c1 commit 0c6aa84
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<!-- [![Coverage Status](https://coveralls.io/repos/github/iqtree/piqtree2/badge.svg?branch=main)](https://coveralls.io/github/iqtree/piqtree2?branch=main) -->

piqtree2 is a library which allows you use IQ-TREE directly from Python!
`piqtree2` is a library which allows you use IQ-TREE directly from Python! The interface with python is through [cogent3](https://cogent3.org) objects, as shown below.

## Note

Expand All @@ -31,8 +31,12 @@ tree = build_tree(aln, "JC", rand_seed=1) # Optionally specify a random seed.

print("Tree topology:", tree) # A cogent3 tree object
print("Log-likelihood:", tree.params["lnL"])
# In a Jupyter notebook, try tree.get_figure() to see a dendrogram
```

> **Note**
> See the [cogent3 docs](https://cogent3.org) for examples on what you can do with cogent3 trees.
### Fit Branch Lengths to Tree Topology

```python
Expand Down Expand Up @@ -85,4 +89,4 @@ tree3 = make_tree("(a,b,(d,(c,e)));")
pairwise_distances = robinson_foulds(tree1, tree2, tree3) # Supports any number of trees (for a sequence of trees use *seq_of_trees)

print(pairwise_distances) # A numpy array containing pairwaise Robinson-Foulds distances between trees
```
```

0 comments on commit 0c6aa84

Please sign in to comment.