view associations.xml @ 5:6eaaeedf2f37 draft default tip

planemo upload commit 469f80a2162a7284b6299615caf6aee64bb34167
author nathandunn
date Mon, 04 Dec 2017 21:50:52 -0500
parents 88e1bd76b069
children
line wrap: on
line source

<tool id="monarch-associations" name="Associations" version="0.1.0">
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="frontmatter" />
    <command><![CDATA[
	#if $type == 'find'
        curl --silent -X GET --header 'Accept: application/json' 'https://api.monarchinitiative.org/api/association/$type/?rows=$rows&fetch_objects=true&subject=$subject' > $output
	#else if $type == 'from'
        curl --silent -X GET --header 'Accept: application/json' 'https://api.monarchinitiative.org/api/association/$type/$subject?rows=$rows&fetch_objects=true' > $output
	#else if $type == 'to'
        curl --silent -X GET --header 'Accept: application/json' 'https://api.monarchinitiative.org/api/association/$type/$object?rows=$rows&fetch_objects=true' > $output
	#else if $type == 'between'
        curl --silent -X GET --header 'Accept: application/json' 'https://api.monarchinitiative.org/api/association/$type/$subject/$object?rows=$rows&fetch_objects=true' > $output
	#end if
	]]></command>
    <inputs>
        <param name="subject" type="text" format="txt" multiple="false" label="Subject"/>
        <param name="object" type="text" format="txt" multiple="false" label="Object"/>
        <param name="type" type="select" multiple="false" display="radio" label="Type">
            <option value="find">Find (subject)</option>
            <option value="from">From (subject)</option>
            <option value="to">To (object)</option>
            <option value="between">Between (subject -> object)</option>
        </param>
        <param name="rows" type="text" format="txt" multiple="false" value="1000" label="Num Rows"/>
    </inputs>
    <expand macro="outputs" />
    <tests>
        <test>
            <param name="subject" value="NCBIGene:84570"/>
            <param name="type" value="find"/>
            <output name="output" file="find-associations-for-subject.json"/>
        </test>
        <test>
            <param name="subject" value="NCBIGene:84570"/>
            <param name="type" value="from"/>
            <output name="output" file="from-associations-for-subject.json"/>
        </test>
        <test>
            <param name="object" value="MP:0013765"/>
            <param name="type" value="to"/>
            <output name="output" file="to-associations-for-object.json"/>
        </test>
        <test>
            <param name="subject" value="MGI:1342287"/>
            <param name="object" value="MP:0013765"/>
            <param name="type" value="between"/>
            <output name="output" file="between-associations.json"/>
        </test>
    </tests>
    <expand macro="citations" />
</tool>