changeset 13:70d5b154b91f draft

"planemo upload commit 8f9b7580dc80c99bc735ea899819ff1d109de311-dirty"
author diodupima
date Thu, 15 Jul 2021 11:36:17 +0000
parents 061d0b316b13
children b2fb92399590
files README.rst high_order2species.sh ho2s.py txids_dm.xml
diffstat 4 files changed, 10 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/README.rst	Thu Jul 08 12:10:21 2021 +0000
+++ b/README.rst	Thu Jul 15 11:36:17 2021 +0000
@@ -1,4 +1,5 @@
-# COAST's Taxonomic Filters - Data Manager
+COAST's Taxonomic Filters - Data Manager
+________________________________________
 
 This data manager helps an admin provide the galaxy instance users with pre-cached taxonomic filters. This helps increase
 the speed of the queries against larger databases.
--- a/high_order2species.sh	Thu Jul 08 12:10:21 2021 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-CURRENT_DATE=`date +"%Y.%m.%d_%H.%M.%S"`
-high_order=$1
-name=$2
-directory=$PWD
-
-# Get the data
-wget -c ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz
-tar -zxvf taxdump.tar.gz
-
-# Removed indentation so it only has 1 collumn
-taxonkit list --ids $high_order --data-dir $directory \
-  | taxonkit filter --equal-to Species --lower-than Species --save-predictable-norank --data-dir $directory  \
-   > ${name}.txids
--- a/ho2s.py	Thu Jul 08 12:10:21 2021 +0000
+++ b/ho2s.py	Thu Jul 15 11:36:17 2021 +0000
@@ -34,9 +34,8 @@
     subprocess.call(
         f"taxonkit list --ids {taxid} --data-dir {target_directory}" 
         f"| taxonkit filter --equal-to Species --lower-than Species --save-predictable-norank --data-dir {target_directory}" 
-        f"> {data_id}.txids",
-        shell=True,
-        cwd=target_directory
+        f"> {os.path.join(target_directory, data_id)}.txids",
+        shell=True
     )
 
     data_table_entry = {
--- a/txids_dm.xml	Thu Jul 08 12:10:21 2021 +0000
+++ b/txids_dm.xml	Thu Jul 15 11:36:17 2021 +0000
@@ -4,21 +4,19 @@
     <requirements>
         <requirement type="package" version="0.8">taxonkit</requirement>
     </requirements>
-    <command interpreter="python">ho2s.py --file "${out_file}" --tool_data_table_name "coast_taxonomic_filters"</command>
+    <command>python3 ho2s.py --file "${out_file}" --tool_data_table_name "coast_taxonomic_filters"</command>
     <inputs>
-        <param name="taxid" type="integer"  value="" optional="False" label="TAXID for the desired top node" help="Root Taxonomy node."/>
-        <param name="node_name" type="text"  value="" optional="False" label="The name you want for the node" help="Label for the filter."/>
+        <param name="taxid" optional="False" value="" type="integer" label="TAXID for the desired top node" help="Root Taxonomy node."/>
+        <param name="node_name" optional="False" value="" type="text" label="The name you want for the node" help="Label for the filter."/>
     </inputs>
     <outputs>
         <data name="out_file" format="data_manager_json"/>
     </outputs>
     <tests>
         <test>
-            <test>
-                <param name="taxid" value="10239"/>
-                <param name="node_name" value="Virus"/>
-                <output name="out_file" file="out_file.json"/>
-            </test>
+            <param name="taxid" value="10239"/>
+            <param name="node_name" value="Virus"/>
+            <output name="out_file"/>
         </test>
     </tests>
     <help>