<jupyter_start><jupyter_text>Original query: NM_004448.3:c.2263_2277del Variation Normalization MANE Transcript: NM_004448.4:c.2263_2277del ClinGene Allele Registry MANE Transcript: NM_004448.4:c.2264_2278del Original query represented as VRS Allele<jupyter_code>interval = models.SimpleInterval(start=2262, end=2277)
location = models.Location(sequence_id='refseq:NM_004448.4', interval=interval)
sstate = models.SequenceState(sequence='')
allele = models.Allele(location=location, state=sstate)
allele.as_dict()<jupyter_output><empty_output><jupyter_text>Copy vrs-python's current normalize method (cds start not included in ival)<jupyter_code>sequence = SequenceProxy(dp, allele.location.sequence_id._value)
ival = (allele.location.interval.start._value, allele.location.interval.end._value)
alleles = (None, allele.state.sequence._value)

new_allele = pjs_copy(allele)
new_ival, new_alleles = _normalize(
    sequence, ival,
    alleles=alleles,
    mode=NormalizationMode.EXPAND,
    anchor_length=0
)
new_ival, new_alleles<jupyter_output><empty_output><jupyter_text>Original query allele object normalized<jupyter_code>new_allele.location.interval.start = new_ival[0]
new_allele.location.interval.end = new_ival[1]
new_allele.state.sequence = new_alleles[1]
new_allele.as_dict()<jupyter_output><empty_output><jupyter_text>Now let's see what happens to the allele when we include cds start site<jupyter_code>cds_start_end = uta.get_cds_start_end('NM_004448.4')
cds_start = cds_start_end[0]
cds_start
new_ival, new_alleles = _normalize(
    sequence, (ival[0] + cds_start, ival[1] + cds_start),
    alleles=alleles,
    mode=NormalizationMode.EXPAND,
    anchor_length=0
)
new_ival, new_alleles
new_allele.location.interval.start = new_ival[0] - cds_start
new_allele.location.interval.end = new_ival[1] - cds_start
new_allele.state.sequence = new_alleles[1]
new_allele.as_dict()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10564853556485355, 'fraction_numerical': 0.04079497907949791, 'mean_word_length': 7.775229357798165, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '513926', 'license': 'MIT', 'n_tokens_mistral': 755, 'n_tokens_neox': 699, 'n_words': 110, 'path': 'analysis/vrs-python normalization.ipynb', 'repo_name': 'cancervariants/variant-normalization', 'size': '1912'}