Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: remove structural type from variation descriptor #487

Merged
merged 6 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ def braf_v600e(braf_600loc):
"type": "Allele",
},
"molecule_context": "protein",
"structural_type": "SO:0001606",
"vrs_ref_allele_seq": "V",
"gene_context": "hgnc:1097",
}
Expand Down Expand Up @@ -157,7 +156,6 @@ def vhl_reference_agree():
"type": "Allele",
},
"molecule_context": "protein",
"structural_type": "SO:0002073",
"vrs_ref_allele_seq": "P",
"gene_context": "hgnc:12687",
}
Expand Down Expand Up @@ -187,7 +185,6 @@ def protein_insertion():
"type": "Allele",
},
"molecule_context": "protein",
"structural_type": "SO:0001605",
"gene_context": "hgnc:3236",
}
return VariationDescriptor(**params)
Expand Down Expand Up @@ -218,7 +215,6 @@ def protein_deletion_np_range():
"type": "Allele",
},
"molecule_context": "protein",
"structural_type": "SO:0001604",
"vrs_ref_allele_seq": "LRENT",
"gene_context": "hgnc:3430",
}
Expand Down Expand Up @@ -528,7 +524,6 @@ def braf_amplification(braf_ncbi_seq_loc):
"type": "CopyNumberChange",
},
"molecule_context": "genomic",
"structural_type": "SO:0001880",
"gene_context": "hgnc:1097",
}
return VariationDescriptor(**params)
Expand All @@ -549,7 +544,6 @@ def prpf8_amplification(prpf8_ncbi_seq_loc):
"type": "CopyNumberChange",
},
"molecule_context": "genomic",
"structural_type": "SO:0001880",
"gene_context": "hgnc:17340",
}
return VariationDescriptor(**params)
Expand Down Expand Up @@ -585,9 +579,6 @@ def assertion_checks(normalize_response, test_variation, label, ignore_id=False)
assert (
normalize_response.molecule_context == test_variation.molecule_context
), "molecule_context"
assert (
normalize_response.structural_type == test_variation.structural_type
), "structural_type"
assert (
normalize_response.vrs_ref_allele_seq == test_variation.vrs_ref_allele_seq
), "vrs_ref_allele_seq"
Expand Down
8 changes: 0 additions & 8 deletions tests/test_gnomad_vcf_to_protein.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def mmel1_l30m():
"type": "Allele",
},
"molecule_context": "protein",
"structural_type": "SO:0001606",
"vrs_ref_allele_seq": "L",
"gene_context": "hgnc:14668",
}
Expand Down Expand Up @@ -65,7 +64,6 @@ def cdk11a_e314del():
"type": "Allele",
},
"molecule_context": "protein",
"structural_type": "SO:0001604",
"vrs_ref_allele_seq": "EEEEEEEEEEEEE",
"gene_context": "hgnc:1730",
}
Expand Down Expand Up @@ -95,7 +93,6 @@ def protein_insertion2():
"type": "Allele",
},
"molecule_context": "protein",
"structural_type": "SO:0001605",
"gene_context": "hgnc:6700",
}
return VariationDescriptor(**params)
Expand Down Expand Up @@ -130,7 +127,6 @@ def atad3a_i7v(atad3a_loc):
"type": "Allele",
},
"molecule_context": "protein",
"structural_type": "SO:0001606",
"vrs_ref_allele_seq": "I",
"gene_context": "hgnc:25567",
}
Expand All @@ -151,7 +147,6 @@ def atad3a_i7t(atad3a_loc):
"type": "Allele",
},
"molecule_context": "protein",
"structural_type": "SO:0001606",
"vrs_ref_allele_seq": "I",
"gene_context": "hgnc:25567",
}
Expand All @@ -172,7 +167,6 @@ def atad3a_i7m(atad3a_loc):
"type": "Allele",
},
"molecule_context": "protein",
"structural_type": "SO:0001606",
"vrs_ref_allele_seq": "I",
"gene_context": "hgnc:25567",
}
Expand All @@ -193,7 +187,6 @@ def braf_v600l(braf_600loc):
"type": "Allele",
},
"molecule_context": "protein",
"structural_type": "SO:0001606",
"vrs_ref_allele_seq": "V",
"gene_context": "hgnc:1097",
}
Expand All @@ -214,7 +207,6 @@ def braf_600_reference_agree(braf_600loc):
"type": "Allele",
},
"molecule_context": "protein",
"structural_type": "SO:0001606",
"vrs_ref_allele_seq": "V",
"gene_context": "hgnc:1097",
}
Expand Down
31 changes: 0 additions & 31 deletions tests/test_hgvs_dup_del_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ def genomic_dup1_normalized():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:1000035",
"vrs_ref_allele_seq": "GG",
}
return params
Expand All @@ -38,7 +37,6 @@ def genomic_dup1_not_normalized():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:1000035",
"vrs_ref_allele_seq": "G",
}
return params
Expand Down Expand Up @@ -112,7 +110,6 @@ def genomic_dup1_free_text_normalized():
"variation_id": "",
"variation": dict(),
"molecule_context": "transcript",
"structural_type": "SO:1000035",
"vrs_ref_allele_seq": "GG",
"gene_context": "hgnc:2666",
}
Expand All @@ -128,7 +125,6 @@ def genomic_dup1_free_text_not_normalized():
"variation_id": "",
"variation": dict(),
"molecule_context": "transcript",
"structural_type": "SO:1000035",
"vrs_ref_allele_seq": "G",
"gene_context": "hgnc:2666",
}
Expand Down Expand Up @@ -230,7 +226,6 @@ def genomic_dup2_normalized():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:1000035",
"vrs_ref_allele_seq": "TCTA",
}
return params
Expand All @@ -245,7 +240,6 @@ def genomic_dup2_not_normalized():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:1000035",
"vrs_ref_allele_seq": "TCTA",
}
return params
Expand Down Expand Up @@ -355,7 +349,6 @@ def genomic_dup2_rse2(seq_loc_gt_100_bp, vrs_ref_allele_seq_gt_100_bp):
},
},
"molecule_context": "genomic",
"structural_type": "SO:1000035",
"vrs_ref_allele_seq": vrs_ref_allele_seq_gt_100_bp,
}
return VariationDescriptor(**params)
Expand All @@ -370,7 +363,6 @@ def genomic_dup2_free_text():
"variation_id": "",
"variation": dict(),
"molecule_context": "transcript",
"structural_type": "SO:1000035",
"vrs_ref_allele_seq": "TAGA",
"gene_context": "hgnc:2928",
}
Expand Down Expand Up @@ -453,7 +445,6 @@ def genomic_dup3():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:1000035",
"vrs_ref_allele_seq": None,
}
return params
Expand Down Expand Up @@ -511,7 +502,6 @@ def genomic_dup3_free_text():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:1000035",
"vrs_ref_allele_seq": None,
"gene_context": "hgnc:2928",
}
Expand Down Expand Up @@ -585,7 +575,6 @@ def genomic_dup4():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:1000035",
"vrs_ref_allele_seq": None,
}
return params
Expand Down Expand Up @@ -643,7 +632,6 @@ def genomic_dup4_free_text():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:1000035",
"vrs_ref_allele_seq": None,
"gene_context": "hgnc:17340",
}
Expand Down Expand Up @@ -717,7 +705,6 @@ def genomic_dup5():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:1000035",
"vrs_ref_allele_seq": None,
}
return params
Expand Down Expand Up @@ -785,7 +772,6 @@ def genomic_dup5_free_text():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:1000035",
"vrs_ref_allele_seq": None,
"gene_context": "hgnc:6990",
}
Expand Down Expand Up @@ -830,7 +816,6 @@ def genomic_dup6():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:1000035",
"vrs_ref_allele_seq": None,
}
return params
Expand Down Expand Up @@ -898,7 +883,6 @@ def genomic_dup6_free_text():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:1000035",
"vrs_ref_allele_seq": None,
"gene_context": "hgnc:6990",
}
Expand Down Expand Up @@ -943,7 +927,6 @@ def genomic_del1():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:0000159",
"vrs_ref_allele_seq": "T",
}
return params
Expand Down Expand Up @@ -1015,7 +998,6 @@ def genomic_del1_free_text():
"variation_id": "",
"variation": dict(),
"molecule_context": "transcript",
"structural_type": "SO:0000159",
"vrs_ref_allele_seq": "T",
"gene_context": "hgnc:12687",
}
Expand Down Expand Up @@ -1096,7 +1078,6 @@ def genomic_del2():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:0000159",
"vrs_ref_allele_seq": "ATGTTGACGGACAGCCTAT",
}
return params
Expand Down Expand Up @@ -1133,7 +1114,6 @@ def genomic_del2_lse2(seq_loc_gt_100_bp, vrs_ref_allele_seq_gt_100_bp):
},
},
"molecule_context": "genomic",
"structural_type": "SO:0000159",
"vrs_ref_allele_seq": vrs_ref_allele_seq_gt_100_bp,
}
return VariationDescriptor(**params)
Expand Down Expand Up @@ -1191,7 +1171,6 @@ def genomic_del2_free_text():
"variation_id": "",
"variation": dict(),
"molecule_context": "transcript",
"structural_type": "SO:0000159",
"vrs_ref_allele_seq": "ATGTTGACGGACAGCCTAT",
"gene_context": "hgnc:12687",
}
Expand Down Expand Up @@ -1274,7 +1253,6 @@ def genomic_del3():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:0000159",
"vrs_ref_allele_seq": None,
}
return params
Expand Down Expand Up @@ -1332,7 +1310,6 @@ def genomic_del3_free_text():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:0000159",
"vrs_ref_allele_seq": None,
"gene_context": "hgnc:3226",
}
Expand Down Expand Up @@ -1406,7 +1383,6 @@ def genomic_del4():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:0000159",
"vrs_ref_allele_seq": None,
}
return params
Expand Down Expand Up @@ -1464,7 +1440,6 @@ def genomic_del4_free_text():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:0000159",
"vrs_ref_allele_seq": None,
"gene_context": "hgnc:2206",
}
Expand Down Expand Up @@ -1564,7 +1539,6 @@ def genomic_uncertain_del_2():
"type": "CopyNumberChange",
},
"molecule_context": "genomic",
"structural_type": "SO:0000159",
}
return VariationDescriptor(**params)

Expand Down Expand Up @@ -1600,7 +1574,6 @@ def genomic_uncertain_del_y():
"type": "CopyNumberChange",
},
"molecule_context": "genomic",
"structural_type": "SO:0000159",
}
return VariationDescriptor(**params)

Expand All @@ -1614,7 +1587,6 @@ def genomic_del5():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:0000159",
"vrs_ref_allele_seq": None,
}
return params
Expand Down Expand Up @@ -1682,7 +1654,6 @@ def genomic_del5_free_text():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:0000159",
"vrs_ref_allele_seq": None,
"gene_context": "hgnc:11411",
}
Expand Down Expand Up @@ -1727,7 +1698,6 @@ def genomic_del6():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:0000159",
"vrs_ref_allele_seq": None,
}
return params
Expand Down Expand Up @@ -1795,7 +1765,6 @@ def genomic_del6_free_text():
"variation_id": "",
"variation": dict(),
"molecule_context": "genomic",
"structural_type": "SO:0000159",
"vrs_ref_allele_seq": None,
"gene_context": "hgnc:3522",
}
Expand Down
Loading