Skip to content

Commit

Permalink
docs update
Browse files Browse the repository at this point in the history
  • Loading branch information
eaton-lab committed May 14, 2024
1 parent 8e90140 commit cbdb931
Show file tree
Hide file tree
Showing 5 changed files with 581 additions and 113 deletions.
52 changes: 52 additions & 0 deletions docs/FAQs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
section: FAQs
icon: material/question
---

# Frequently Asked Questions


### How do I get help?
The first place to look for help or answers is in here in the documentation.
You can use the search bar in the navigation to search for terms or function
names. The next place is in the source documentation strings. Some of the
source code is available here in the docs, but the rest can be accessed
in an interactive environment (e.g., jupyter) by executing a function name
followed by one or two question marks. The docstrings often contain detailed
descriptions of parameters and example usage. Finally, you can seek further
help or advice by raising an Issue on GitHub. To do this, navigate to
https://github.com/eaton-lab/toytree/issues and click the green New Issue
button in the upper right. Then click on Labels on the right to select
"help wanted" or "question" as the category for your issue.


### How do I report bug?
If you believe you have encountered a bug in toytree please let us know by
raising an Issue on GitHub. To do this, navigate to
https://github.com/eaton-lab/toytree/issues and click the green New Issue
button in the upper right. Then click on Labels on the right to select
"bug".


### How can I request a new feature
We are happy to implement new useful methods in toytree that will help to
grow its userbase. To request the implementation of a new method please do so
by raising an Issue on GitHub. To do this, navigate to
https://github.com/eaton-lab/toytree/issues and click the green New Issue
button in the upper right. Then click on Labels on the right to select
"enhancement".


### How can I contribute to toytree
We welcome contributors! If you are interested in contributing to toytree
please first read our contributor's guide. This describes a shared framework
and style to ensure a cohesive coding style throughout the source code. Then,
you can raise an Issue on GitHub to indicate the project you are working on.
This way, you can find if others are already working on the method, or find
additional contributors for help. To do this, navigate to
https://github.com/eaton-lab/toytree/issues and click the green New Issue
button in the upper right. Then click on Labels on the right to select
"enhancement", and under Assignees, assign your self.


<!-- ### ... -->
99 changes: 99 additions & 0 deletions docs/command-line.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Command line


## `toytree` cli
Sometimes you might not be in the mood to open a jupyter notebook just to take a quick peek at a tree, in which case, the toytree command line interface (cli) provides a convenient alternative. This tool can be called from a terminal shell to execute one or more simple commands to accomplish tasks such as creating tree drawings, rooting trees, and comparing trees.

## Subcommands
Currently three subcommands are supported in the cli: draw, root, and distance. (Please reach out and let us know if you would like to see additional toytree methods implemented in the cli.) Call the help command (-h) to see the available subcommands.

```bash
$ toytree -h
```

This will bring up a help statement like below. Each subcommand also has its own help page that describes its usage and options, as demonstrated below.

```bash
usage: toytree [-h] [-v] {draw,root,distance} ...

toytree command line tool. Select a subcommand.

positional arguments:
{draw,root,distance} sub-commands
draw create tree drawing
root (re)root tree and return to STDOUT
distance compute distance between trees

options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
EXAMPLE: $ toytree draw TREE -ts o -d 400 400 -v
```
## toytree draw
```bash
$ toytree draw -h
```
```bash
usage: toytree draw [-h] [-ts treestyle] [-d dim dim] [-o basename] [-v [app]]
[-f {html,svg,pdf}]
TREE
positional arguments:
TREE tree newick file or string
options:
-h, --help show this help message and exit
-ts treestyle tree style (default: n)
-d dim dim width height (px) (default: (None, None))
-o basename output basename[.format suffix] (default: /tmp/test)
-v [app] open file with default browser or app. (default: None)
-f {html,svg,pdf} output file format (default: html)
```
## toytree root
```bash
$ toytree root -h
```
```bash
usage: toytree root [-h] [-o O [O ...]] [-r] TREE
positional arguments:
TREE tree newick file or string
options:
-h, --help show this help message and exit
-o O [O ...] outgroup
-r use regex matching on outgroup string.
```
## toytree distance
```bash
$ toytree distance -h
```
```bash
usage: toytree distance [-h] [-m {rf,rfi,rfj,qrt}] [-n] TREE1 TREE2
positional arguments:
TREE1 tree1 newick file or string
TREE2 tree2 newick file or string
options:
-h, --help show this help message and exit
-m {rf,rfi,rfj,qrt} distance metric method
-n, --normalize normalize value between [0-1]
```
## chaining
To indicate to the draw function that the NEWICk input is the STDOUT from the previous command, use the `-` character like below.
```bash
toytree root NEWICK | toytree draw - ...
```
Loading

0 comments on commit cbdb931

Please sign in to comment.