# Sequence centering around non-variant position

**URL:** <https://www.alphagenomecommunity.com/t/sequence-centering-around-non-variant-position/873>\
**Category:** Help & Support\
**Created:** [April 28, 2026, 1:30am UTC](https://www.alphagenomecommunity.com/t/sequence-centering-around-non-variant-position/873 "2026-04-28T01:30:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanjana\_Tule](https://yyz2.discourse-cdn.com/watermelon/user_avatar/www.alphagenomecommunity.com/sanjana_tule/32/1136_2.png) [@Sanjana\_Tule](https://www.alphagenomecommunity.com/u/Sanjana_Tule)\
**Post date:** [April 28, 2026, 1:30am UTC](https://www.alphagenomecommunity.com/t/sequence-centering-around-non-variant-position/873/1 "2026-04-28T01:30:11Z")

</div>

Hi,

Is it possible to centre the sequence around a different position other than the variant position?

For e.g., the sequence is centered at position 109441014 and the SNP variant position is at 109433374 and i want to calculate the score across 109448655 to 109477359.

```python
variant = genome.Variant(
            chromosome=str(vcf_row['CHR']),
            position=int(vcf_row['POS']),
            reference_bases=str(vcf_row['REF']),
            alternate_bases=str(vcf_row['ALT']),
            name=vcf_row['ID']
        )
sequence_length = 1048576
sequence_centering = int(str(vcf_row['seq_pos']))
default_interval = variant.reference_interval
interval = type(default_interval)(
                chromosome=default_interval.chromosome,
                start=sequence_centering - (sequence_length // 2),
                end=sequence_centering + (sequence_length // 2),
                strand=default_interval.strand,
                name=default_interval.name)

```

is it ok to do something like this ?

Thanks, Sanjana

---

<div class="post-metadata">

**Author:** ![tward](https://yyz2.discourse-cdn.com/watermelon/user_avatar/www.alphagenomecommunity.com/tward/32/17_2.png) [@tward](https://www.alphagenomecommunity.com/u/tward)\
**Post date:** [April 28, 2026, 2:59pm UTC](https://www.alphagenomecommunity.com/t/sequence-centering-around-non-variant-position/873/2 "2026-04-28T14:59:05Z")

</div>

This should work so long as the variant is within the interval region, though we’ve not thoroughly evaluated the model’s performance for this use-case (there may well be some distal effects if the variant is at the edges of the window).
