Mercurial > repos > nathandunn > biolinkmonarchinitiative
annotate bioentityset-overrepresentation.xml @ 4:49b46f044d48 draft
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
author | nathandunn |
---|---|
date | Mon, 04 Dec 2017 19:35:12 -0500 |
parents | d40860663861 |
children | 6eaaeedf2f37 |
rev | line source |
---|---|
3
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
1 <tool id="monarch-bioentityset-overrepresentation" name="Bioentity Set Get Over Representation" version="0.1.0"> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
2 <macros> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
3 <import>macros.xml</import> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
4 </macros> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
5 <expand macro="frontmatter" /> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
6 <command><![CDATA[ |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
7 #* |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
8 curl --silent -X GET --header 'Accept: application/json' 'https://api-dev.monarchinitiative.org/api/bioentityset/overrepresentation/?object_category=phenotype&subject=NCBIGene%3A6295&subject=NCBIGene%3A1258&subject=NCBIGene%3A3614&subject=NCBIGene%3A26121&subject=NCBIGene%3A7275&subject=NCBIGene%3A55857&subject=NCBIGene%3A79797&subject=NCBIGene%3A10594&subject=NCBIGene%3A64218&subject=NCBIGene%3A7401&ontology=hp&subject_category=gene&taxon=NCBITaxon%3A9606&object_category=phenotype&max_p_value=0.05' > $output |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
9 *# |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
10 #set $subject_string = '' |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
11 #set $subject = $subject.replace(' ', '') |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
12 #set $subject = $subject.replace(',', ' ') |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
13 #for $word in $subject.split(' ') |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
14 #set $subject_string += '&subject='+str($word) |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
15 #end for |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
16 |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
17 #set $background_string = '' |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
18 #set $background = $background.replace(' ', '') |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
19 #set $background = $background.replace(',', ' ') |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
20 #for $word in $background.split(' ') |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
21 #set $background_string += '&background='+str($word) |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
22 #end for |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
23 |
4
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
24 curl --silent -X GET --header 'Accept: application/json' 'https://api-dev.monarchinitiative.org/api/bioentityset/overrepresentation/?object_category=$object_category$subject_string&background=$background_string&ontology=$ontology&subject_category=$subject_category&taxon=$taxon&object_category=$object_category&max_p_value=$max_p_value' > $output_json |
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
25 |
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
26 && |
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
27 |
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
28 echo -e "p\tn\tp_uncorrected\tc" > $output_tsv |
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
29 |
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
30 && |
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
31 |
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
32 cat $output_json | jq -r '.results[] | flatten | @tsv ' >> $output_tsv |
3
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
33 ]]></command> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
34 <inputs> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
35 <param name="object_category" type="text" format="txt" multiple="false" label="CATEGORY of entity at link OBJECT (target), e.g. function, phenotype, disease" /> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
36 <param name="subject" type="text" format="txt" multiple="true" label="Entity ids to be examined, e.g. NCBIGene:6295,NCBIGene:1258 ,NCBIGene:3614 ,NCBIGene:26121 ,NCBIGene:7275 ,NCBIGene:55857 ,NCBIGene:79797 ,NCBIGene:10594 ,NCBIGene:64218 ,NCBIGene:7401" |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
37 /> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
38 <param name="background" type="text" format="txt" multiple="true" label="Entity ids in background set, e.g. NCBIGene:84570, NCBIGene:3630; used in over-representation tests" /> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
39 <param name="ontology" type="text" format="txt" multiple="false" value="hp" label="ontology id. Must be obo id. Examples: go, mp, hp, uberon (optional: will be inferred if left blank)" /> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
40 <param name="subject_category" type="text" format="txt" multiple="false" label="Other types may be used e.g. disease but statistics may not make sense" value="gene"/> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
41 <param name="taxon" type="text" format="txt" multiple="true" label="must be NCBITaxon CURIE. Example: NCBITaxon:9606" /> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
42 <param name="object_category" type="text" format="txt" multiple="false" label="E.g. phenotype, function" value="phenotype" /> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
43 <param name="max_p_value" type="text" format="txt" multiple="false" value="0.05" label="Exclude results with p-value greater than this"/> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
44 </inputs> |
4
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
45 <outputs> |
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
46 <data name="output_json" format="json"/> |
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
47 <data |
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
48 name="output_tsv" |
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
49 format="tsv" |
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
50 header_row="1" |
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
51 > |
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
52 </data> |
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
53 </outputs> |
3
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
54 <tests> |
4
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
55 <!-- |
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
56 |
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
57 emulate: https://api-dev.monarchinitiative.org/api/bioentityset/overrepresentation/ |
3
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
58 ?object_category=phenotype |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
59 subject=NCBIGene%3A6295 |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
60 subject=NCBIGene%3A1258 |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
61 subject=NCBIGene%3A3614 |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
62 subject=NCBIGene%3A26121 |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
63 subject=NCBIGene%3A7275 |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
64 subject=NCBIGene%3A55857 |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
65 subject=NCBIGene%3A79797 |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
66 subject=NCBIGene%3A10594 |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
67 subject=NCBIGene%3A64218 |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
68 subject=NCBIGene%3A7401 |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
69 ontology=hp |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
70 subject_category=gene |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
71 taxon=NCBITaxon%3A9606 |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
72 object_category=phenotype |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
73 max_p_value=0.05--> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
74 <test> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
75 <param name="object_category" value="phenotype"/> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
76 <param name="subject" value="NCBIGene%3A6295,NCBIGene%3A1258,NCBIGene%3A3614,NCBIGene%3A26121,NCBIGene%3A7275,NCBIGene%3A55857,NCBIGene%3A79797,NCBIGene%3A10594,NCBIGene%3A64218,NCBIGene%3A7401"/> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
77 <param name="ontology" value="hp"/> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
78 <param name="subject_category" value="gene"/> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
79 <param name="taxon" value="NCBITaxon:9606"/> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
80 <param name="object_category" value="phenotype"/> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
81 <param name="max_p_value" value="0.05"/> |
4
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
82 <output name="output_json" file="bioentityset-overrepresentation.json"/> |
49b46f044d48
planemo upload commit 0dbcda86caba8f8fead7cb6fde0ae3e73d398f1e
nathandunn
parents:
3
diff
changeset
|
83 <output name="output_tsv" file="bioentityset-overrepresentation.tsv"/> |
3
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
84 </test> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
85 </tests> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
86 <expand macro="citations" /> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
87 </tool> |
d40860663861
planemo upload commit 1a35e82b210719d58263c618f9a67801db26d391
nathandunn
parents:
diff
changeset
|
88 |