Skip to content

Commit

Permalink
Merge pull request #946 from broadinstitute/ct-empty-barcodes
Browse files Browse the repository at this point in the history
add guardrails for the case where observed barcodes are null
  • Loading branch information
tomkinsc authored Apr 10, 2019
2 parents 27c36ee + 4cdb643 commit 9254e14
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions util/illumina_indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -1803,12 +1803,13 @@ def guess_barcodes_for_sample(self, sample_name):
out_dict["match_type"] = "high_count_novel_pair"
break

out_dict["guessed_barcode_1"] = putative_match[0]
out_dict["guessed_barcode_1_name"] = self.barcode_name_map[putative_match[0]]
if is_dual_index:
out_dict["guessed_barcode_2"] = putative_match[1]
out_dict["guessed_barcode_2_name"] = self.barcode_name_map[putative_match[1]]
out_dict["guessed_barcodes_read_count"] = self.barcodes_seen[(putative_match[0],putative_match[1])]
if putative_match[0]!=None:
out_dict["guessed_barcode_1"] = putative_match[0]
out_dict["guessed_barcode_1_name"] = self.barcode_name_map[putative_match[0]]
if is_dual_index and putative_match[1] != None:
out_dict["guessed_barcode_2"] = putative_match[1]
out_dict["guessed_barcode_2_name"] = self.barcode_name_map[putative_match[1]]
out_dict["guessed_barcodes_read_count"] = self.barcodes_seen[(putative_match[0],putative_match[1])]

return out_dict

Expand Down

0 comments on commit 9254e14

Please sign in to comment.