Skip to content

Commit

Permalink
Reverting some code here and there
Browse files Browse the repository at this point in the history
  • Loading branch information
Chiara Rasi committed Jun 14, 2024
1 parent fc00685 commit 371fd5c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scout/build/genes/hgnc_gene.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def build_phenotype(phenotype_info):


def build_hgnc_gene(
gene_info: dict, cytoband_coords: Dict[str, dict], build: str = "37"
gene_info: dict, cytoband_coords: Dict[str, dict] = {}, build: str = "37"
) -> Optional[dict]:
"""Build a hgnc_gene object
Expand Down
6 changes: 3 additions & 3 deletions tests/build/test_build_hgnc_gene.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_build_hgnc_genes(genes):
# WHEN building hgnc gene objecs
for hgnc_id in genes:
gene_info = genes[hgnc_id]
gene_obj = build_hgnc_gene(gene_info=gene_info, cytoband_coords={})
gene_obj = build_hgnc_gene(gene_info)
# THEN check that the gene models have a hgnc id
assert gene_obj["hgnc_id"]

Expand All @@ -23,7 +23,7 @@ def test_build_hgnc_gene():
"start": 1,
"end": 1000,
}
gene_obj = build_hgnc_gene(gene_info=gene_info, cytoband_coords={})
gene_obj = build_hgnc_gene(gene_info)

assert gene_obj["hgnc_id"] == gene_info["hgnc_id"]
assert gene_obj["hgnc_symbol"] == gene_info["hgnc_symbol"]
Expand All @@ -38,4 +38,4 @@ def test_build_hgnc_gene_missing_hgnc_symbol(test_gene, key):
# WHEN deleting a required key
test_gene.pop(key)
# THEN calling build_hgnc_gene() will return None
assert build_hgnc_gene(gene_info=test_gene, cytoband_coords={}) is None
assert build_hgnc_gene(gene_info) is None
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def gene_bulk(genes):
"""Return a list with HgncGene objects"""
bulk = []
for gene_key in genes:
bulk.append(build_hgnc_gene(genes[gene_key], cytoband_coords={}))
bulk.append(build_hgnc_gene(genes[gene_key]))

return bulk

Expand All @@ -249,7 +249,7 @@ def gene_bulk_38(genes):
"""Return a list with HgncGene objects"""
bulk = []
for gene_key in genes:
gene_obj = build_hgnc_gene(genes[gene_key], cytoband_coords={})
gene_obj = build_hgnc_gene(genes[gene_key])
gene_obj["build"] = "38"
bulk.append(gene_obj)

Expand Down

0 comments on commit 371fd5c

Please sign in to comment.