Some of the older flow cells used a default genome for eland instead
authorDiane Trout <diane@caltech.edu>
Thu, 29 May 2008 00:01:50 +0000 (00:01 +0000)
committerDiane Trout <diane@caltech.edu>
Thu, 29 May 2008 00:01:50 +0000 (00:01 +0000)
of specifying the genome path for each lane.

This patch will look up in the chipwidedefaults for the eland_genome if
it isn't found in the lane specific parameters

gaworkflow/pipeline/gerald.py
gaworkflow/pipeline/runfolder.py

index 1a6bce18cff7eb45f217bbb8133faaa39a8250d3..f4f0cbc397075a111ac4f9a93aa187ca1eb6cedf 100644 (file)
@@ -36,12 +36,12 @@ class Gerald(object):
         def __get_attribute(self, xml_tag):
             subtree = self._gerald.tree.find('LaneSpecificRunParameters')
             container = subtree.find(xml_tag)
-            if container is None or \
-               len(container.getchildren()) != LANES_PER_FLOWCELL:
+            if container is None:
+                return None
+            if len(container.getchildren()) != LANES_PER_FLOWCELL:
                 raise RuntimeError('GERALD config.xml file changed')
             lanes = [x.tag.split('_')[1] for x in container.getchildren()]
             index = lanes.index(self._key)
-            #element = container.find(self._key)
             element = container[index]
             return element.text
         def _get_analysis(self):
@@ -49,7 +49,14 @@ class Gerald(object):
         analysis = property(_get_analysis)
 
         def _get_eland_genome(self):
-            return self.__get_attribute('ELAND_GENOME')
+            genome = self.__get_attribute('ELAND_GENOME')
+            # default to the chipwide parameters if there isn't an
+            # entry in the lane specific paramaters
+            if genome is None:
+                subtree = self._gerald.tree.find('ChipWideRunParameters')
+                container = subtree.find('ELAND_GENOME')
+                genome = container.text
+            return genome
         eland_genome = property(_get_eland_genome)
 
         def _get_read_length(self):
index 1219627c2c3c5152bd8049234431f96ebc791647..19962b1d0e6e42247c57e80bdca7117736aca890 100644 (file)
@@ -33,7 +33,7 @@ class PipelineRun(object):
     FLOWCELL_ID = 'FlowcellID'
 
     def __init__(self, pathname=None, firecrest=None, bustard=None, gerald=None, xml=None):
-        self.pathname = pathname
+        self.pathname = os.path.normpath(pathname)
         self._name = None
         self._flowcell_id = None
         self.firecrest = firecrest
@@ -60,7 +60,7 @@ class PipelineRun(object):
               flowcell_id = 'unknown'
               
            logging.warning(
-             "Flowcell idwas not found, guessing %s" % (
+             "Flowcell id was not found, guessing %s" % (
                 flowcell_id))
            self._flowcell_id = flowcell_id
         return self._flowcell_id