Mercurial > repos > mvdbeek > symlink_files
view symlink_files.xml @ 2:301f0997a1da draft default tip
planemo upload for repository https://github.com/mvdbeek/gx_symlinks commit 71625ec1a2b288417d5e47d1e7252620e39c8611
author | mvdbeek |
---|---|
date | Tue, 29 Nov 2016 10:53:10 -0500 |
parents | 46dc0dbd9f04 |
children |
line wrap: on
line source
<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': #if input.ext == 'bam': ln -fs '$input.metadata.bam_index' '$output_path'/'$input.element_identifier'.'$input.ext'.bai && #end if ln -fs \$(readlink '$input') '$output_path'/'$input.element_identifier'.'$input.ext' #else: ln -fs \$(readlink '$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: #if $element.ext == 'bam': ln -fs '$element.metadata.bam_index' '$output_path'/'$input_collection.name'/'$element.element_identifier'.'$element.ext'.bai && #end if ln -fs \$(readlink '$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 \$(readlink '$element.forward') '$output_path'/'$input_collection_paired.name'/'$element.element_identifier'-forward.'$element.ext'; ln -fs \$(readlink '$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 \$(readlink '$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>