From: Diane Trout Date: Fri, 27 Mar 2015 18:05:05 +0000 (-0700) Subject: store flowcell name in the triple store if its known X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=1157f1f50858e58d204747d50e924b82044c193c store flowcell name in the triple store if its known --- diff --git a/htsworkflow/submission/submission.py b/htsworkflow/submission/submission.py index ed4d898..9cd9dc8 100644 --- a/htsworkflow/submission/submission.py +++ b/htsworkflow/submission/submission.py @@ -34,6 +34,7 @@ class Submission(object): self.submissionSet = get_submission_uri(self.name) self.submissionSetNS = RDF.NS(str(self.submissionSet) + '#') self.libraryNS = RDF.NS('{0}/library/'.format(host)) + self.flowcellNS = RDF.NS('{0}/flowcell/'.format(host)) self.__view_map = None @@ -195,6 +196,11 @@ class Submission(object): s = RDF.Statement(fileNode, model_term, toTypedNode(value)) self.model.append(s) + if 'flowcell' in fqname: + value = self.flowcellNS[fqname['flowcell'] + '/'] + s = RDF.Statement(fileNode, libraryOntology['flowcell'], value) + self.model.append(s) + def add_label(self, file_type, file_node, lib_node): """Add rdfs:label to a file node """