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