# HG changeset patch
# User iuc
# Date 1741512864 0
# Node ID e22da646fed7e2e23252420bb9d4a384f5aba6cb
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/data_managers/data_manager_funannotate commit 0b6712733bce2e4ec6b276a6dec9c7b4bff5a5cd
diff -r 000000000000 -r e22da646fed7 data_manager/extract.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data_manager/extract.py Sun Mar 09 09:34:24 2025 +0000
@@ -0,0 +1,49 @@
+import json
+import os
+import sys
+
+fun_db = sys.argv[1]
+fun_db_value = sys.argv[2]
+dmjson = sys.argv[3]
+
+content = []
+# get options for parameter --busco_db
+# which are just the subfolders of the db dir (minus outgroups/ and trained_species/)
+# https://github.com/nextgenusfs/funannotate/blob/8cc40728fee61566fdf736c1f2292e14cc117660/funannotate/predict.py#L319
+for d in os.scandir(fun_db):
+ if not d.is_dir():
+ continue
+ if d.name in ['outgroups', 'trained_species']:
+ continue
+ if not os.path.exists(os.path.join(d, "dataset.cfg")):
+ continue
+ name = d.name.replace("_", " ").capitalize()
+ content.append({'value': d.name, 'name': name, 'select': 'busco_db', 'db_value': fun_db_value})
+
+# --busco_seed_species
+# trained_species
+for d in os.scandir(os.path.join(fun_db, "trained_species")):
+ if not d.is_dir():
+ continue
+ if not os.path.exists(os.path.join(d, "info.json")):
+ continue
+ name = d.name.replace("_", " ").capitalize()
+ content.append({'value': d.name, 'name': name, 'select': 'trained_species', 'db_value': fun_db_value})
+
+# --busco_seed_species
+# outgroups
+for f in os.scandir(os.path.join(fun_db, "outgroups")):
+ if f.is_dir():
+ continue
+ if not f.name.endswith("_buscos.fa"):
+ continue
+ value = f.name[:-10]
+ name = ' - '.join([x.replace("_", " ").capitalize() for x in value.split('.')])
+ content.append({'value': value, 'name': name, 'select': 'outgroup', 'db_value': fun_db_value})
+
+with open(dmjson, "w") as fh:
+ json.dump({"data_tables": {"funannotate_options": content}}, fh)
+
+print(f'{len([c for c in content if c["select"]=="busco_db"])} x busco_db\n')
+print(f'{len([c for c in content if c["select"]=="trained_species"])} x trained_species\n')
+print(f'{len([c for c in content if c["select"]=="outgroup"])} x outgroup\n')
diff -r 000000000000 -r e22da646fed7 data_manager/funannotate_options.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data_manager/funannotate_options.xml Sun Mar 09 09:34:24 2025 +0000
@@ -0,0 +1,61 @@
+
+
+ 1.8.15
+ 0
+
+
+ funannotate
+
+ funannotate check --show-versions
+ /dev/null &&
+ #set db_path="./test"
+ #else
+ #set db_path=$database.fields.path
+ #end if
+ python '$__tool_directory__/extract.py' '$db_path' '$database' '$output_file'
+ ]]>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 10.5281/zenodo.4054262
+
+
diff -r 000000000000 -r e22da646fed7 data_manager_conf.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/data_manager_conf.xml Sun Mar 09 09:34:24 2025 +0000
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
diff -r 000000000000 -r e22da646fed7 test-data/funannotate.loc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/funannotate.loc Sun Mar 09 09:34:24 2025 +0000
@@ -0,0 +1,10 @@
+# this is a tab separated file describing the location of funannotate databases used for the
+# funannotate annotation tool
+#
+# the columns are:
+# value description format_version path
+#
+# for example
+# 2021-07-20-120000 Funannotate database 2021-07-20-120000 1.0 /tmp/database/funannotate/2021-07-20-120000
+# 2021-05-27-120000 Funannotate database 2021-05-27-120000 3.0 /tmp/database/funannotate/2021-05-27-120000
+test Funannotate database Test 1.0 ./test/
diff -r 000000000000 -r e22da646fed7 test-data/funannotate_options.loc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/funannotate_options.loc Sun Mar 09 09:34:24 2025 +0000
@@ -0,0 +1,9 @@
+# this is a tab separated file describing options available for selects in the funannotate tool
+# these options are derived separetely for each funannotate DB
+#
+# the columns are:
+# value name select db_value
+#
+# db_value is the ID of the funannotate DB
+# value and name are the value and name to be used
+# select describes the command line parameter / select for which the values can be used
\ No newline at end of file
diff -r 000000000000 -r e22da646fed7 tool-data/funannotate.loc.sample
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/funannotate.loc.sample Sun Mar 09 09:34:24 2025 +0000
@@ -0,0 +1,8 @@
+# this is a tab separated file describing the location of funannotate databases used for the
+# funannotate annotation tool
+#
+# the columns are:
+# value description format_version path
+#
+# for example
+# 2021-07-20-120000 Funannotate database 2021-07-20-120000 1.0 /tmp/database/funannotate/funannotate/2021-07-20-120000
diff -r 000000000000 -r e22da646fed7 tool-data/funannotate_options.loc.sample
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tool-data/funannotate_options.loc.sample Sun Mar 09 09:34:24 2025 +0000
@@ -0,0 +1,9 @@
+# this is a tab separated file describing options available for selects in the funannotate tool
+# these options are derived separetely for each funannotate DB
+#
+# the columns are:
+# value name select db_value
+#
+# db_value is the ID of the funannotate DB
+# value and name are the value and name to be used
+# select describes the command line parameter / select for which the values can be used
\ No newline at end of file
diff -r 000000000000 -r e22da646fed7 tool_data_table_conf.xml.sample
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.sample Sun Mar 09 09:34:24 2025 +0000
@@ -0,0 +1,10 @@
+
+
+ value, description, format_version, path
+
+
+
+ value, name, select, db_value
+
+
+
diff -r 000000000000 -r e22da646fed7 tool_data_table_conf.xml.test
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tool_data_table_conf.xml.test Sun Mar 09 09:34:24 2025 +0000
@@ -0,0 +1,10 @@
+
+
+ value, description, format_version, path
+
+
+
+ value, name, select, db_value
+
+
+