Generate manifest files for ENCODE3
[htsworkflow.git] / htsworkflow / templates / trackhub_manifest.sparql
1 PREFIX htswlib: <http://jumpgate.caltech.edu/wiki/LibraryOntology#>
2 PREFIX submissionOntology: <http://jumpgate.caltech.edu/wiki/UcscSubmissionOntology#>
3 PREFIX ucscDaf: <http://jumpgate.caltech.edu/wiki/UcscDaf#>
4 PREFIX encode3: <http://jumpgate.caltech.edu/wiki/Encode3#> 
5 PREFIX ncbiTaxon: <http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=>
6 PREFIX geoSoft: <http://www.ncbi.nlm.nih.gov/geo/info/soft2.html#>
7 PREFIX cells: <http://encodewiki.ucsc.edu/EncodeDCC/index.php/Cell_lines#>
8
9 select distinct ?name ?filename ?relative_path ?file_format ?output_type ?dataset_id ?replicate ?enriched_in ?ucsc_db
10 WHERE {
11   <{{submission}}> a submissionOntology:submission ;
12                    submissionOntology:name ?name ;
13                    ucscDaf:has_file ?file .
14
15   ?file ucscDaf:filename ?filename ;
16         ucscDaf:relative_path ?relative_path ;
17         htswlib:library ?library ;
18         a ?fileClass .
19
20   ?fileClass geoSoft:fileTypeLabel ?file_format ;
21              ucscDaf:output_type ?output_type .
22   
23   ?library htswlib:replicate ?replicate ;
24            ucscDaf:enriched_in ?enriched_in;
25            ucscDaf:genome_build ?ucsc_db .
26
27   ?library encode3:dataset_id ?dataset_id .
28   # This is lame! why!!!!
29   # ?library2 encode3:dcc_id ?dcc_library_id .
30   # FILTER (?library = ?library2) 
31
32 }