comparison data_manager/install_clair3_models.xml @ 0:11e42265a9b0 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/data_managers/data_manager_clair3_models commit 2672414472cc968c736dc7d42f5a119ff8c16c62
author iuc
date Thu, 20 Feb 2025 17:57:11 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:11e42265a9b0
1 <tool id="data_manager_clair3_models" name="Clair3 model downloader" version="0.0.1" tool_type="manage_data" profile="23.2">
2 <requirements>
3 <requirement type="package" version="3.12">python</requirement>
4 </requirements>
5 <command detect_errors="exit_code"><![CDATA[
6 ## this code looks up the existing table and uses it to build a list of known models
7 ## because models are uniquely identified by their name, downloading duplicate models
8 ## would be an error, so it is useful to know which models we already have
9 ##
10 ## $__app__.tool_data_tables is a dictionary where the keys are data table names and the values
11 ## are TabularToolDataTable objects (from lib/galaxy/tools/data/__init__.py)
12 ##
13 ## the get_fields() method on the TabularToolDataTable returns a list of lists, with one list
14 ## per line of the tool data table, so row[0] is the first field (i.e. the value column)
15 ##
16
17 #set $data_table = $__app__.tool_data_tables.get("clair3_models")
18 #if $data_table is not None and len($data_table.get_fields()) > 0:
19 #set $known_models = ','.join([ row[0] for row in $data_table.get_fields() ])
20 #set $sha256_sums = ','.join([ row[1] for row in $data_table.get_fields() ])
21 #else
22 #set $known_models = None
23 #set $sha256_sums = None
24 #end if
25
26 python '$__tool_directory__/model_fetcher.py'
27 '${output_file}'
28 #if $known_models is not None
29 --known_models '$known_models'
30 --sha256_sums '$sha256_sums'
31 #end if
32 #if $model_selection.source == 'latest'
33 --download_latest
34 #elif $model_selection.source == 'chosen'
35 --download_models '$model_selection.model_list'
36 #end if
37 ]]></command>
38 <inputs>
39 <conditional name="model_selection">
40 <param name="source" label="Select the source of the list of models to download" type="select">
41 <option value="latest">Latest models from Rerio page</option>
42 <option value="chosen">User provided list of models</option>
43 </param>
44 <when value="latest">
45 </when>
46 <when value="chosen">
47 <param name="model_list" type="text" label="List of models to download" help="A comma separated list of model to download, e.g. 'r1041_e82_400bps_sup_v430,r1041_e82_400bps_hac_v430'">
48 <validator type="regex" message="Invalid model list. Format is a comma separated list of model names (e.g. 'r1041_e82_400bps_sup_v430,r1041_e82_400bps_hac_v430')">^[a-z_0-9,]+$</validator>
49 </param>
50 </when>
51 </conditional>
52 </inputs>
53 <outputs>
54 <data name="output_file" format="data_manager_json" label="Data Manager Output (JSON)" />
55 </outputs>
56 <tests>
57 <test> <!-- test1 -->
58 <conditional name="model_selection">
59 <param name="source" value="chosen"/>
60 <param name="model_list" value="r1041_e82_400bps_sup_v500,r1041_e82_400bps_hac_v500" />
61 </conditional>
62 <output name="output_file">
63 <assert_contents>
64 <!-- the text 'r1041_e82_400bps_sup_v500' is only there if the test is run for the first time (i.e. empty test-data/clair3_models.loc) so need to look for something else -->
65 <has_text text='clair3_models' />
66 </assert_contents>
67 </output>
68 </test>
69 <test> <!-- test2 -->
70 <conditional name="model_selection">
71 <param name="source" value="latest"/>
72 </conditional>
73 <output name="output_file">
74 <assert_contents>
75 <!-- because we don't know what the names of the latest models are we can only test to see if the data table output is created -->
76 <has_text text='data_tables' />
77 </assert_contents>
78 </output>
79 </test>
80 </tests>
81 <help><![CDATA[
82 Clair3_ is a variant caller for long read data developed at the University of Hong Kong. This tool makes use of models trained to match particular
83 sequencing technologies and basecallers. Oxford Nanopore provides a set of models for Clair3 on their Rerio_ page. These tools are designed for
84 "research release" under the terms of the "Oxford Nanopore Technologies, Ltd. Public License Version 1.0" license_. This data manager allows
85 downloading model files from the Rerio page and installing them on a Galaxy server.
86
87 .. _Clair3: https://github.com/HKU-BAL/Clair3
88 .. _Rerio: https://github.com/nanoporetech/rerio
89 .. _license: https://github.com/nanoporetech/rerio/blob/master/LICENCE.txt
90 ]]>
91 </help>
92 <citations>
93 <citation type="doi">10.1101/2021.12.29.474431v2</citation>
94 <citation type="bibtex"><![CDATA[@misc{ONT2024,
95 title = {Rerio},
96 author = {Oxford Nanopore Technologies},
97 year = 2024,
98 howpublished = {\url{https://github.com/nanoporetech/rerio}},
99 commit = {c0c8ce6}
100 }]]></citation>
101 </citations>
102 </tool>