Merge branch 'django1.4' of mus.cacr.caltech.edu:htsworkflow into django1.4
authorDiane Trout <diane@caltech.edu>
Mon, 1 Jul 2013 23:02:46 +0000 (16:02 -0700)
committerDiane Trout <diane@caltech.edu>
Mon, 1 Jul 2013 23:02:46 +0000 (16:02 -0700)
encode_submission/trackhub.py
htsworkflow/submission/trackhub.py
htsworkflow/util/schemas/htsworkflow.turtle

index 4fea5cc827eca6ef7aa08c39642e6bd4aa1dac0b..fb0cea8771dcbc25b11dc95654e1e12ed62d2eb9 100644 (file)
@@ -96,7 +96,7 @@ def main(cmdline=None):
         mapper.scan_submission_dirs(results)
 
     if opts.make_hub:
-        mapper.make_hub(results)
+        make_hub(results)
 
     if opts.sparql:
         sparql_query(model, opts.sparql)
@@ -106,6 +106,18 @@ def main(cmdline=None):
         print writer.serialize_model_to_string(model)
 
 
+def make_hub(results):
+    trackdb = mapper.make_hub(results)
+    manifest = mapper.make_manifest(results)
+
+    trackstream = sys.stdout
+    #with open('trackDb.txt', 'w') as trackstream:
+    trackstream.write(trackdb)
+
+    #with open('manifest.txt', 'w') as mainifeststream:
+    manifeststream = sys.stdout
+    mainifeststream.write(mainifest)
+        
 def make_parser():
     parser = OptionParser()
 
index e3087fe37b118d83b02ab00c27256625a200823e..87a52582eb5317afb7c1c3be487a354f05f6ee77 100644 (file)
@@ -39,7 +39,10 @@ class TrackHubSubmission(Submission):
         context = Context({
             'samples': samples,
         })
-        print str(soft_template.render(context))
+        return str(soft_template.render(context))
+
+    def make_mainifest(self, result_map):
+        pass
         
     def get_sample_metadata(self, analysis_node):
         """Gather information for filling out sample section of a SOFT file
@@ -52,4 +55,4 @@ class TrackHubSubmission(Submission):
             })
 
         results = self.execute_query(query_template, context)
-        return results
\ No newline at end of file
+        return results
index 8fe0362d32a33b721d72c112fc7093f80ad34067..1c1c7a7dce0e6a0991a81aa019894c16616ecfbc 100644 (file)
@@ -339,7 +339,7 @@ htswlib:lane_number
     rdfs:comment "Which lane were we run in" ;
     rdfs:label "lane id" ;
     rdfs:domain htswlib:IlluminaLane ;
-    rdfs:range xsd:string .
+    rdfs:range rdfs:Literal .
 
 # FIXME: should this be note?
 htswlib:comment