comparison monarch-pathways-for-genes.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&facet.field=subject_taxon_closure_label&facet.field=object_taxon_closure_label&q=*:*' | tail -n +2 > $output1
22
23
24 ]]></command>
25 <inputs>
26 <param name="input1" type="data" format="tabular" multiple="true" label="Disease" />
27 <param name="conditional1" type="select" multiple="false" display="radio" label="Conditional">
28 <option value="AND">and</option>
29 <option value="OR">or</option>
30 </param>
31 </inputs>
32 <outputs>
33 <data name="output1" type="data" format="tabular" />
34 </outputs>
35 <tests>
36 <test>
37 <param name="input1" value="pathway-gene.tsv"/>
38 <param name="conditional1" value="OR"/>
39 <output name="output1" file="pathways-for-gene.tsv"/>
40 </test>
41 <test>
42 <param name="input1" value="pathway-genes.tsv"/>
43 <param name="conditional1" value="AND"/>
44 <output name="output1" file="pathways-for-genes-intersection.tsv"/>
45 </test>
46 <test>
47 <param name="input1" value="pathway-genes.tsv"/>
48 <param name="conditional1" value="OR"/>
49 <output name="output1" file="pathways-for-genes-union.tsv"/>
50 </test>
51 </tests>
52 <help><![CDATA[
53 Pulls data from monarch web services as TSV given a disease.
54 subject,subject_label,subject_taxon,subject_taxon_label,subject_gene,subject_gene_label,relation,relation_label,object,object_label,evidence,evidence_label,source,is_defined_by,qualifier
55 ]]></help>
56 <citations>
57 <citation type="doi">doi:10.5281/zenodo.56412</citation>
58 </citations>
59 </tool>