comparison monarch-genes-for-diseases.xml @ 0:850bb90bd667 draft

planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
author nathandunn
date Sun, 26 Jun 2016 16:00:28 -0400
parents
children 7ae426ca9054
comparison
equal deleted inserted replaced
-1:000000000000 0:850bb90bd667
1 <tool id="monarch-genes-for-diseases" name="Pull Genes 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 = "object_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=subject,subject_label,subject_taxon,subject_taxon_label,relation,relation_label,object,object_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=subject_category:%22gene%22&fq=object_category:%22disease%22&facet.field=subject_taxon_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="genes-for-diseases.tsv"/>
38 </test>
39 <test>
40 <param name="input1" value="2-diseases.tsv"/>
41 <param name="conditional1" value="OR"/>
42 <output name="output1" file="genes-for-2-diseases.tsv"/>
43 </test>
44 <test>
45 <param name="input1" value="2-diseases.tsv"/>
46 <param name="conditional1" value="AND"/>
47 <output name="output1" file="empty.tsv"/>
48 </test>
49 <test>
50 <param name="input1" value="2-diseases-overlap.tsv"/>
51 <param name="conditional1" value="AND"/>
52 <output name="output1" file="genes-for-2-diseases-intersection.tsv"/>
53 </test>
54 <test>
55 <param name="input1" value="2-diseases-overlap.tsv"/>
56 <param name="conditional1" value="OR"/>
57 <output name="output1" file="genes-for-2-diseases-union.tsv"/>
58 </test>
59 </tests>
60 <help><![CDATA[
61 Pulls data from monarch web services as TSV given a disease.
62 subject,subject_label,subject_taxon,subject_taxon_label,relation,relation_label,object,object_label,evidence,evidence_label,source,is_defined_by,qualifier
63 ]]></help>
64 <citations>
65 <citation type="doi">doi:10.1038/nprot.2015.124</citation>
66 </citations>
67 </tool>