view ideas_genome_tracks.xml @ 24:928db0de5ee0 draft

Uploaded
author greg
date Tue, 21 Nov 2017 08:33:53 -0500
parents 048a6d8d26a8
children cd18e6975c1e
line wrap: on
line source

<tool id="ideas_genome_tracks" name="IDEAS genome tracks" version="1.0.0">
    <description></description>
    <requirements>
        <requirement type="package" version="2.4.27">bedops</requirement>
        <requirement type="package" version="1.10.4">r-data.table</requirement>
         <requirement type="package" version="1.4.4">r-optparse</requirement>
         <requirement type="package" version="332">ucsc-bedtobigbed</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
#import re
#set dbkey = None
#set sanitized_hub_name = $re.sub('\s+', '', str($hub_name), flags=re.UNICODE)
#set sanitized_long_label = str($long_label)[:79]
#set sanitized_short_label = str($short_label)[:16]
#if str($__user__.email) == 'None':
    #set email = "foo@bar.net"
#else:
    #set email = $__user__.email
#end if
#set input_dir_para = "input_dir_para"
#set input_dir_state = "input_dir_state"
mkdir $input_dir_para &&
mkdir $input_dir_state &&
mkdir '$output_trackhub.files_path' &&
#for $i in $input:
    #if $dbkey is None:
        #set dbkey = $i.metadata.dbkey
    #end if
    #set filename = $i.file_name
    #set name = $i.name
    #if $name.endswith(".para"):
        ln -s $filename $input_dir_para/$name &&
    #else if $name.endswith(".state"):
        ln -s $filename $input_dir_state/$name &&
    #end if
#end for
Rscript '$__tool_directory__/ideas_genome_tracks.R'
-b $dbkey
-c '$chromInfo'
-e '$email'
-l '$sanitized_long_label'
-n '$hub_name'
-p '$input_dir_para'
-q '$input_dir_state'
-s '$sanitized_short_label'
#if str($set_track_color_cond.set_track_color) == "yes":
    -t $track_color
#end if
-w '$output_trackhub'
-x '$output_trackhub.files_path'
&>/dev/null
    ]]></command>
    <inputs>
        <param name="input" format="txt" type="data_collection" collection_type="list" label="IDEAS files"/>
        <param name="hub_name" type="text" value="" label="Hub name" help="All white space characters will be eliminated">
            <validator type="empty_field"/>
        </param>
        <param name="short_label" type="text" value="short label" label="Short label" help="Limit to 17 characters">
            <validator type="empty_field"/>
        </param>
        <param name="long_label" type="text" value="long label" label="Long label" help="Limit to 80 characters">
            <validator type="empty_field"/>
        </param>
        <conditional name="set_track_color_cond">
            <param name="set_track_color" type="select" label="Specify track color?">
                <option value="no" selected="true">No</option>
                <option value="yes">Yes</option>
            </param>
            <when value="no"/>
            <when value="yes">
                <param name="track_color" type="color" label="Track color"/>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data name="output_trackhub" format="trackhub"/>
    </outputs>
    <tests>
        <test>
        </test>
    </tests>
    <help>
**What it does**

-----

**Required options**
 
    </help>
    <citations>
        <citation type="doi">10.1093/nar/gkw278</citation>
    </citations>
</tool>