Command-line utilities for downloading [BacDive](https://bacdive.dsmz.de/api/bacdive/) entries and merging PNU with the NCBI taxonomy.
Taxonomy managing tools.
## Python utilities
## Workflow
### `dsmz.py`
### 0. Configuration
A library containing base classes for wrapping REST APIs provided by DSMZ.
Edit the `config.yaml` file, and set the following variables:
See: https://www.dsmz.de/services/online-tools
*`BACDIVE_USER`: username for the BacDive API
*`BACDIVE_PASSWORD_FILE`: file containing the password for the BacDive API
*`ALVISNLP`: path to the AlvisNLP binary
*`REWRITE_TAXONOMY`: path to the `rewrite-taxonomy` binary
### `bacdive.py`
Python wrapper for downloading DSMZ catalog entries.
This script may be used as a library or in command-line.
### 1. NCBI Taxonomy download
See: https://bacdive.dsmz.de/api/bacdive/
### `pnu.py`
```shell
snakemake -j 1 -s ncbi-download.snakefile
```
Python wrapper for downloading LPSN taxa.
This script may be used as a library or in command-line.
**ETA: 2 minutes**
See: https://bacdive.dsmz.de/api/pnu/
This will download the Taxonomy archive from the NCBI FTP server, then unzip the archive.
## Configuration
The download is anonymous and does not require any registration.
In order to use the BacDive API, you must register a valid e-mail address: https://bacdive.dsmz.de/api/bacdive/registration/register/
### 2. DSMZ catalog download
Once the registration process is completed, write the BacDive password into a file.
**Set this file permissions as `0600` in order to prevent other users to access it**.
```shell
snakemake -j 1 -s dsmz-download.snakefile
```
Open `config.yml` and set the following variables:
**ETA: 10 hours**
*`BACDIVE_USER` and `BACDIVE_PASSWORD_FILE`: the e-mail registered to BacDive and the password file.
*`ALVISNLP`: the path to AlvisNLP binary.
*`TAXA_FILE`: path to the `taxa+id_microorganisms.txt` file.
*`OUTDIR`: the path to the directory where to store results.
This will download the whole DSMZ catalog via the BacDive service.
## Download DSMZ entries
In order to use the BacDive API, you must [register](https://bacdive.dsmz.de/api/bacdive/registration/register/).
You must type the registered user to the variable `BACDIVE_USER` in the `config.yaml` file.
You also must record the password in a file (do not forget to remove read rights from group and others), then type the file path to the variable `BACDIVE_PASSWORD_FILE`.