@@ -32,15 +32,15 @@ def normalise(
32
32
if liftover :
33
33
variants = lift (
34
34
scoring_file = scoring_file ,
35
- harmonised = scoring_file .harmonised ,
35
+ harmonised = scoring_file .is_harmonised ,
36
36
current_build = scoring_file .genome_build ,
37
37
target_build = target_build ,
38
38
chain_dir = chain_dir ,
39
39
)
40
40
else :
41
41
variants = scoring_file .variants
42
42
43
- variants = remap_harmonised (variants , scoring_file .harmonised , target_build )
43
+ variants = remap_harmonised (variants , scoring_file .is_harmonised , target_build )
44
44
45
45
if drop_missing :
46
46
variants = drop_hla (variants )
@@ -100,7 +100,7 @@ def check_duplicates(variants):
100
100
def drop_hla (variants ):
101
101
"""Drop HLA alleles from a list of ScoreVariants
102
102
103
- >>> from .scorevariant import ScoreVariant
103
+ >>> from .models import ScoreVariant
104
104
>>> variant = ScoreVariant(**{"effect_allele": "A", "effect_weight": 5, "accession": "test", "row_nr": 0, "chr_name": "1", "chr_position": 1})
105
105
>>> list(drop_hla([variant])) # doctest: +ELLIPSIS
106
106
[ScoreVariant(..., effect_allele=Allele(allele='A', is_snp=True), ...
@@ -127,7 +127,7 @@ def drop_hla(variants):
127
127
def assign_other_allele (variants ):
128
128
"""Check if there's more than one possible other allele, remove if true
129
129
130
- >>> from .scorevariant import ScoreVariant
130
+ >>> from .models import ScoreVariant
131
131
>>> variant = ScoreVariant(**{"chr_position": 1, "rsID": None, "chr_name": "1", "effect_allele": "A", "effect_weight": 5, "other_allele": "A", "row_nr": 0, "accession": "test"})
132
132
>>> list(assign_other_allele([variant]))[0] # doctest: +ELLIPSIS
133
133
ScoreVariant(..., effect_allele=Allele(allele='A', is_snp=True), other_allele=Allele(allele='A', is_snp=True), ...)
@@ -154,7 +154,7 @@ def remap_harmonised(variants, harmonised, target_build):
154
154
In this case chr_name, chr_position, and other allele are missing.
155
155
Perhaps authors submitted rsID and effect allele originally:
156
156
157
- >>> from .scorevariant import ScoreVariant
157
+ >>> from .models import ScoreVariant
158
158
>>> variant = ScoreVariant(**{"chr_position": 1, "rsID": None, "chr_name": "2", "effect_allele": "A", "effect_weight": 5, "accession": "test", "hm_chr": "1", "hm_pos": 100, "hm_rsID": "testrsid", "hm_inferOtherAllele": "A", "row_nr": 0})
159
159
>>> variant
160
160
ScoreVariant(..., effect_allele=Allele(allele='A', is_snp=True), other_allele=None, ...
@@ -184,7 +184,7 @@ def check_effect_allele(variants, drop_missing=False):
184
184
"""
185
185
Odd effect allele:
186
186
187
- >>> from .scorevariant import ScoreVariant
187
+ >>> from .models import ScoreVariant
188
188
>>> variant = ScoreVariant(**{"effect_allele": "Z", "effect_weight": 5, "accession": "test", "row_nr": 0, "chr_name": "1", "chr_position": 1})
189
189
>>> list(check_effect_allele([variant], drop_missing=True)) # doctest: +ELLIPSIS
190
190
[]
0 commit comments