Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/romunov/obitools
Docker for OBITools
https://github.com/romunov/obitools
Last synced: 1 day ago
JSON representation
Docker for OBITools
- Host: GitHub
- URL: https://github.com/romunov/obitools
- Owner: romunov
- Created: 2019-06-14T18:57:28.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-06-23T18:13:06.000Z (over 5 years ago)
- Last Synced: 2023-10-20T22:53:29.811Z (about 1 year ago)
- Language: Jupyter Notebook
- Size: 4.88 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This docker wraps [OBITools (1.2.13)](https://git.metabarcoding.org/obitools/obitools/wikis/home) to make the workflows a bit more portable.
The following approach calls obitools functions from Python:
```
import docker
from docker.errors import NotFoundclient = docker.from_env()
# Create or start docker container named 'obitools'.
try:
obt = client.containers.get('obitools')
if obt.status == 'exited':
print('Starting container obitools.')
obt.start()
else:
print('Container obitools ready.')
except NotFound:
print('Creating container obitools.')
obt = client.containers.run(
image='romunov/obitools:1.2.13',
name='obitools',
# This maps my local wolfdata to /data in container
volumes={'/home/romunov/wolfdata': {'bind': '/data', 'mode': 'rw'}},
tty=True, detach=True
)
```To run the first command from the [wolves tutorial](https://pythonhosted.org/OBITools/wolves.html#recover-full-sequence-reads-from-forward-and-reverse-partial-reads), you would run something along the lines of
```
reads_r = "wolf_R.fastq"
reads_f = "wolf_F.fastq"
output = "wolf.fastq"
wolf = obt.exec_run(tty=True, workdir='/data', cmd=f'illuminapairedend --score-min={score_min} -r {reads_r} {reads_f} > {output}')
```The result would be found in `/home/romunov/wolfdata`. See the [vignette Python notebook](vignette_wolf_data.ipynb) for the full workflow.