remove some useless debugging print statements
[htsworkflow.git] / htsworkflow / pipelines / bustard.py
index a8eb4c7b7b3d3b6875b2013a5c6737cf40477f83..f1d73eb40fec2ccbe81ccfeb4289285acc0882d5 100644 (file)
@@ -170,7 +170,6 @@ def crosstalk_matrix_from_bustard_config(bustard_path, bustard_config_tree):
             raise RuntimeError('Expected to find MatrixElements in Bustard BaseCallParameters')
         matrix = CrosstalkMatrix(xml=matrix_elements)
 
-    print "matrix:", matrix
     return matrix
 
 class Bustard(object):
@@ -189,7 +188,7 @@ class Bustard(object):
         self.date = date.today()
         self.user = None
         self.phasing = {}
-        self.crosstalk = {}
+        self.crosstalk = None
         self.pathname = None
         self.bustard_config = None
 
@@ -215,10 +214,15 @@ class Bustard(object):
         user.text = self.user
         params = ElementTree.SubElement(root, Bustard.PARAMETERS)
 
+        # add phasing parameters
         for lane in LANE_LIST:
             params.append(self.phasing[lane].get_elements())
-            #params.append(self.crosstalk[lane].get_elements())
-        
+
+        # add crosstalk matrix if it exists
+        if self.crosstalk is not None:
+            root.append(self.crosstalk.get_elements())
+       
+        # add bustard config if it exists
         if self.bustard_config is not None:
             root.append(self.bustard_config)
         return root
@@ -240,6 +244,8 @@ class Bustard(object):
                 for param in element:
                     p = Phasing(xml=param)
                     self.phasing[p.lane] = p
+            elif element.tag == CrosstalkMatrix.CROSSTALK:
+                self.crosstalk = CrosstalkMatrix(xml=element)
             elif element.tag == Bustard.BUSTARD_CONFIG:
                 self.bustard_config = element
             else:
@@ -266,7 +272,6 @@ def bustard(pathname):
     b.user = groups[2]
     b.pathname = pathname
     bustard_config_filename = os.path.join(pathname, 'config.xml')
-    print bustard_config_filename
     paramfiles = glob(os.path.join(pathname, "params?.xml"))
     for paramfile in paramfiles:
         phasing = Phasing(paramfile)