Skip to content

Commit

Permalink
Merge pull request #1529 from BRCAChallenge/fix_circleci
Browse files Browse the repository at this point in the history
Fix circleci
  • Loading branch information
melissacline authored Nov 28, 2024
2 parents 8e32b3a + ede8d0e commit 2881cea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
20 changes: 12 additions & 8 deletions pipeline/clinvar/clinvar_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,17 @@ def findUniqueElement(name, parent):
return(child)



#def build_xpath_filter_for_cv_assertions(gene_symbols):
## symbols_str = [ f'text()="{s}"' for s in gene_symbols] ### HERE
# symbols_pred = ' or '.join(symbols_str)
#
# This function is outdated (11/25/2024), but is currently part of an
# ENIGMA unit test
#
def build_xpath_filter_for_cv_assertions(gene_symbols):
symbols_str = [ f'text()="{s}"' for s in gene_symbols] ### HERE
symbols_pred = ' or '.join(symbols_str)

# filter assertion if it contains a Symbol we are interested in
# return f"ReferenceClinVarAssertion/MeasureSet/Measure/MeasureRelationship/Symbol/ElementValue[({symbols_pred}) and @Type=\"Preferred\"]"
return f"ReferenceClinVarAssertion/MeasureSet/Measure/MeasureRelationship/Symbol/ElementValue[({symbols_pred}) and @Type=\"Preferred\"]"


def extractSynonyms(el):
include_types = {'ProteinChange3LetterCode', 'ProteinChange1LetterCode',
Expand Down Expand Up @@ -89,9 +93,9 @@ def extract_genomic_coordinates_from_location(loc):
)
# if no reference/alternate allele found, compute (assuming genomic coordinates
# are either present for all assemblies or for none)
#if not coords:
# coords = _extract_genomic_coordinates_from_non_genomic_fields(meas_el)
return coords
# if not coords:
# coords = _extract_genomic_coordinates_from_non_genomic_fields(meas_el)
# return coords


def _preprocess_element_value(var_str):
Expand Down
4 changes: 2 additions & 2 deletions pipeline/clinvar/test_clinvar.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_simple_genomic_coordinate_extraction():
</Location>
"""

measure_el = ET.fromstring(sample_measure)
location_el = ET.fromstring(sample_location)

genomic_coords = clinvar_common.extract_genomic_coordinates_from_location(location_el)

Expand All @@ -34,7 +34,7 @@ def test_genomic_coordinate_extraction_from_NM():
"""
measure_el = ET.fromstring(sample_measure)

genomic_coords = clinvar_common.extract_genomic_coordinates_from_measure(measure_el)
genomic_coords = clinvar_common._extract_genomic_coordinates_from_non_genomic_fields(measure_el)

assert genomic_coords[hgvs_utils.HgvsWrapper.GRCh38_Assem] == variant_utils.VCFVariant(13, 32340945, "CTG", "C")

Expand Down

0 comments on commit 2881cea

Please sign in to comment.