From: Diane Trout Date: Fri, 22 Jun 2012 00:23:19 +0000 (-0700) Subject: Add links to libraries and submission to data loaded from dcc indes files X-Git-Tag: v0.5.5~13 X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=18a85d1966a7cf1a48449a5061c492258aba576f Add links to libraries and submission to data loaded from dcc indes files --- diff --git a/encode_submission/encode_find.py b/encode_submission/encode_find.py index 9b65fde..0495d14 100644 --- a/encode_submission/encode_find.py +++ b/encode_submission/encode_find.py @@ -538,6 +538,8 @@ def load_encodedcc_files(model, genome, composite): if file_index is None: return + lib_term = submissionOntology['library_urn'] + sub_term = submissionOntology['submission_urn'] for filename, attributes in file_index.items(): s = RDF.Node(RDF.Uri(filename)) model.add_statement( @@ -546,6 +548,13 @@ def load_encodedcc_files(model, genome, composite): p = RDF.Node(DCC_NS[name]) o = RDF.Node(value) model.add_statement(RDF.Statement(s,p,o)) + if name.lower() == 'labexpid': + model.add_statement( + RDF.Statement(s, lib_term, LIBRARY_NS[value+'/'])) + elif name.lower() == 'subid': + sub_url = RDF.Uri(submission_view_url(value)) + model.add_statement( + RDF.Statement(s, sub_term, sub_url)) def load_library_detail(model, libraryUrn):