# HG changeset patch
# User iuc
# Date 1709821722 0
# Node ID 57db282ca20431c7ca9b9585e7932589015b0d5f
# Parent e1502e4f872546731217a97ec9130648434e2240
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_omamer commit 67067cd7917545904b3a9980948abdd19f0576bd
diff -r e1502e4f8725 -r 57db282ca204 data_manager/macros.xml
--- a/data_manager/macros.xml Wed Feb 21 19:26:53 2024 +0000
+++ b/data_manager/macros.xml Thu Mar 07 14:28:42 2024 +0000
@@ -1,8 +1,12 @@
+
+ 2.0.2
+ 1
+
python
requests
-
\ No newline at end of file
+
diff -r e1502e4f8725 -r 57db282ca204 data_manager/omamer.py
--- a/data_manager/omamer.py Wed Feb 21 19:26:53 2024 +0000
+++ b/data_manager/omamer.py Thu Mar 07 14:28:42 2024 +0000
@@ -4,7 +4,6 @@
import json
import os
import sys
-from pathlib import Path
import requests
@@ -19,7 +18,6 @@
"LUCA": "LUCA-v0.2.5.h5",
}
-
DEFAULT_OUTPUT_DIR = "database_omamer"
@@ -37,12 +35,14 @@
def main(args):
- # Set output directory to default
- output_dir = DEFAULT_OUTPUT_DIR
+
+ with open(args.json) as fh:
+ params = json.load(fh)
+ target_directory = params["output_data"][0]["extra_files_path"]
# Create output directory if none exists
- if not os.path.exists(output_dir):
- os.makedirs(output_dir)
+ if not os.path.exists(target_directory):
+ os.makedirs(target_directory)
# Check if the selected dataset exists
if args.name not in OMAMER_DATASETS:
@@ -53,18 +53,18 @@
dataset = OMAMER_DATASETS[args.name]
url = OMAMER_DATASETS_URL.format(dataset=dataset)
base_name = os.path.splitext(dataset)[0]
- destination_path = os.path.join(output_dir, base_name)
+ destination_path = os.path.join(target_directory, dataset)
download_file(url, destination_path)
data_manager_entry = {
- "value": os.path.splitext(os.path.basename(base_name))[0],
- "name": os.path.splitext(os.path.basename(base_name))[0],
- "version": "2.0.2",
- "path": str(Path(output_dir)),
+ "value": dataset,
+ "name": base_name,
+ "version": args.version,
+ "path": dataset,
}
# Creates a JSON dictionary representing the Data Manager configuration
- data_manager_json = {"data_tables": {"omamer_data": [data_manager_entry]}}
+ data_manager_json = {"data_tables": {"omamer": [data_manager_entry]}}
# Writes this JSON dictionary to the specified output file
with open(args.json, "w") as fh:
@@ -76,6 +76,7 @@
parser = argparse.ArgumentParser(description='Download data for OMAmer')
parser.add_argument('--name', default='Primates', choices=OMAMER_DATASETS.keys(), help='Select dataset to download')
parser.add_argument('--json', help='Path to JSON file')
+ parser.add_argument("--version", help="Omamer version")
args = parser.parse_args()
diff -r e1502e4f8725 -r 57db282ca204 data_manager/omamer.xml
--- a/data_manager/omamer.xml Wed Feb 21 19:26:53 2024 +0000
+++ b/data_manager/omamer.xml Thu Mar 07 14:28:42 2024 +0000
@@ -1,4 +1,4 @@
-
+
macros.xml
@@ -7,6 +7,7 @@
python '$__tool_directory__/omamer.py'
--name '$name'
--json '$output_file'
+ --version '@TOOL_VERSION@'
]]>
@@ -17,7 +18,7 @@
-
+
@@ -26,15 +27,10 @@
-
+
-
+
10.1093/bioinformatics/btab219
-
\ No newline at end of file
+
diff -r e1502e4f8725 -r 57db282ca204 data_manager/test.json
--- a/data_manager/test.json Wed Feb 21 19:26:53 2024 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-{
- "data_tables": {
- "omamer_data": [
- {
- "name": "Primates-v2.0",
- "path": "database_omamer",
- "value": "Primates-v2.0",
- "version": "2.0.2"
- }
- ]
- }
-}
\ No newline at end of file
diff -r e1502e4f8725 -r 57db282ca204 data_manager_conf.xml
--- a/data_manager_conf.xml Wed Feb 21 19:26:53 2024 +0000
+++ b/data_manager_conf.xml Thu Mar 07 14:28:42 2024 +0000
@@ -6,8 +6,9 @@
-
-
+
+
+
omamer/${value}
${GALAXY_DATA_MANAGER_DATA_PATH}/omamer/${value}
@@ -16,4 +17,4 @@
-
\ No newline at end of file
+
diff -r e1502e4f8725 -r 57db282ca204 test-data/omamer.loc
--- a/test-data/omamer.loc Wed Feb 21 19:26:53 2024 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-# this is a tab separated file describing the location of OMAmer databases used for the
-# OMAmer annotation tool
-#
-# the columns are:
-# value name version path
-#
-# for example
-# Primates-v2.0.0 Primates 2.0.2 /tmp/database/omamer/database_omamer/Primates-v2.0.0
\ No newline at end of file
diff -r e1502e4f8725 -r 57db282ca204 test-data/out.json
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/out.json Thu Mar 07 14:28:42 2024 +0000
@@ -0,0 +1,12 @@
+{
+ "data_tables": {
+ "omamer": [
+ {
+ "name": "Primates-v2.0.0",
+ "path": "Primates-v2.0.0.h5",
+ "value": "Primates-v2.0.0.h5",
+ "version": "2.0.2"
+ }
+ ]
+ }
+}
\ No newline at end of file
diff -r e1502e4f8725 -r 57db282ca204 tool_data_table_conf.xml.test
--- a/tool_data_table_conf.xml.test Wed Feb 21 19:26:53 2024 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-
-
- value, name, version, path
-
-
-
\ No newline at end of file