Skip to content

Commit

Permalink
docs: Include config-gui in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianMichelsen committed Jul 15, 2022
1 parent 672fea7 commit 480f813
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 4 deletions.
30 changes: 30 additions & 0 deletions docs/source/command-line-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

`metaDMG` has the following commands:
- [`config`](command_line_interface_config)
- [`config-gui`](command_line_interface_config_gui)
- [`compute`](command_line_interface_compute)
- [`dashboard`](command_line_interface_dashboard)
- [`get-data`](command_line_interface_get_data)
Expand Down Expand Up @@ -89,6 +90,35 @@ $ metaDMG config raw_data/alignment.sorted.bam --damage-mode local --max-positio

---


(command_line_interface_config_gui)=
## Config GUI

`metaDMG config-gui` is a simple graphical user interface (GUI) to help with the config creation.
The command itself does not take any parameters, everything is done by clicking and dragging.
For more information about what the different buttons and sliders mean, see the normal [`config`](command_line_interface_config) command.

### Examples

```console
$ metaDMG config-gui
```

The GUI presented looks like this:

```{figure} images/config-gui.png
:class: bg-primary mb-1
:width: 700px
:align: center
```

Mandatory fields that need to be filled are coloured red.
Note that if you change the damage mode to `LOCAL` or `GLOBAL`, the bottom left
square becomes disabled, since these parameters are only relevant for `LCA`.

---


(command_line_interface_compute)=
## Compute

Expand Down
19 changes: 15 additions & 4 deletions docs/source/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,19 @@ The fit related (`[fit]`) dependencies are:
- `joblib`
- `psutil`

And the visualization related (`[viz]`) dependencies are:
The visualization related (`[viz]`) dependencies are:
- `matplotlib`
- `plotly`
- `dash`
- `dash-bootstrap-components`
- `orjson`
- `tqdm`

In general, we allow for the custom installion of only the core packages `pip install metaDMG`, core + fit related packages: `pip install "metaDMG[fit]"`, core + visualization related packages: `pip install "metaDMG[viz]"` or core + fit + viz: `pip install "metaDMG[all]"`.

And the GUI related (`[gui]`) dependencies are:
- `customtkinter`

In general, we allow for the custom installion of only the core packages `pip install metaDMG`, core + fit related packages: `pip install "metaDMG[fit]"`, core + visualization related packages: `pip install "metaDMG[viz]"` or core + fit + viz + gui: `pip install "metaDMG[all]"`.

```{warning} metaDMG is not tested on Windows.
```
Expand Down Expand Up @@ -110,15 +114,22 @@ Here we sketch how a typical workflow works in `metaDMG`. In short:
$ metaDMG config raw_data/alignment.sorted.bam \
--names raw_data/names-mdmg.dmp \
--nodes raw_data/nodes-mdmg.dmp \
--acc2tax raw_data/acc2taxid.map.gz
--acc2tax raw_data/acc2taxid.map.gz \
--custom-database
```

If you prefer a more visual approach, the same can also be done using the `config-gui` command:

```console
$ metaDMG config-gui
```

### Run the computation

After the config has been created, we run the actual program using the `compute` command. This can take a while depending on the number (and size) of the files.

```console
$ metaDMG compute
$ metaDMG compute config.yaml
```

### Dashboard
Expand Down
8 changes: 8 additions & 0 deletions docs/source/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ Most of the options should be quite self-explanatory. `--bayesian` indicates tha

After running this command, you should notice a new file in your directory: `config.yaml`. This is a normal `.yaml` file which can be opened and edited with your favorite text editor. In case you wanted to call the config file something different, you can add `--config-file config_simple.yaml`.

The same as above can also be done more visually by using the `config-gui` command:

```console
$ metaDMG config-gui
```
Just remember to check the relevant boxes off and save a config file.
In case you are missing any mandatory fields, it should pop up and warn you automatically.

### Compute

Now that we have generated a config file with all of the necessary parameters, we can start the actual computation. This is done by running:
Expand Down

0 comments on commit 480f813

Please sign in to comment.