- logging.debug("Library %s: %d were, %d were not paired" % \
- (lib_info["library_id"], is_paired, isnot_paired))
+ if not self.lib_paired.has_key(lib_id):
+ is_paired = 0
+ isnot_paired = 0
+ failed = 0
+ # check to see if all the flowcells are the same.
+ # otherwise we might need to do something complicated
+ for flowcell in lib_info["lane_set"]:
+ # yes there's also a status code, but this comparison
+ # is easier to read
+ if flowcell["status"].lower() == "failed":
+ # ignore failed flowcell
+ failed += 1
+ pass
+ elif flowcell["paired_end"]:
+ is_paired += 1
+ else:
+ isnot_paired += 1
+
+ logging.debug("Library %s: %d paired, %d single, %d failed" % \
+ (lib_info["library_id"], is_paired, isnot_paired, failed))