3232 get_seqrepo ,
3333 translate_hgvs_to_vrs ,
3434)
35- from dcd_mapping .resource_utils import request_with_backoff
35+ from dcd_mapping .resource_utils import is_missing_value , request_with_backoff
3636from dcd_mapping .schemas import (
3737 AlignmentResult ,
3838 MappedScore ,
@@ -378,7 +378,11 @@ def _map_protein_coding_pro(
378378 :param transcript: The transcript selection information for a score set
379379 :return: VRS mapping object if mapping succeeds
380380 """
381- if row .hgvs_pro in {"_wt" , "_sy" , "NA" } or len (row .hgvs_pro ) == 3 :
381+ if (
382+ row .hgvs_pro in {"_wt" , "_sy" }
383+ or is_missing_value (row .hgvs_pro )
384+ or len (row .hgvs_pro ) == 3
385+ ):
382386 _logger .warning (
383387 "Can't process variant syntax %s for %s" , row .hgvs_pro , row .accession
384388 )
@@ -700,7 +704,7 @@ def _hgvs_nt_is_valid(hgvs_nt: str) -> bool:
700704 :return: True if expression appears populated and valid
701705 """
702706 return (
703- (hgvs_nt != "NA" )
707+ (not is_missing_value ( hgvs_nt ) )
704708 and (hgvs_nt not in {"_wt" , "_sy" , "=" })
705709 and (len (hgvs_nt ) != 3 )
706710 )
@@ -713,7 +717,8 @@ def _hgvs_pro_is_valid(hgvs_pro: str) -> bool:
713717 :return: True if expression appears populated and valid
714718 """
715719 return (
716- (hgvs_pro not in {"_wt" , "_sy" , "NA" })
720+ (hgvs_pro not in {"_wt" , "_sy" })
721+ and (not is_missing_value (hgvs_pro ))
717722 and (len (hgvs_pro ) != 3 )
718723 and ("fs" not in hgvs_pro )
719724 )
0 commit comments