-
Notifications
You must be signed in to change notification settings - Fork 524
Expand file tree
/
Copy pathdeacon_datamanager.xml
More file actions
142 lines (142 loc) · 5.7 KB
/
Copy pathdeacon_datamanager.xml
File metadata and controls
142 lines (142 loc) · 5.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<tool id="deacon_build_database" name="Deacon" tool_type="manage_data" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
<description>database builder</description>
<macros>
<!-- on update run a local test setting `test` to something else than "true" -->
<token name="@TOOL_VERSION@">0.12.0</token>
<token name="@VERSION_SUFFIX@">0</token>
<token name="@PROFILE@">26.0</token>
</macros>
<requirements>
<requirement type="package" version="@TOOL_VERSION@">deacon</requirement>
<requirement type="package" version="1.6.1">zenodo_get</requirement>
<requirement type="package" version="1.25.0">wget</requirement>
<requirement type="package" version="8.21.0">curl</requirement>
</requirements>
<command detect_errors="exit_code"><![CDATA[
mkdir -p '$out_file.extra_files_path' &&
#if $test != "true"
#if $input.is_select == "prebuilt"
#if $download == "human"
zenodo_get 17288185 -m -g "*.idx" -o '$out_file.extra_files_path' &&
#else
zenodo_get 17699167 -m -g "*.idx" -o '$out_file.extra_files_path' &&
#end if
#else
deacon index build '$input.from_dm.fields.path' -o '${str($input.from_dm.fields.path).split('/')[-1]}.idx' &&
mv '${str($input.from_dm.fields.path).split('/')[-1]}.idx' '$out_file.extra_files_path' &&
#end if
#else
touch '$out_file.extra_files_path'/test.idx &&
#end if
cp '$dmjson' '$out_file'
]]></command>
<configfiles>
<configfile name="dmjson"><![CDATA[
#from datetime import datetime
#set time=datetime.now().strftime("%Y-%m-%d")
{
"data_tables":{
"deacon":[
{
#if $input.is_select == "prebuilt"
#if $download == "human"
"path":"panhuman-1.k31w15.idx",
#else
"path":"panmouse-1.k31w15.idx",
#end if,
#else
"path":"${str($input.from_dm.fields.path).split('/')[-1]}.idx",
#end if
"dbkey":"",
#if $input.is_select == "prebuilt"
#if $download == "human"
"name":"panhuman-1 (k=31, w=15)",
#else
"name":"panmouse-1 (k=31, w=15, e=0.5)",
#end if
#else
"name":"${str($input.from_dm.fields.path).split('/')[-1]} (k=31, w=15)",
#end if
#if $input.is_select == "prebuilt"
"version":"@TOOL_VERSION@",
#else
"version":"@TOOL_VERSION@",
#end if
#if $input.is_select == "prebuilt"
"value":"prebuilt-${time}",
#else
"value":"custom-${time}",
#end if
"format_version":"3",
#if $input.is_select == "prebuilt"
"note":"Prebuilt index files from the devs of deacon"
#else
"note":"Build from fasta file ${str($input.from_dm.fields.path).split('/')[-1]}"
#end if
}
]
}
}]]>
</configfile>
</configfiles>
<inputs>
<conditional name="input">
<param name="is_select" type="select" label="Choose how to add data to the DM">
<option value="prebuilt" selected="true">Download a prebuilt file</option>
<option value="fastx">Build index file from downloaded fasta files</option>
</param>
<when value="prebuilt">
<param name="download" type="select" label="Select which prebuilt should be downloaded" help="See help section for more information">
<option value="human">panhuman-1 (k=31, w=15)</option>
<option value="mouse">panmouse-1 (k=31, w=15, e=0.5)</option>
</param>
</when>
<when value="fastx">
<param name="from_dm" type="select" label="Select fasta file from DM">
<options from_data_table="all_fasta">
<filter column="2" type="sort_by" />
<validator message="No genomes are available for the selected input dataset" type="no_options" />
</options>
</param>
</when>
</conditional>
<param name="test" type="hidden"/>
</inputs>
<outputs>
<data name="out_file" format="data_manager_json" />
</outputs>
<tests>
<test expect_num_outputs="1">
<conditional name="input">
<param name="is_select" value="fastx"/>
<param name="from_dm" value="phiX174"/>
</conditional>
<param name="test" value="fasle"></param>
<output name="out_file">
<assert_contents>
<has_text text='"format_version":"3"'/>
<has_text text='"name":"phiX174.fasta (k=31, w=15)"'/>
</assert_contents>
</output>
</test>
<test expect_num_outputs="1">
<conditional name="input">
<param name="is_select" value="prebuilt"/>
<param name="download" value="human"/>
</conditional>
<param name="test" value="true"/>
<output name="out_file">
<assert_contents>
<has_text text='"format_version":"3"'/>
<has_text text='"name":"panhuman-1 (k=31, w=15)"'/>
</assert_contents>
</output>
</test>
</tests>
<help><![CDATA[
Download prebuilt index files for deacon or download other index files made for deacon via url.
]]></help>
<citations>
<citation type="doi">10.1101/2025.06.09.658732</citation>
</citations>
</tool>