def import_library(self, library):
"""Import library data into our model if we don't have it already
"""
- q = RDF.Statement(library, rdfNS['type'], libraryOntology['library'])
+ q = RDF.Statement(library, rdfNS['type'], libraryOntology['Library'])
present = False
if not self.model.contains_statement(q):
present = True
select distinct ?flowcell ?flowcell_id
WHERE {
- ?library a libns:library ;
+ ?library a libns:Library ;
libns:has_lane ?lane .
?lane libns:flowcell ?flowcell .
?flowcell libns:flowcell_id ?flowcell_id .
LOGGER.debug("Flowcells = %s" %(unicode(flowcell_ids)))
flowcell_test = RDF.Statement(r['flowcell'],
rdfNS['type'],
- libraryOntology['illumina_flowcell'])
+ libraryOntology['IlluminaFlowcell'])
if not self.model.contains_statement(flowcell_test):
# we probably lack full information about the flowcell.
load_into_model(self.model, 'rdfa', r['flowcell'])
"""Add link between target pathname and the 'lane' that produced it
(note lane objects are now post demultiplexing.)
"""
- target_uri = 'file://' + target
+ target_uri = 'file://' + target.encode('utf-8')
target_node = RDF.Node(RDF.Uri(target_uri))
source_stmt = RDF.Statement(target_node, dcNS['source'], seq.filenode)
self.model.add_statement(source_stmt)