annotate sappDocker/matrix.xml @ 31:957156367442 draft

Uploaded
author jjkoehorst
date Wed, 29 Jun 2016 01:36:58 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
31
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
1 <tool id="DMatrix" name="MATSPARQL" version="1.0.1">
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
2 <description/>
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
3 <requirements>
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
4 <container type="docker">jjkoehorst/sappdocker:MATRIX</container>
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
5 </requirements>
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
6 <command interpreter="docker">java -jar /sparql/target/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>
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
7 <inputs>
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
8 <param format="ttl" label="Genome Database" multiple="True" name="input" type="data"/>
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
9 <param area="True" label="SPARQL query" name="query" type="text" value="YOUR QUERY HERE"/>
957156367442 Uploaded
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"/>
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
11 </inputs>
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
12 <outputs>
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
13 <data format="tsv" label="matrix.tsv" name="output"/>
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
14 </outputs>
957156367442 Uploaded
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.
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
16
957156367442 Uploaded
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)
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
18
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
19 -----------------------------
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
20 Genome Interpro Matrix
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
21 -----------------------------
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
22 The following query results in a matrix of genomes by Pfam accessions ::
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
23
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
24 PREFIX biopax:&lt;http://www.biopax.org/release/bp-level3.owl#&gt;
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
25 PREFIX ssb:&lt;http://csb.wur.nl/genome/&gt;
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
26 SELECT DISTINCT ?genome ?id (COUNT(?id) AS ?value)
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
27 WHERE {
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
28 ?genome a ssb:Genome .
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
29 ?genome ssb:dnaobject ?dna .
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
30 ?dna ssb:feature ?feature .
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
31 ?feature ssb:tool ?tool .
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
32 ?feature ssb:protein ?protein .
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
33 ?protein ssb:feature ?domain .
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
34 ?domain ssb:signature ?signature .
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
35 ?signature biopax:xref ?xref .
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
36 ?xref biopax:db 'pfam' .
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
37 ?xref biopax:id ?id .
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
38 } GROUP BY ?genome ?id
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
39
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
40 -------------------
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
41 Enzyme based matrix
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
42 -------------------
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
43
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
44 The following query results in a matrix of genomes by EC numbers ::
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
45
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
46 PREFIX ssb:&lt;http://csb.wur.nl/genome/&gt;
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
47 SELECT ?genome ?ec (COUNT(?ec) AS ?ecCount)
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
48 WHERE {
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
49 ?gene a ssb:Cds .
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
50 ?gene ssb:locus_tag ?locus .
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
51 ?gene ssb:source ?source .
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
52 ?gene ssb:protein ?protein .
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
53 ?protein ssb:feature ?feature .
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
54 {
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
55 ?feature ssb:kegg ?ec .
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
56 } UNION {
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
57 ?feature ssb:ec_number ?ec .
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
58 }
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
59 } GROUP BY ?genome ?ec
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
60
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
61 **If you require specific questions related to the database that you created feel free to contact us.**
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
62 </help>
957156367442 Uploaded
jjkoehorst
parents:
diff changeset
63 </tool>