Skip to content

Commit

Permalink
Merge pull request #10235 from sowmiyaa-kumar/patch-1
Browse files Browse the repository at this point in the history
Fixed an error in naming alleles for the mutation file checks in SNP, DNP, and TNP
  • Loading branch information
dippindots authored Sep 6, 2023
2 parents f4f5b1c + 18be7e2 commit 49423ce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/main/scripts/importer/validateData.py
Original file line number Diff line number Diff line change
Expand Up @@ -1928,23 +1928,23 @@ def checkAlleleMAFFormat(self, data):

if variant_type == "SNP":
# Expect alleles to have length 2 when variant type is SNP
if not (len(ref_allele) == 1 and len(tumor_seq_allele1) == 1 and len(tumor_seq_allele1) == 1):
if not (len(ref_allele) == 1 and len(tumor_seq_allele1) == 1 and len(tumor_seq_allele2) == 1):
log_message = "Variant_Type indicates a SNP, but length of Reference_Allele, Tumor_Seq_Allele1 " \
"and/or Tumor_Seq_Allele2 do not equal 1."
extra_dict = {'line_number': self.line_number,
'cause': '(%s, %s, %s)' % (ref_allele, tumor_seq_allele1, tumor_seq_allele2)}
self.send_log_message(self.strict_maf_checks, log_message, extra_dict)
if variant_type == "DNP":
# Expect alleles to have length 2 when variant type is DNP
if not (len(ref_allele) == 2 and len(tumor_seq_allele1) == 2 and len(tumor_seq_allele1) == 2):
if not (len(ref_allele) == 2 and len(tumor_seq_allele1) == 2 and len(tumor_seq_allele2) == 2):
log_message = "Variant_Type indicates a DNP, but length of Reference_Allele, Tumor_Seq_Allele1 " \
"and/or Tumor_Seq_Allele2 do not equal 2."
extra_dict = {'line_number': self.line_number,
'cause': '(%s, %s, %s)' % (ref_allele, tumor_seq_allele1, tumor_seq_allele2)}
self.send_log_message(self.strict_maf_checks, log_message, extra_dict)
if variant_type == "TNP":
# Expect alleles to have length 3 when variant type is TNP
if not (len(ref_allele) == 3 and len(tumor_seq_allele1) == 3 and len(tumor_seq_allele1) == 3):
if not (len(ref_allele) == 3 and len(tumor_seq_allele1) == 3 and len(tumor_seq_allele2) == 3):
log_message = "Variant_Type indicates a TNP, but length of Reference_Allele, Tumor_Seq_Allele1 " \
"and/or Tumor_Seq_Allele2 do not equal 3."
extra_dict = {'line_number': self.line_number,
Expand Down

0 comments on commit 49423ce

Please sign in to comment.