From 18a85d1966a7cf1a48449a5061c492258aba576f Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Thu, 21 Jun 2012 17:23:19 -0700 Subject: [PATCH] Add links to libraries and submission to data loaded from dcc indes files --- encode_submission/encode_find.py | 9 +++++++++ 1 file changed, 9 insertions(+) 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): -- 2.30.2