Skip to content

sasselab/Tutorial_Finetuning_AlphaGenome

Repository files navigation

Finetuning AlphaGenome in Pytorch

This repository contains a simple tutorial on finetuning AlphaGenome in Pytorch.

alphagenome_tutorial.ipynb notebook covers the following steps:

  1. Loading the pre-trained AlphaGenome and using it to make predictions on a sample input sequence.
  2. Finetuning the new RNA-seq prediction head (human midbrain 8wpc) not seen in the pre-training.
  3. Finetuning the whole model with LORA.
  4. Evaluation of model performance.
  5. Guidelines for further finetuning (different modalities and multi-species training).
  6. Reference to a benchmark of computational requirements for finetuning AlphaGenome.

The Pytorch implementation of AlphaGenome used in this tutorial is made available by the GenomicsxAI community, led primarily by the labs of Anshul Kundaje and Peter Koo, with contributions from other labs and researchers.

Requirements

Please follow the instructions in the AlphaGenome repository to install the required dependencies and set up working environment.

Data

The data used in this tutorial is a single RNA-seq sample of human embryonic midbrain at 8 weeks post conception (8wpc) (from the Kaessmann lab) which was not included in the pre-training of AlphaGenome. bamcoverage.txt contains the command to convert the raw BAM file into a bigWig track used for finetuning.

Genomic intervals used for training and validation are a subset of fold-splits used both in Borzoi and AlphaGenome. homo_sapiens_train.bed and homo_sapiens_valid.bed files contain all regions in fold0, and the respective *subset.bed files contain the first 5000 and 500 regions for finetuning and validation, respectively. This smaller subset was used for the sake of reducing the runtime.

Results

Results are saved in the finetuning_head_output and finetuning_lora_output folders. Checkpoint files are not included in the repository because of their large size.

Updates and improvements

Clone the repo and try things out. If anything is not working as expected, or if you have any suggestions for updates or improvements, please feel free to submit a pull request or open an issue.

        .."`)" `.." `(``..
      .'; _..=. :: `-'._ ;`.
     : ) ;"`':._::_.      ( :.
   .:-"   _.  `"##"` "._   `-:\
  /."   -"`  ._.::._. .'"-   ".:
 : :    ( -: `" :: "` :- )    : )
( .":==._' `'=._##_.='` '_.==: .'
(:  `, `"`    `"##"`    `"` .'`".)
 \`'  `"--.  "- )( -" ..--"`  `-/
 (" (_." =""-..."`...-""= "._) ")
  "..__..-"  )%`..'%(  "-..__.."
       (#"...'\%%%%/`..."#)
        `######`--'######"
          "###")@@(`###"
               \@@/
                )( 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors