instadeepai / nucleotide-transformer

🧬 Nucleotide Transformer: Building and Evaluating Robust Foundation Models for Human Genomics
https://www.biorxiv.org/content/10.1101/2023.01.11.523679v2
Other
480 stars 55 forks source link

how to deal with the seq position of reference genome? #63

Closed zzzseeu closed 6 months ago

zzzseeu commented 7 months ago

Hi dallatt,

Thanks for your work and providing such a great tool.

I would like to know how you process the sequence position information of the reference genome. I saw in the article that during the data preparation stage, the mutation sequence in the individual from corresponding position was used to replace the tokens of the reference seq. I don't know how this step is implemented because I don't see the input related to position information in your codes.

image

Looking forward to your reply, thanks!

dallatt commented 6 months ago

Hello @zzzseeu ,

This replacement of the tokens is done offline, outside of the model. During the training, a given sequence is sampled from the reference genome and we modify it with the given mutation before tokenizing, and the resulting tokens are fed to the model.

Hope this helps! Hugo