# Uploading sequences to AlphaGenome

**URL:** <https://www.alphagenomecommunity.com/t/uploading-sequences-to-alphagenome/303>\
**Category:** Help & Support\
**Created:** [July 1, 2025, 5:35pm UTC](https://www.alphagenomecommunity.com/t/uploading-sequences-to-alphagenome/303 "2025-07-01T17:35:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![CRUZ\_DE\_CASAS\_Paulin](https://yyz2.discourse-cdn.com/watermelon/user_avatar/www.alphagenomecommunity.com/cruz_de_casas_paulin/32/121_2.png) [@CRUZ\_DE\_CASAS\_Paulin](https://www.alphagenomecommunity.com/u/CRUZ_DE_CASAS_Paulin)\
**Post date:** [July 1, 2025, 5:35pm UTC](https://www.alphagenomecommunity.com/t/uploading-sequences-to-alphagenome/303/1 "2025-07-01T17:35:09Z")

</div>

Hi everyone! I am wondering whether it is possible to upload a WT vs a modified sequence (e.g. mutation or missing 500-1000bp) to analyze the gene expression and open chromatin predictions?  
I have been reading the tutorials, quick guide, etc., but I get the impression that I cannot upload the sequence itself?  
Thank you!

---

<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:** [July 2, 2025, 10:09pm UTC](https://www.alphagenomecommunity.com/t/uploading-sequences-to-alphagenome/303/2 "2025-07-02T22:09:27Z")

</div>

Hello,

If you can form the modification as a `Variant` you can make a prediction via [`predict_variant`](https://www.alphagenomedocs.com/api/generated/alphagenome.models.dna_client.DnaClient.html#alphagenome.models.dna_client.DnaClient.predict_variant).  
Otherwise you should be able to use [`predict_sequence`](https://www.alphagenomedocs.com/api/generated/alphagenome.models.dna_client.DnaClient.html#alphagenome.models.dna_client.DnaClient.predict_sequence) to make two predictions (the WT and modified sequence) and then compare and changes in expression. For example:

```python
from alphagenome.models import dna_client

model = dna_client.create('my_key')

reference = 'A' * dna_client.SEQUENCE_LENGTH_2KB
alternate = 'G' * dna_client.SEQUENCE_LENGTH_2KB

ref_predictions = model.predict_sequence(
    reference,
    requested_outputs=[dna_client.OutputType.RNA_SEQ],
    ontology_terms=['UBERON:0001496'],
)

alt_predictions = model.predict_sequence(
    reference,
    requested_outputs=[dna_client.OutputType.RNA_SEQ],
    ontology_terms=['UBERON:0001496'],
)

```

You can then do e.g. `ref_predictions.rna_seq - alt_predictions.rna_seq` to compute the diff.

Hope that helps!

---

<div class="post-metadata">

**Author:** ![CRUZ\_DE\_CASAS\_Paulin](https://yyz2.discourse-cdn.com/watermelon/user_avatar/www.alphagenomecommunity.com/cruz_de_casas_paulin/32/121_2.png) [@CRUZ\_DE\_CASAS\_Paulin](https://www.alphagenomecommunity.com/u/CRUZ_DE_CASAS_Paulin)\
**Post date:** [July 16, 2025, 8:40pm UTC](https://www.alphagenomecommunity.com/t/uploading-sequences-to-alphagenome/303/3 "2025-07-16T20:40:07Z")

</div>

Hi! Thanks a lot for the response 🙂  
I basically have a 500 000 bp sequence as WT and an altered one of 499 600 bp. Shall I just upload them as follows?:  
WT\_reference = “copy paste the 500 000 bp sequence” \* dna\_client.SEQUENCE\_LENGTH\_0.57KB  
P\_altered = “copy paste the 499 600 bp sequence” \* dna\_cliente.SEQUENCE\_LENGTH\_0.49MB

Thanks a lot again!

---

<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:** [July 16, 2025, 10:10pm UTC](https://www.alphagenomecommunity.com/t/uploading-sequences-to-alphagenome/303/4 "2025-07-16T22:10:12Z")

</div>

Not quite: you’ll need to pad the sequence strings to be a supported length, which you can do using Python [string methods](https://docs.python.org/3/library/stdtypes.html#string-methods). So for your example:

```auto
WT_reference = "GATTACA"
WT_reference = WT_reference.center(dna_client.SEQUENCE_LENGTH_500KB, 'N')

P_altered = 'GATTACA'
P_altered = P_altered.center(dna_client.SEQUENCE_LENGTH_500KB, 'N')

```

Will pad the WT and P\_altered references with `N`’s to be a supported 500KB length. You can then make the two predictions and compare using e.g. `OverlaidTracks` (see the [Visualizing predictions — AlphaGenome](https://www.alphagenomedocs.com/colabs/visualization_modality_tour.html) for examples).

---

<div class="post-metadata">

**Author:** ![Riccardo\_Fratti](https://yyz2.discourse-cdn.com/watermelon/user_avatar/www.alphagenomecommunity.com/riccardo_fratti/32/361_2.png) [@Riccardo\_Fratti](https://www.alphagenomecommunity.com/u/Riccardo_Fratti)\
**Post date:** [July 17, 2025, 8:56am UTC](https://www.alphagenomecommunity.com/t/uploading-sequences-to-alphagenome/303/5 "2025-07-17T08:56:51Z")

</div>

Thanks again for your great work! Just a quick clarification:

If I format modifications as `Variant`, is it possible to combine multiple variants _together_ for a single prediction (i.e., one forward pass within same context window)? Or in that case, is it better to use `predict_sequence` instead?

Also, when using `Variant`, does the model still reconstruct the full sequence internally? I assume yes — but if not, is there any known difference in either speed or output performance compared to `predict_sequence`?

Thank you again 🙂

---

<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:** [July 17, 2025, 1:05pm UTC](https://www.alphagenomecommunity.com/t/uploading-sequences-to-alphagenome/303/6 "2025-07-17T13:05:58Z")

</div>

> If I format modifications as `Variant` , is it possible to combine multiple variants _together_ for a single prediction (i.e., one forward pass within same context window)?

No, our variant pipeline can only support single position edits. For more complicated variants, like you said it’s best to use `predict_sequence` which gives you full control of the DNA to pass to the model.

> Also, when using `Variant` , does the model still reconstruct the full sequence internally?

Yes, internally we read the sequence from the organism’s fasta file, apply the variant bases and then run the forward pass twice (for REF and ALT).

There is a subtle difference for splicing, where we use the union of predicted splice site positions and RNA-seq data for the specific interval to generate splice junction predictions, which we can’t do for `predict_sequence` where we don’t know the genomic region. Practically this doesn’t make a huge difference to splicing performance, but just to be aware.
