From d3b89db83b5ab383ddcf56aa155b354902e633e3 Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Mon, 22 Jul 2013 12:16:58 -0700 Subject: [PATCH] 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. --- htsworkflow/submission/submission.py | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.30.2