annotate matrix.xml @ 35:fa736576c7ed draft

planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
author jjkoehorst
date Mon, 04 Jul 2016 10:37:59 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
35
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
1 <tool id="DMatrix" name="MATSPARQL" version="1.0.1">
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
2 <description/>
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
3 <requirements>
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
4 <container type="docker">jjkoehorst/sappdocker:MATRIX</container>
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
5 </requirements>
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
6 <command interpreter="docker">java -jar /sparql/sparqljava-0.0.1-SNAPSHOT-jar-with-dependencies.jar '$separate' '-rdf' '$input' '-format' 'TURTLE' '-query' '$query' '-output' '$output' &amp;&amp; Rscript $__tool_directory__/matrix.R '$output' '$output' </command>
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
7 <inputs>
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
8 <param format="ttl" label="Genome Database" multiple="True" name="input" type="data"/>
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
9 <param area="True" label="SPARQL query" name="query" type="text" value="YOUR QUERY HERE"/>
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
10 <param checked="False" falsevalue="" help="Use this option if you run into memory or performance problems. Each genome will be queried independently of each other and therefor advanced comparison SPARQL queries will not work" label="Treath genomes separately" name="separate" truevalue="-separate" type="boolean"/>
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
11 </inputs>
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
12 <outputs>
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
13 <data format="tsv" label="matrix.tsv" name="output"/>
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
14 </outputs>
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
15 <help>The creation of a matrix from a created SPARQL query. One should use a query that creates 3 columns for the X and Y coordinates and Z for the value.
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
16
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
17 A header for a SPARQL query would look like SELECT ?genome ?protein ?value or SELECT ?genome ?domain (COUNT(?domain) AS ?domainC)
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
18
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
19 -----------------------------
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
20 Genome Interpro Matrix
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
21 -----------------------------
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
22 The following query results in a matrix of genomes by Pfam accessions ::
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
23
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
24 PREFIX biopax:&lt;http://www.biopax.org/release/bp-level3.owl#&gt;
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
25 PREFIX ssb:&lt;http://csb.wur.nl/genome/&gt;
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
26 SELECT DISTINCT ?genome ?id (COUNT(?id) AS ?value)
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
27 WHERE {
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
28 ?genome a ssb:Genome .
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
29 ?genome ssb:dnaobject ?dna .
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
30 ?dna ssb:feature ?feature .
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
31 ?feature ssb:tool ?tool .
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
32 ?feature ssb:protein ?protein .
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
33 ?protein ssb:feature ?domain .
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
34 ?domain ssb:signature ?signature .
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
35 ?signature biopax:xref ?xref .
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
36 ?xref biopax:db 'pfam' .
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
37 ?xref biopax:id ?id .
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
38 } GROUP BY ?genome ?id
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
39
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
40 -------------------
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
41 Enzyme based matrix
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
42 -------------------
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
43
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
44 The following query results in a matrix of genomes by EC numbers ::
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
45
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
46 PREFIX ssb:&lt;http://csb.wur.nl/genome/&gt;
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
47 SELECT ?genome ?ec (COUNT(?ec) AS ?ecCount)
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
48 WHERE {
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
49 ?gene a ssb:Cds .
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
50 ?gene ssb:locus_tag ?locus .
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
51 ?gene ssb:source ?source .
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
52 ?gene ssb:protein ?protein .
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
53 ?protein ssb:feature ?feature .
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
54 {
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
55 ?feature ssb:kegg ?ec .
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
56 } UNION {
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
57 ?feature ssb:ec_number ?ec .
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
58 }
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
59 } GROUP BY ?genome ?ec
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
60
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
61 **If you require specific questions related to the database that you created feel free to contact us.**
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
62 </help>
fa736576c7ed planemo upload commit 16d0bc526ad02361a7c13231d4c50479c42d8d0f-dirty
jjkoehorst
parents:
diff changeset
63 </tool>