forked from nathandunn/galaxy-monarch-integration
-
Notifications
You must be signed in to change notification settings - Fork 0
/
monarch-variants-for-phenotypes.xml
58 lines (56 loc) · 2.49 KB
/
monarch-variants-for-phenotypes.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<tool id="monarch-variants-for-phenotypes" name="Pull Variants from Phenotypes" version="0.1.0">
<requirements/>
<stdio>
<exit_code range="1:" />
</stdio>
<command><![CDATA[
#set conditional = "%20" + str($conditional1) + "%20"
#set prefix = "object_closure:%22"
#set suffix = "%22"
#set inputString = ""
#for inputFile in $input1
#set inputs = open(str($inputFile),'r').read().split(",")
#for input in $inputs
#if $inputString != ""
#set inputString = $inputString + $conditional
#end if
#set inputString = $inputString + $prefix + str($input).strip(' \t\n\r') + $suffix
#end for
#end for
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,subject_gene,subject_gene_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:%22variant%22&facet.field=subject_taxon_label&q=*:*' | tail -n +2 > $output1
]]></command>
<inputs>
<param name="input1" type="data" format="tabular" multiple="true" label="Phenotypes" />
<param name="conditional1" type="select" multiple="false" display="radio" label="Conditional">
<option value="AND">and</option>
<option value="OR">or</option>
</param>
</inputs>
<outputs>
<data name="output1" type="data" format="tabular" />
</outputs>
<tests>
<test>
<param name="input1" value="phenotype.tsv"/>
<param name="conditional1" value="OR"/>
<output name="output1" file="variants-for-phenotype.tsv"/>
</test>
<test>
<param name="input1" value="2-phenotypes.tsv"/>
<param name="conditional1" value="AND"/>
<output name="output1" file="variants-for-phenotypes-intersection.tsv"/>
</test>
<test>
<param name="input1" value="2-phenotypes.tsv"/>
<param name="conditional1" value="OR"/>
<output name="output1" file="variants-for-phenotypes-union.tsv"/>
</test>
</tests>
<help><![CDATA[
Pulls data from monarch web services as TSV given a disease..
subject subject_label relation relation_label object object_label evidence evidence_label source is_defined_by qualifier
]]></help>
<citations>
<citation type="doi">doi:10.5281/zenodo.56412</citation>
</citations>
</tool>