comparison monarch-phenopackets.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-phenotypes-for-disease" name="Pull Diseases from Phenotypes" 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://monarchinitiative.org/phenopacket?q=*:*&fq=($inputString)&sfq=subject_category:%22variant%22&personality=variant_phenotype' > $output1
22 ]]></command>
23 <inputs>
24 <param name="input1" type="data" format="tabular" multiple="true" label="Variant"/>
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="json"/>
32 </outputs>
33 <tests>
34 <test>
35 <param name="input1" value="phenotype.tsv"/>
36 <param name="conditional1" value="OR"/>
37 <!--<output name="output1" file="phenotypes-for-variant.json"/>-->
38 <output name="output1">
39 <assert_contents>
40 <has_text text='phenopacket":{"phenotype_profile":[{"entity":"ClinVarVariant:217207"'/>
41 </assert_contents>
42 </output>
43 </test>
44 <test>
45 <param name="input1" value="2-phenotypes.tsv"/>
46 <param name="conditional1" value="AND"/>
47 <!--<output name="output1" file="phenotypes-for-variants-intersection.json"/>-->
48 <output name="output1">
49 <assert_contents>
50 <has_text text='phenopacket":{"phenotype_profile":[{"entity":"ClinVarVariant:217207"'/>
51 </assert_contents>
52 </output>
53 </test>
54 <test>
55 <param name="input1" value="2-phenotypes.tsv"/>
56 <param name="conditional1" value="OR"/>
57 <!--<output name="output1" file="phenotypes-for-variants-union.json"/>-->
58 <output name="output1">
59 <assert_contents>
60 <has_text text='phenopacket":{"phenotype_profile":[{"entity":"ClinVarVariant:217207"'/>
61 </assert_contents>
62 </output>
63 </test>
64 </tests>
65 <help><![CDATA[
66 Pulls phenopacket from data from monarch web services from one or more variants.
67 https://github.com/phenopackets/phenopacket-format/wiki/Getting-Started
68 ]]></help>
69 <citations>
70 <citation type="doi">doi:10.1038/nprot.2015.124</citation>
71 </citations>
72 </tool>