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):
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):
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
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