Mercurial > repos > bgruening > json2yolosegment
comparison json2yolosegment.xml @ 4:f6990d85161c draft default tip
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools commit c6c9d43a4ecdc88ebdeaf3451453a550f159c506
author | bgruening |
---|---|
date | Mon, 21 Jul 2025 15:51:13 +0000 |
parents | dfda27273ead |
children |
comparison
equal
deleted
inserted
replaced
3:97bc82ee2a61 | 4:f6990d85161c |
---|---|
6 <expand macro="creator" /> | 6 <expand macro="creator" /> |
7 <expand macro="edam" /> | 7 <expand macro="edam" /> |
8 <expand macro="requirements" /> | 8 <expand macro="requirements" /> |
9 <command detect_errors="aggressive"> | 9 <command detect_errors="aggressive"> |
10 <![CDATA[ | 10 <![CDATA[ |
11 mkdir ./input ./output && | 11 mkdir ./input ./output && |
12 | 12 |
13 #for $filename in $in_json: | 13 #for $filename in $in_json: |
14 #if $filename.element_identifier.endswith($filename.ext) | 14 #if $filename.element_identifier.endswith($filename.ext) |
15 ln -s '$filename' './input/${filename.element_identifier}' && | 15 ln -s '$filename' './input/${filename.element_identifier}' && |
16 #else: | 16 #else: |
17 ln -s '$filename' './input/${filename.element_identifier}.${filename.ext}' && | 17 ln -s '$filename' './input/${filename.element_identifier}.${filename.ext}' && |
18 #end if | 18 #end if |
19 #end for | 19 #end for |
20 | 20 |
21 python '$__tool_directory__/json2yolosegment.py' | 21 python '$__tool_directory__/json2yolosegment.py' |
22 -i ./input/ | 22 -i ./input/ |
23 -o ./output | 23 -o ./output |
24 -c '$class_name' | 24 -c '$class_name' |
25 | 25 |
26 ]]> | 26 ]]> |
27 </command> | 27 </command> |
28 <inputs> | 28 <inputs> |
29 <param name="in_json" type="data" format="json" multiple="true" label="Input label files" help="The label file is the output of AnyLabeling in JSON format."/> | 29 <param name="in_json" type="data" format="json" multiple="true" label="Input label files" help="The label file is the output of AnyLabeling in JSON format."/> |
30 <param name="class_name" type="data" format="txt" label="Class file" help="Class names text file, contains the names of classes, one class per row."/> | 30 <param name="class_name" type="data" format="txt" label="Class file" help="Class names text file, contains the names of classes, one class per row."/> |
31 </inputs> | 31 </inputs> |
32 <outputs> | 32 <outputs> |
33 <collection name="output_yolo" type="list" label="YOLO text files"> | 33 <collection name="output_yolo" type="list" label="YOLO text files"> |
34 <discover_datasets pattern="(?P<name>.+)\.txt" visible="true" directory="./output" format="txt"/> | 34 <discover_datasets pattern="(?P<designation>.+)\.txt" directory="./output" format="txt"/> |
35 </collection> | 35 </collection> |
36 </outputs> | 36 </outputs> |
37 <tests> | 37 <tests> |
38 <test> | 38 <test> |
39 <param name="in_json" value="in_json.json,in_json1.json" /> | 39 <param name="in_json" value="in_json.json,in_json1.json" /> |
40 <param name="class_name" value="class_names.txt" /> | 40 <param name="class_name" value="class_names.txt" /> |
41 <output_collection name="output_yolo"> | 41 <output_collection name="output_yolo"> |
42 <element name="in_json"> | 42 <element name="in_json"> |
43 <assert_contents> | 43 <assert_contents> |
44 <has_n_lines n="1" /> | 44 <has_n_lines n="1" /> |
45 <has_text text="0.8532289628180039" /> | 45 <has_text text="0.8532289628180039" /> |
46 </assert_contents> | 46 </assert_contents> |
47 </element> | 47 </element> |
48 <element name="in_json1"> | 48 <element name="in_json1"> |
49 <assert_contents> | 49 <assert_contents> |
50 <has_n_lines n="1" /> | 50 <has_n_lines n="1" /> |
51 <has_text text="0.7710371819960861" /> | 51 <has_text text="0.7710371819960861" /> |
52 </assert_contents> | 52 </assert_contents> |
53 </element> | 53 </element> |
54 </output_collection> | 54 </output_collection> |
55 </test> | 55 </test> |
56 <test> | 56 <test> |
57 <param name="in_json" value="in_json_noext,in_json1_noext" /> | 57 <param name="in_json" value="in_json_noext,in_json1_noext" /> |
58 <param name="class_name" value="class_names.txt" /> | 58 <param name="class_name" value="class_names.txt" /> |
59 <output_collection name="output_yolo"> | 59 <output_collection name="output_yolo"> |
60 <element name="in_json1_noext"> | 60 <element name="in_json1_noext"> |
61 <assert_contents> | 61 <assert_contents> |
62 <has_n_lines n="1" /> | 62 <has_n_lines n="1" /> |
63 <has_text text="0.7710371819960861" /> | 63 <has_text text="0.7710371819960861" /> |
64 </assert_contents> | 64 </assert_contents> |