Generate manifest.txt files for submitting to ENCODE3.
[htsworkflow.git] / htsworkflow / templates / trackhub_samples.sparql
index 5930d9f89884aeeaf4c56e6c4e5711f906a50589..19ce7e1d5d7f32d35b88e961c867095104dbde88 100644 (file)
@@ -1,42 +1,27 @@
-PREFIX libraryOntology: <http://jumpgate.caltech.edu/wiki/LibraryOntology#>
+PREFIX htswlib: <http://jumpgate.caltech.edu/wiki/LibraryOntology#>
 PREFIX submissionOntology: <http://jumpgate.caltech.edu/wiki/UcscSubmissionOntology#>
 PREFIX ucscDaf: <http://jumpgate.caltech.edu/wiki/UcscDaf#>
 PREFIX ncbiTaxon: <http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=>
 PREFIX geoSoft: <http://www.ncbi.nlm.nih.gov/geo/info/soft2.html#>
 PREFIX cells: <http://encodewiki.ucsc.edu/EncodeDCC/index.php/Cell_lines#>
+PREFIX encode3: <http://jumpgate.caltech.edu/wiki/Encode3#>
 
-select distinct ?name ?bam ?cell ?antibody ?sex ?control ?strain ?controlId ?library_id ?treatment ?protocol ?readType ?insertLength ?replicate ?mapAlgorithm ?species_name ?taxon_id ?extractMolecule ?growthProtocol ?extractProtocol ?dataProtocol ?tier ?experiment_type ?library_selection ?library_source ?input_quantity
-WHERE {
-  <{{submission}}> a submissionOntology:submission ;
-                   submissionOntology:library ?library ;
-                   submissionOntology:name ?name ;
-                   ucscDaf:has_file ?file .
-  ?file ucscDaf:filename ?bam .
-  OPTIONAL { <{{submission}}> ucscDaf:control ?control }
-  OPTIONAL { <{{submission}}> ucscDaf:controlId ?controlId }
-  OPTIONAL { ?library libraryOntology:antibody ?antibody }
-  OPTIONAL { ?library libraryOntology:cell_line ?cell .
-             OPTIONAL { ?cell_line cells:cell ?cell .
-                        OPTIONAL { ?cell_line cells:documents ?growthProtocol . }
-                        OPTIONAL { ?cell_line cells:tier ?tier . } } }
-  OPTIONAL { ?library ucscDaf:sex ?sex }
-  OPTIONAL { ?library libraryOntology:library_id ?library_id }
-  OPTIONAL { ?library libraryOntology:replicate ?replicate }
-  OPTIONAL { ?library libraryOntology:species ?species_name .
-             ?species libraryOntology:species ?species_name ;
-                      libraryOntology:taxon_id ?taxon_id . }
-  OPTIONAL { ?library libraryOntology:condition_term ?treatment }
-  OPTIONAL { ?library libraryOntology:experiment_type ?experiment_type }
-  OPTIONAL { ?library libraryOntology:librarySelection ?library_selection }
-  OPTIONAL { ?library libraryOntology:librarySource ?library_source }
-  OPTIONAL { <{{submissionSet}}> geoSoft:data_processing ?dataProtocol }
-  OPTIONAL { ?library libraryOntology:extractMolecule ?extractMolecule }
-  OPTIONAL { ?library libraryOntology:extractProtocol ?extractProtocol }
-  OPTIONAL { ?library ucscDaf:protocol ?protocol }
-  OPTIONAL { ?library ucscDaf:readType ?readType }
-  OPTIONAL { ?library ucscDaf:strain ?strain }
-  OPTIONAL { ?library libraryOntology:insert_size ?insertLength }
-  OPTIONAL { ?library libraryOntology:inputQuantity ?input_quantity }
-  OPTIONAL { ?library ucscDaf:mapAlgorithm ?mapAlgorithm }
+select distinct ?lab_library_id ?library_id ?filename ?relative_path ?output_type ?file_type ?cell ?replicate ?assay ?rna_type ?protocol 
 
-}
\ No newline at end of file
+WHERE {
+  ?trackType geoSoft:fileTypeLabel ?file_type ;
+             ucscDaf:output_type ?output_type .
+  ?file ucscDaf:filename ?filename ;
+        ucscDaf:relative_path ?relative_path ;
+        htswlib:library ?library ;
+        a ?trackType .
+  OPTIONAL { ?library htswlib:library_id ?lab_library_id }
+  OPTIONAL { ?library encode3:library_id ?library_id }
+  OPTIONAL { ?library htswlib:cell_line ?cell . }
+  OPTIONAL { ?library htswlib:replicate ?replicate }
+  OPTIONAL { ?library encode3:assay ?assay . }
+  OPTIONAL { ?library encode3:rna_type ?rna_type. }
+  OPTIONAL { ?library encode3:protocol ?protocol. }
+  #OPTIONAL { ?library ucscDaf:readType ?read_type }
+}
+order by ?trackType