changeset 0:909a7e8e9b30 draft

planemo upload for repository https://github.com/mvdbeek/gx_symlinks commit 979b3a88f038dbeddcc2c0a59c7b1ca2a181af75
author mvdbeek
date Tue, 29 Nov 2016 10:03:30 -0500
parents
children 46dc0dbd9f04
files symlink_files.xml
diffstat 1 files changed, 54 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/symlink_files.xml	Tue Nov 29 10:03:30 2016 -0500
@@ -0,0 +1,54 @@
+<tool id="symlink_files" name="Symlink Files" version="0.1.3">
+    <requirements>
+    </requirements>
+    <stdio>
+        <exit_code range="1:" />
+    </stdio>
+    <command><![CDATA[
+        #if $__user_email__ not in $__admin_users__:
+            exit 1
+        #end if
+
+        #if $input:
+            mkdir -p '$output_path' &&
+            #if '$input.ext':
+               ln -fs '$input' '$output_path'/'$input.element_identifier'.'$input.ext'
+            #else:
+               ln -fs '$input' '$output_path'/'$input.element_identifier'
+            #end if
+        #end if
+        #if $input_collection:
+            mkdir -p '$output_path'/'$input_collection.name' &&
+            #for $element in $input_collection:
+                ln -fs '$element' '$output_path'/'$input_collection.name'/'$element.element_identifier'.'$element.ext';
+            #end for
+        #end if
+        #if $input_collection_paired:
+            mkdir -p '$output_path'/'$input_collection_paired.name' &&
+            #for $element in $input_collection_paired:
+                ln -fs '$element.forward' '$output_path'/'$input_collection_paired.name'/'$element.element_identifier'-forward.'$element.ext';
+                ln -fs '$element.reverse' '$output_path'/'$input_collection_paired.name'/'$element.element_identifier'-reverse.'$element.ext';
+            #end for
+        #end if
+        #if $input_collection_list_paired:
+            #for $sample in $input_collection_list_paired:
+            mkdir -p '$output_path'/'$input_collection_list_paired.name' &&
+                #for $element in $sample:
+                    ln -fs '$element' '$output_path'/'$input_collection_list_paired.name'/'$sample.name'-$element.element_identifier.'$element.ext';
+                #end for
+            #end for
+        #end if
+    ]]></command>
+<inputs>
+    <param name="input" optional="true" type="data" help="The file you would like to export"/>
+    <param name="input_collection" optional="true" type="data_collection" collection_type="list" help="The collection you would like to export"/>
+    <param name="input_collection_paired" optional="true" type="data_collection" collection_type="paired" help="The collection you would like to export"/>
+    <param name="input_collection_list_paired" optional="true" type="data_collection" collection_type="list:paired" help="The collection you would like to export"/>
+    <param name="output_path" type="text" help="Path to export to"/>
+    </inputs>
+    <outputs>
+    </outputs>
+    <help><![CDATA[
+        Creates symlinks to specified path.
+    ]]></help>
+</tool>