annotate monarch-phenopackets.xml @ 7:61d8060bf2ed draft

planemo upload commit cc498cdcd54060998f80018b8f2dc92345adc414
author nathandunn
date Mon, 22 Aug 2016 12:41:24 -0400
parents 307ec8cd152e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
307ec8cd152e planemo upload commit faa030eefa1a86bdf79c4ad1082fd8b5df9efd7a-dirty
nathandunn
parents: 5
diff changeset
1 <tool id="monarch-phenopackets-for-disease" name="Pull Phenotypes as Phenopackets for Diseases" version="0.1.0">
0
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
2 <requirements/>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
3 <stdio>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
4 <exit_code range="1:"/>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
5 </stdio>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
6 <command><![CDATA[
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
7 #set conditional = "%20" + str($conditional1) + "%20"
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
8 #set prefix = "subject_closure:%22"
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
9 #set suffix = "%22"
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
10 #set inputString = ""
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
11 #for inputFile in $input1
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
12 #set inputs = open(str($inputFile),'r').read().split(",")
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
13 #for input in $inputs
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
14 #if $inputString != ""
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
15 #set inputString = $inputString + $conditional
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
16 #end if
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
17 #set inputString = $inputString + $prefix + str($input).strip(' \t\n\r') + $suffix
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
18 #end for
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
19 #end for
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
20
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
21 curl -s 'https://monarchinitiative.org/phenopacket?q=*:*&fq=($inputString)&sfq=subject_category:%22variant%22&personality=variant_phenotype' > $output1
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
22 ]]></command>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
23 <inputs>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
24 <param name="input1" type="data" format="tabular" multiple="true" label="Variant"/>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
25 <param name="conditional1" type="select" multiple="false" display="radio" label="Conditional">
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
26 <option value="AND">and</option>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
27 <option value="OR">or</option>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
28 </param>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
29 </inputs>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
30 <outputs>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
31 <data name="output1" type="data" format="json"/>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
32 </outputs>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
33 <tests>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
34 <test>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
35 <param name="input1" value="phenotype.tsv"/>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
36 <param name="conditional1" value="OR"/>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
37 <!--<output name="output1" file="phenotypes-for-variant.json"/>-->
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
38 <output name="output1">
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
39 <assert_contents>
7
61d8060bf2ed planemo upload commit cc498cdcd54060998f80018b8f2dc92345adc414
nathandunn
parents: 6
diff changeset
40 <has_text text='phenopacket":{"phenotype_profile":[{"entity":"'/>
0
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
41 </assert_contents>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
42 </output>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
43 </test>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
44 <test>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
45 <param name="input1" value="2-phenotypes.tsv"/>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
46 <param name="conditional1" value="AND"/>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
47 <!--<output name="output1" file="phenotypes-for-variants-intersection.json"/>-->
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
48 <output name="output1">
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
49 <assert_contents>
7
61d8060bf2ed planemo upload commit cc498cdcd54060998f80018b8f2dc92345adc414
nathandunn
parents: 6
diff changeset
50 <has_text text='{"phenopacket":{"phenotype_profile":[{"entity":"'/>
0
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
51 </assert_contents>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
52 </output>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
53 </test>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
54 <test>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
55 <param name="input1" value="2-phenotypes.tsv"/>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
56 <param name="conditional1" value="OR"/>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
57 <!--<output name="output1" file="phenotypes-for-variants-union.json"/>-->
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
58 <output name="output1">
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
59 <assert_contents>
7
61d8060bf2ed planemo upload commit cc498cdcd54060998f80018b8f2dc92345adc414
nathandunn
parents: 6
diff changeset
60 <has_text text='{"phenopacket":{"phenotype_profile":[{"entity":"'/>
0
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
61 </assert_contents>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
62 </output>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
63 </test>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
64 </tests>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
65 <help><![CDATA[
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
66 Pulls phenopacket from data from monarch web services from one or more variants.
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
67 https://github.com/phenopackets/phenopacket-format/wiki/Getting-Started
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
68 ]]></help>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
69 <citations>
1
7ae426ca9054 planemo upload commit b538202f822ef9ce7af7f1ff2867dd1455b83725
nathandunn
parents: 0
diff changeset
70 <citation type="doi">doi:10.5281/zenodo.56412</citation>
0
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
71 </citations>
850bb90bd667 planemo upload commit b529f45bf9fecbac1457a65b6b81e3b95200fced
nathandunn
parents:
diff changeset
72 </tool>