fixed: read correctly the Lanes attribute in Track tag for multiple lanes
authorRami Rauch <rrauch@stanford.edu>
Mon, 4 May 2009 23:12:19 +0000 (23:12 +0000)
committerRami Rauch <rrauch@stanford.edu>
Mon, 4 May 2009 23:12:19 +0000 (23:12 +0000)
htswfrontend/htswfrontend/htsw_reports/libinfopar.py

index 8c5f0c5e60c82eb59030c15c7749193c7ea5d41d..67e8066495037cc80ec1eddd26d3f116601e8b03 100644 (file)
@@ -52,8 +52,8 @@ class LibInfoHandlerByFlowCell(ContentHandler):
       if name == 'Track' and attrs.get('Flowcell',"") == self.searchTerm:
         self.LanesCount += len(attrs.get('Lane',""))
         self.ReadsCount += int(attrs.get('Count',""))
-        self.LaneReadsCount[int(attrs.get('Lane',""))-1] += int(attrs.get('Count',""))
-
+        # this loop is to separate between multiple lanes in one Lane attrbute of a Track tag
+        for l in attrs.get('Lane',""): self.LaneReadsCount[int(l)-1] += int(attrs.get('Count',""))
     except:
       self.Msg = 'failed parsing xml file'
     return