From: Diane Trout Date: Mon, 22 Jul 2013 19:16:58 +0000 (-0700) Subject: Add a generator that returns analysis nodes from a result map. X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=d3b89db83b5ab383ddcf56aa155b354902e633e3 Add a generator that returns analysis nodes from a result map. It iterates over the submission directories and returns the fully qualified RDF node for them. --- diff --git a/htsworkflow/submission/submission.py b/htsworkflow/submission/submission.py index 6404435..12a5154 100644 --- a/htsworkflow/submission/submission.py +++ b/htsworkflow/submission/submission.py @@ -57,6 +57,13 @@ class Submission(object): pathname = os.path.abspath(os.path.join(analysis_dir, filename)) self.construct_file_attributes(analysis_dir, libNode, pathname) + def analysis_nodes(self, result_map): + """Return an iterable of analysis nodes + """ + for result_dir in result_map.values(): + an_analysis = self.get_submission_node(result_dir) + yield an_analysis + def construct_file_attributes(self, analysis_dir, libNode, pathname): """Looking for the best extension The 'best' is the longest match