@@ -417,57 +417,6 @@ def _from_spdi(self, spdi_expr: str, **kwargs) -> models.Allele | None:
417417
418418 return self ._create_allele (values , ** kwargs )
419419
420- def _to_gnomad (
421- self , vo : models .Allele , namespace : str | None = "refseq" , ** kwargs
422- ) -> list [str ]:
423- """Generate a *list* of gnomAD-style identifiers for VRS Allele.
424-
425- If no alias translations are available, an empty list is
426- returned.
427-
428- If the VRS object cannot be expressed in gnomAD-style, raises ValueError.
429- """
430- sequence = f"ga4gh:{ vo .location .get_refget_accession ()} "
431- aliases = self .data_proxy .translate_sequence_identifier (sequence , namespace )
432- aliases = [a .split (":" )[1 ] for a in aliases ]
433- seq_proxies = {a : SequenceProxy (self .data_proxy , a ) for a in aliases }
434- start , end = vo .location .start , vo .location .end
435- spdi_exprs = []
436-
437- for alias in aliases :
438- # Get the reference sequence
439- seq_proxy = seq_proxies [alias ]
440- ref_seq = seq_proxy [start :end ]
441-
442- if vo .state .type == models .VrsType .REF_LEN_EXPR .value :
443- # Derived from reference. sequence included if under limit, but
444- # we can derive it again from the reference.
445- alt_seq = denormalize_reference_length_expression (
446- ref_seq = ref_seq ,
447- repeat_subunit_length = vo .state .repeatSubunitLength ,
448- alt_length = vo .state .length ,
449- )
450- # Warn if the derived sequence is different from the one in the object
451- if vo .state .sequence and vo .state .sequence .root != alt_seq :
452- _logger .warning (
453- "Derived sequence '%s' is different from provided state.sequence '%s'" ,
454- alt_seq ,
455- vo .state .sequence .root ,
456- )
457- else :
458- alt_seq = vo .state .sequence .root
459-
460- # Optionally allow using the length of the reference sequence
461- # instead of the sequence itself.
462- ref_seq_limit = kwargs .get ("ref_seq_limit" , 0 )
463- if ref_seq_limit is not None and len (ref_seq ) > int (ref_seq_limit ):
464- ref_seq = len (ref_seq )
465-
466- spdi_expr = f"{ alias } :{ start } :{ ref_seq } :{ alt_seq } "
467- spdi_exprs .append (spdi_expr )
468-
469- return spdi_exprs
470-
471420 def _to_hgvs (
472421 self ,
473422 vo : models .Allele ,
0 commit comments