comparison monarch-pathways-for-diseases.xml @ 2:3107c58d5c85 draft

planemo upload commit 24de1c1405f1f79859f764da60ba068f2dc88cc6
author nathandunn
date Mon, 27 Jun 2016 09:39:52 -0400
parents
children 52d9016a156f
comparison
equal deleted inserted replaced
1:7ae426ca9054 2:3107c58d5c85
1 <tool id="monarch-variants-for-diseases" name="Pull Variants from Diseases" version="0.1.0">
2 <requirements/>
3 <stdio>
4 <exit_code range="1:" />
5 </stdio>
6 <command><![CDATA[
7 #set conditional = "%20" + str($conditional1) + "%20"
8 #set prefix = "subject_closure:%22"
9 #set suffix = "%22"
10 #set inputString = ""
11 #for inputFile in $input1
12 #set inputs = open(str($inputFile),'r').read().split(",")
13 #for input in $inputs
14 #if $inputString != ""
15 #set inputString = $inputString + $conditional
16 #end if
17 #set inputString = $inputString + $prefix + str($input).strip(' \t\n\r') + $suffix
18 #end for
19 #end for
20
21 curl -s 'https://solr.monarchinitiative.org/solr/golr/select?defType=edismax&qt=standard&indent=on&wt=csv&rows=100000&start=0&fl=object,object_label,relation,relation_label,subject,subject_label,evidence,evidence_label,source,is_defined_by,qualifier&facet=true&facet.mincount=1&facet.sort=count&json.nl=arrarr&facet.limit=25&facet.method=enum&csv.encapsulator=&csv.separator=%09&csv.header=true&csv.mv.separator=%7C&fq=($inputString)&fq=object_category:%22pathway%22&fq=subject_category:%22disease%22&facet.field=subject_taxon_closure_label&facet.field=object_taxon_closure_label&q=*:*'| tail -n +2 > $output1
22 ]]></command>
23 <inputs>
24 <param name="input1" type="data" format="tabular" multiple="true" label="Disease" />
25 <param name="conditional1" type="select" multiple="false" display="radio" label="Conditional">
26 <option value="AND">and</option>
27 <option value="OR">or</option>
28 </param>
29 </inputs>
30 <outputs>
31 <data name="output1" type="data" format="tabular" />
32 </outputs>
33 <tests>
34 <test>
35 <param name="input1" value="disease.tsv"/>
36 <param name="conditional1" value="OR"/>
37 <output name="output1" file="pathways-for-disease.tsv"/>
38 </test>
39 <test>
40 <param name="input1" value="2-diseases-overlap.tsv"/>
41 <param name="conditional1" value="AND"/>
42 <output name="output1" file="pathways-for-diseases-intersection.tsv"/>
43 </test>
44 <test>
45 <param name="input1" value="2-diseases-overlap.tsv"/>
46 <param name="conditional1" value="OR"/>
47 <output name="output1" file="pathways-for-diseases-union.tsv"/>
48 </test>
49 </tests>
50 <help><![CDATA[
51 Pulls pathway data from monarch web services as TSV given a disease.
52 object,object_label,relation,relation_label,subject,subject_label,evidence,evidence_label,source,is_defined_by,qualifier
53 ]]></help>
54 <citations>
55 <citation type="doi">doi:10.5281/zenodo.56412</citation>
56 </citations>
57 </tool>