view jbrowsehubToApollo.xml @ 0:ce4f91831680 draft default tip

planemo upload for repository https://github.com/Yating-L/suite_gonramp_apollo.git commit 5367a00befb467f162d1870edb91f9face72e894
author yating-l
date Fri, 16 Feb 2018 10:57:13 -0500
parents
children
line wrap: on
line source

<tool id="jbrowsehubtoapollo" name="JBrowseHub To Apollo" version="1.0.0">
    <description>
        This Galaxy tool is used to prepare your files to be ready for displaying on Apollo
    </description>

    <requirements>
        <requirement type="package" version="3.0.3">apollo_api</requirement>
    </requirements>

    <stdio>
    </stdio>

    <command detect_errors="exit_code"><![CDATA[
        mkdir -p $output.extra_files_path;
        ## Dump the tool parameters into a JSON file 
        python $json_file parameters.json;
        python $__tool_directory__/jbrowsehubToApollo.py --data_json parameters.json -o $output
    ]]></command>
    <configfiles>
        <configfile name="json_file">
import json
import sys

file_path = sys.argv[1]
#set global data_parameter_dict = {}
#silent $data_parameter_dict.update({"action": str($action)})
#silent $data_parameter_dict.update({"action": str($action)})
#silent $data_parameter_dict.update({"species_name": str($species_name)})
#set apollo_admin = {"user_email": str($admin_username), "password": str($admin_password)}
#silent $data_parameter_dict.update({"apollo_admin": $apollo_admin})
#silent $data_parameter_dict.update({"tool_directory": str($__tool_directory__)})
#silent $data_parameter_dict.update({"extra_files_path": str($output.extra_files_path)})
#slient $data_parameter_dict.update({"jbrowse_hub": str($jbrowse_hub.extra_files_path)})
#silent $data_parameter_dict.update({"port": str($advanced_options.port)})
#silent $data_parameter_dict.update({"debug_mode": str($advanced_options.debug_mode)})
with open(file_path, 'w') as f:
    json.dump($data_parameter_dict, f)
        </configfile>
    </configfiles>


    <inputs>
        <param 
                format="jbrowsehub" 
                type="data"
                name="jbrowse_hub" 
                label="JBrowse Hub created by JBrowse Archive Creator" 
        />

        <param name="action" type="select" label="Choose to create a new organism or overwrite an organism">
            <option value="add" selected="true">Add a new organism to Apollo</option>
            <option value="overwrite">Overwrite an existing organism on Apollo</option>
        </param>
        
        <param
                name="species_name"
                type="text"
                size="30"
                value="unknown"
                label="Species name"
        />

        <param name="admin_username" type="text" label="Admin username" help="Login in with Apollo admin account">
            <sanitizer>
                <valid initial="string.letters,string.digits">
                    <add value="@-=_.()/+*^,:?!"/>
                </valid>
            </sanitizer>
        </param>

        <param
            name="admin_password"
            type="text"
            label="Admin password"
        />

        <conditional name="advanced_options">
            <param name="advanced_options_selector" type="select" label="Advanced options">
                <option value="off" selected="true">Hide advanced options</option>
                <option value="on">Display advanced options</option>
            </param>
            <!-- TODO: Avoid redundancy here -->
            <when value="on">
                <param name="port" type="integer" min="8000" max="8888" value="8080" label="Port number of Apollo" />
                <param name="debug_mode" type="select" label="Activate debug mode"> 
                    <option value="false" selected="true">No</option>
                    <option value="true">Yes</option>
                    <help>
                        Use this option if you are a G-OnRamp developer
                    </help>
                </param>
            </when>
            <when value="off">
                <param name="port" type="hidden" value="8080" />
                <param name="debug_mode" type="hidden"
                       value="false">
                </param>
            </when>
        </conditional>
    </inputs>
    <outputs>
        <data format="html" name="output" label="${tool.name}" />
    </outputs>

    <help>
        This Galaxy tool is used to create or overwrite an organism on an Apollo server with a jbrowse hub created by JBrowse Archive Creator. 
    </help>
    <citations>
    </citations>
</tool>