diff delete_features.xml @ 0:4dd45d2fd904 draft

planemo upload for repository https://github.com/galaxy-genome-annotation/galaxy-tools/tree/master/tools/apollo commit f745b23c84a615bf434d717c8c0e553a012f0268
author gga
date Mon, 11 Sep 2017 05:46:21 -0400
parents
children 40b26f8269a3
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/delete_features.xml	Mon Sep 11 05:46:21 2017 -0400
@@ -0,0 +1,77 @@
+<?xml version="1.0"?>
+<tool id="delete_features" name="Delete all annotations from an Apollo record" version="1.5" profile="16.04">
+  <description></description>
+  <macros>
+    <import>macros.xml</import>
+  </macros>
+  <expand macro="requirements"/>
+  <code file="webapollo.py"/>
+  <command detect_errors="aggressive"><![CDATA[
+#if str($ask_one) == "yes":
+	## Nope, still don't trust them to not be dumb (or malicious), so we backup first.
+	python $__tool_directory__/export.py
+	@ADMIN_AUTH@
+	@ORG_OR_GUESS@
+	--gff "$gff_out"
+	--fasta "$fasta_out"
+	--json "$json_out"
+
+    &&
+
+	## Now we delete
+	python $__tool_directory__/delete_features.py
+	@ADMIN_AUTH@
+	@ORG_OR_GUESS@
+	"$__user_email__"
+	#if str($filter) != "all"
+		--type $filter
+	#end if
+	> $output;
+#else
+    echo "Nothing to do" > $output;
+#end if
+    ]]></command>
+  <inputs>
+    <expand macro="org_or_guess" />
+    <param name="filter" type="select" label="Feature Type Filter">
+        <option value="all">All</option>
+        <option value="mRNA">Genes</option>
+        <option value="terminator">Terminators</option>
+        <option value="tRNA">tRNAs</option>
+    </param>
+    <param name="ask_one" type="boolean" truevalue="yes" falsevalue="" label="Are you SURE you want to do this?" help="It will PERMANENTLY delete all of the features on this organism."/>
+  </inputs>
+  <outputs>
+    <data format="tabular" name="output" label="Process and Error Log"/>
+
+    <data format="gff3" name="gff_out" label="Annotations from Apollo" hidden="true"/>
+    <data format="fasta" name="fasta_out" label="Sequence(s) from Apollo" hidden="true"/>
+    <data format="json" name="json_out" label="Metadata from Apollo" hidden="true"/>
+  </outputs>
+  <tests>
+      <test expect_failure="true">
+          <conditional name="org_source">
+              <param name="source_select" value="direct"/>
+              <param name="org_raw" value="Test org" />
+          </conditional>
+          <param name="filter" value="all"/>
+          <param name="ask_one" value="yes"/>
+          <expand macro="test_result" />
+      </test>
+  </tests>
+  <help><![CDATA[
+**What it does**
+
+Deletes every single one of the annotations on an organism. Intentionally.
+
+**Why?**
+
+There are legitimate uses for this tool, generally re-opened genomes is a good
+one. Needing to transfer annotations from one build of an organism to another
+(with the same refseq name).
+
+
+@REFERENCES@
+]]></help>
+  <expand macro="citations"/>
+</tool>