changeset 0:3d09554c8a47 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/intermine_galaxy_exchange commit 562a034dbd23e37f1a994b1987a7cc0ec08be1a2
author iuc
date Mon, 09 Jul 2018 14:11:23 -0400
parents
children 5673140f2d5a
files intermine_galaxy_exchange.xml test-data/intermine-format-example.tsv
diffstat 2 files changed, 91 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/intermine_galaxy_exchange.xml	Mon Jul 09 14:11:23 2018 -0400
@@ -0,0 +1,88 @@
+<tool id="galaxy_intermine_exchange" name="Create InterMine Interchange" version="0.0.1">
+    <description>Dataset</description>
+    <requirements>
+        <requirement type="package" version="8.25">coreutils</requirement>
+    </requirements>
+    <command detect_errors="exit_code"><![CDATA[
+        awk -F \$'\t' ' {
+        #if str($feature_text):
+        f = "${feature_text}";
+        #else:
+        f = \$${feature_column};
+        #end if
+
+        #if str($feature_id_text):
+        i = "${feature_id_text}";
+        #else:
+        i = \$${feature_id_column};
+        #end if
+
+        #if str($organism_text):
+        o = "${organism_text}";
+        #elif $organism_column:
+        o = \$${organism_column};
+        #else:
+        o= "";
+        #end if
+
+        print f, i, o; } ' OFS=\$'\t' '${input_tabular}' > '${intermine_output}'
+    ]]>
+    </command>
+    <inputs>
+        <param name="input_tabular" type="data" format="txt" multiple="False" optional="False" label="Tabular file"/>
+        <param name="feature_column" type="data_column" data_ref="input_tabular" optional="False" label="Feature Type column" value="1"/>
+        <param name="feature_text" type="text" value="" optional="True" label="Feature Type" help="Optional, will override column selection with static text value"/>
+        <param name="feature_id_column" type="data_column" data_ref="input_tabular" optional="False" label="Feature column Identifier" value="2"/>
+        <param name="feature_id_text" type="text" value="" optional="True" label="Feature Type" help="Optional, will override column selection with static text value"/>
+        <param name="organism_column" type="data_column" data_ref="input_tabular" optional="True" label="Feature column Identifier" value="3"/>
+        <param name="organism_text" type="text" value="" optional="True" label="Feature Type" help="Optional, will override column selection with static text value"/>
+    </inputs>
+    <outputs>
+        <data format="intermine_tabular" name="intermine_output"/>
+    </outputs>
+    <tests>
+        <test>
+            <param name="input_tabular" value="intermine-format-example.tsv" ftype="tabular"/>
+            <param name="feature_column" value="1"/>
+            <param name="feature_id_text" value=""/>
+            <param name="feature_id_column" value="2"/>
+            <param name="feature_text" value=""/>
+            <param name="forganism_column" value="2"/>
+            <param name="organism_text" value=""/>
+            <output name="tabular_output" file="intermine-format-example.tsv" ftype="intermine_tabular"/>
+        </test>
+    </tests>
+    <help>
+        <![CDATA[
+InterMine-Galaxy exchange format
+================================
+This file format exists as an intermediate step to import from Galaxy to InterMines and is not in itself a data format intended to be used for data storage or any purpose apart from Galaxy->InterMine interoperability.
+
+This file has two mandatory columns and one optional column
+
+Column 1 (mandatory)
+--------------------
+**Type of identifier**, e.g. `Gene` or `Protein`. Must be a class in the `InterMine data model`_. Gene or Protein is always a safe option.
+
+Column 2 (mandatory)
+--------------------
+**Identifier** this could be, as an example, a gene symbol like `GATA1` or another other identifier, e.g. `FBGN0000099` or perhaps a protein accession, or some other identifier.
+
+Column 3 (optional)
+-------------------
+**Organism name** - e.g. `H. sapiens` or `Drosophila melanogaster`. This is optional and does not have to be precise, but is good to provide if it is known.
+
+----
+
+For additional information, please see:
+
+- https://github.com/intermine/galaxy-integration/blob/master/intermine-file-format/intermine-format-definition.md
+- https://raw.githubusercontent.com/intermine/galaxy-integration/master/intermine-file-format/intermine-format-example.tsv
+
+.. _InterMine data model: http://intermine.readthedocs.io/en/latest/data-model/model/#a-short-example
+        ]]>
+    </help>
+    <citations>
+        <citation type="doi">10.1093/nar/gku301</citation>
+    </citations>
+</tool>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/intermine-format-example.tsv	Mon Jul 09 14:11:23 2018 -0400
@@ -0,0 +1,3 @@
+Gene	avp	H. Sapiens
+Gene	pparg	H. Sapiens
+Gene	GATA1	H. Sapiens