From 93ab150c96e1d975b07ad6436e59e6f126ecf4ca Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Mon, 10 Sep 2012 14:16:08 -0700 Subject: [PATCH] Use the same model for building fastqs as for building soft file (And let user specify a base filename on command line) --- encode_submission/geo_gather.py | 1 + htsworkflow/submission/condorfastq.py | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/encode_submission/geo_gather.py b/encode_submission/geo_gather.py index a290105..5d6bf11 100644 --- a/encode_submission/geo_gather.py +++ b/encode_submission/geo_gather.py @@ -79,6 +79,7 @@ def main(cmdline=None): if opts.fastq: flowcells = os.path.join(opts.sequence, 'flowcells') extractor = CondorFastqExtract(opts.host, flowcells, + model=opts.model, force=opts.force) extractor.create_scripts(results) diff --git a/htsworkflow/submission/condorfastq.py b/htsworkflow/submission/condorfastq.py index aab906b..e48afd5 100644 --- a/htsworkflow/submission/condorfastq.py +++ b/htsworkflow/submission/condorfastq.py @@ -31,6 +31,7 @@ LOGGER = logging.getLogger(__name__) class CondorFastqExtract(object): def __init__(self, host, sequences_path, log_path='log', + model=None, force=False): """Extract fastqs from results archive @@ -42,7 +43,7 @@ class CondorFastqExtract(object): force (bool): do we force overwriting current files? """ self.host = host - self.model = get_model() + self.model = get_model(model) self.sequences_path = sequences_path self.log_path = log_path self.force = force @@ -179,7 +180,7 @@ class CondorFastqExtract(object): flowcell_query =RDF.SPARQLQuery(""" prefix libns: -select distinct ?library ?flowcell ?flowcell_id +select distinct ?flowcell ?flowcell_id WHERE { ?library a libns:library ; libns:has_lane ?lane . @@ -193,9 +194,9 @@ WHERE { flowcell_test = RDF.Statement(r['flowcell'], rdfNS['type'], libraryOntology['illumina_flowcell']) - if not self.model.contains_statement(flowcell_test): - # we probably lack full information about the flowcell. - load_into_model(self.model, 'rdfa', r['flowcell']) + if not self.model.contains_statement(flowcell_test): + # we probably lack full information about the flowcell. + load_into_model(self.model, 'rdfa', r['flowcell']) return flowcell_ids def import_sequences(self, flowcell_ids): -- 2.30.2