Skip to content

Commit

Permalink
working LOC file
Browse files Browse the repository at this point in the history
  • Loading branch information
TomHarrop committed Jun 11, 2024
1 parent 4f5f155 commit ab7055d
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 19 deletions.
30 changes: 30 additions & 0 deletions tools/dorado/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

## Tool versions

Dorado is distributed on
[DockerHub](https://hub.docker.com/r/nanoporetech/dorado/tags) by nanoporetech,
but not tagged with a version.

That means the hash for the current version has to be hard-coded into the
wrapper. Unfortunately you have to pull a >6 GB container just to check the tool
version. At least you can update the list of models at the same time (see
below).

**Make sure you do this when you update the wrapper**!

## Basecalling models

The models are bundled in the container at `/models` and made available by the
`dorado_models.loc` file. To update the list, modify
`tool-data/dorado_models.loc.sample`. Note that if ONT remove models from the
container, doing this will also make them unavailable to Galaxy. Check the diff
before you merge.

Here's a one-liner to **replace** the contents of the loc file with the models that are bundled in the container `nanoporetech/dorado:shac2d8bc91ca2d043fed84d06cca92aaeb62bcc1cd`.

```bash
apptainer exec docker://nanoporetech/dorado:shac2d8bc91ca2d043fed84d06cca92aaeb62bcc1cd \
ls /models | \
awk '{print $0 "\t" $0 "\t/models/" $0}' \
> tool-data/dorado_models.loc.sample
```
13 changes: 5 additions & 8 deletions tools/dorado/dorado.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<tool id="dorado" name="dorado" version="@CONTAINER_HASH@+galaxy0" python_template_version="3.5" profile="21.05">
<tool id="dorado" name="dorado" version="@VERSION@+galaxy0" python_template_version="3.5" profile="21.05">
<macros>
<import>macros.xml</import>
</macros>
Expand All @@ -10,19 +10,16 @@ ln -s '$pod5_file' ./reads.pod5 &&
dorado basecaller
--emit-sam
## TODO: get a list of models from /models (bundled with the container)
"/models/[email protected]"
'${model.fields.path}'
reads.pod5
> output.sam
]]></command>
<inputs>
<param name="pod5_file" type="data" format="fast5" label="Raw fast5 file"/>
<!-- <param name="model" type="select">
<options from_data_table="dorado_models" />
</param> -->
<param name="index" type="select">
<options from_data_table="bowtie_indexes" />
<!-- TODO: the model needs to be linked to the tool version, e.g. to prevent trying to run a new model with a previous version of the tool. -->
<param name="model" type="select">
<options from_data_table="dorado_models"/>
</param>
</inputs>
<outputs>
Expand Down
5 changes: 3 additions & 2 deletions tools/dorado/macros.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<macros>
<!-- TODO: the containers aren't tagged with software versions -->
<token name="@CONTAINER_HASH@">c2d8bc91ca2d043fed84d06cca92aaeb62bcc1cd</token>
<!-- UPDATING: pull the latest container and check the version. Update both tokens. You can also update the model list. See README.md for more. -->
<token name="@VERSION@">0.7.1</token>
<token name="@CONTAINER_HASH@">1c65eb070a9fc1d88710c4dc09b06541f96fdd28</token>
<xml name="requirements">
<requirements>
<container type="docker">nanoporetech/dorado:sha@CONTAINER_HASH@</container>
Expand Down
1 change: 0 additions & 1 deletion tools/dorado/test-data/bowtie_indices.loc

This file was deleted.

1 change: 1 addition & 0 deletions tools/dorado/test-data/dorado_models.loc
58 changes: 58 additions & 0 deletions tools/dorado/tool-data/dorado_models.loc.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
[email protected] [email protected] /models/[email protected]
[email protected]_5mCG_5hmCG@v2 [email protected]_5mCG_5hmCG@v2 /models/[email protected]_5mCG_5hmCG@v2
[email protected] [email protected] /models/[email protected]
[email protected]_5mCG_5hmCG@v2 [email protected]_5mCG_5hmCG@v2 /models/[email protected]_5mCG_5hmCG@v2
[email protected] [email protected] /models/[email protected]
[email protected]_5mCG_5hmCG@v2 [email protected]_5mCG_5hmCG@v2 /models/[email protected]_5mCG_5hmCG@v2
[email protected] [email protected] /models/[email protected]
[email protected]_5mCG_5hmCG@v2 [email protected]_5mCG_5hmCG@v2 /models/[email protected]_5mCG_5hmCG@v2
[email protected] [email protected] /models/[email protected]
[email protected]_5mCG_5hmCG@v2 [email protected]_5mCG_5hmCG@v2 /models/[email protected]_5mCG_5hmCG@v2
[email protected] [email protected] /models/[email protected]
[email protected] [email protected] /models/[email protected]
[email protected] [email protected] /models/[email protected]
[email protected]_5mCG_5hmCG@v2 [email protected]_5mCG_5hmCG@v2 /models/[email protected]_5mCG_5hmCG@v2
[email protected] [email protected] /models/[email protected]
[email protected]_5mCG_5hmCG@v1 [email protected]_5mCG_5hmCG@v1 /models/[email protected]_5mCG_5hmCG@v1
[email protected]_5mC_5hmC@v1 [email protected]_5mC_5hmC@v1 /models/[email protected]_5mC_5hmC@v1
[email protected]_6mA@v2 [email protected]_6mA@v2 /models/[email protected]_6mA@v2
[email protected] [email protected] /models/[email protected]
[email protected]_4mC_5mC@v1 [email protected]_4mC_5mC@v1 /models/[email protected]_4mC_5mC@v1
[email protected]_5mCG_5hmCG@v1 [email protected]_5mCG_5hmCG@v1 /models/[email protected]_5mCG_5hmCG@v1
[email protected]_5mC_5hmC@v1 [email protected]_5mC_5hmC@v1 /models/[email protected]_5mC_5hmC@v1
[email protected]_6mA@v1 [email protected]_6mA@v1 /models/[email protected]_6mA@v1
[email protected] [email protected] /models/[email protected]
[email protected]_5mCG_5hmCG@v2 [email protected]_5mCG_5hmCG@v2 /models/[email protected]_5mCG_5hmCG@v2
[email protected] [email protected] /models/[email protected]
[email protected]_5mCG_5hmCG@v1 [email protected]_5mCG_5hmCG@v1 /models/[email protected]_5mCG_5hmCG@v1
[email protected]_5mC_5hmC@v1 [email protected]_5mC_5hmC@v1 /models/[email protected]_5mC_5hmC@v1
[email protected]_6mA@v2 [email protected]_6mA@v2 /models/[email protected]_6mA@v2
[email protected] [email protected] /models/[email protected]
[email protected]_4mC_5mC@v1 [email protected]_4mC_5mC@v1 /models/[email protected]_4mC_5mC@v1
[email protected]_5mCG_5hmCG@v1 [email protected]_5mCG_5hmCG@v1 /models/[email protected]_5mCG_5hmCG@v1
[email protected]_5mC_5hmC@v1 [email protected]_5mC_5hmC@v1 /models/[email protected]_5mC_5hmC@v1
[email protected]_6mA@v1 [email protected]_6mA@v1 /models/[email protected]_6mA@v1
[email protected] [email protected] /models/[email protected]
[email protected] [email protected] /models/[email protected]
[email protected][email protected] [email protected][email protected] /models/[email protected][email protected]
[email protected]_5mCG_5hmCG@v0 [email protected]_5mCG_5hmCG@v0 /models/[email protected]_5mCG_5hmCG@v0
[email protected] [email protected] /models/[email protected]
[email protected][email protected] [email protected][email protected] /models/[email protected][email protected]
[email protected]_5mCG_5hmCG@v0 [email protected]_5mCG_5hmCG@v0 /models/[email protected]_5mCG_5hmCG@v0
[email protected] [email protected] /models/[email protected]
[email protected][email protected] [email protected][email protected] /models/[email protected][email protected]
[email protected]_5mCG_5hmCG@v0 [email protected]_5mCG_5hmCG@v0 /models/[email protected]_5mCG_5hmCG@v0
[email protected] [email protected] /models/[email protected]
rna002_70bps_fast@v3 rna002_70bps_fast@v3 /models/rna002_70bps_fast@v3
rna002_70bps_hac@v3 rna002_70bps_hac@v3 /models/rna002_70bps_hac@v3
[email protected] [email protected] /models/[email protected]
[email protected] [email protected] /models/[email protected]
[email protected] [email protected] /models/[email protected]
[email protected] [email protected] /models/[email protected]
[email protected]_m6A@v1 [email protected]_m6A@v1 /models/[email protected]_m6A@v1
[email protected]_pseU@v1 [email protected]_pseU@v1 /models/[email protected]_pseU@v1
[email protected] [email protected] /models/[email protected]
[email protected]_m6A_DRACH@v1 [email protected]_m6A_DRACH@v1 /models/[email protected]_m6A_DRACH@v1
[email protected] [email protected] /models/[email protected]
[email protected]_m6A@v1 [email protected]_m6A@v1 /models/[email protected]_m6A@v1
[email protected]_pseU@v1 [email protected]_pseU@v1 /models/[email protected]_pseU@v1
7 changes: 3 additions & 4 deletions tools/dorado/tool_data_table_conf.xml.sample
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<tables>
<!-- Locations of indexes in the Bowtie mapper format -->
<table name="bowtie_indexes" comment_char="#">
<columns>value, dbkey, name, path</columns>
<file path="tool-data/bowtie_indices.loc" />
<table name="dorado_models" comment_char="#">
<columns>value, name, path</columns>
<file path="tool-data/dorado_models.loc" />
</table>
</tables>
7 changes: 3 additions & 4 deletions tools/dorado/tool_data_table_conf.xml.test
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<tables>
<!-- Locations of indexes in the Bowtie mapper format -->
<table name="bowtie_indexes" comment_char="#">
<columns>value, dbkey, name, path</columns>
<file path="${__HERE__}/test-data/bowtie_indices.loc" />
<table name="dorado_models" comment_char="#">
<columns>value, name, path</columns>
<file path="${__HERE__}/test-data/dorado_models.loc" />
</table>
</tables>

0 comments on commit ab7055d

Please sign in to comment.