This repository hosts predictive models for genomics and serves as a model source for Kipoi. Each folder containing the following files is considered to be a single model:
├── dataloader.py # implements the dataloader
├── dataloader.yaml # describes the dataloader
├── dataloader_files/ #/ files required by the dataloader
│ └── ...
├── model.yaml # describes the model
├── model_files/ #/ files required by the model (like weights.h5 and arch.json)
│ └── ...
└── example_files/ #/ small example files used to test the model
└── ...
Folders named *_files
are tracked by Git Large File Storage (LFS). New models are added by simply submitting a pull-request to https://github.com/kipoi/models.
- Install git-lfs
conda install -c conda-forge git-lfs && git lfs install
- alternatively see https://git-lfs.github.com/
- Install kipoi
pip install kipoi
- Run
kipoi ls
(this will checkout thekipoi/models
repo to~/.kipoi/models
)
cd ~/.kipoi/models
- Write the model: Create a new folder
<my new model>
containing all the required files- Option 1: Copy the existing model:
cp -R <existing model> <my new model>
& edit the copied files - Option 2: Run
kipoi init
, answer the questions & edit the created files - Option 3:
mkdir <my new model>
& write all the files from scratch
- Option 1: Copy the existing model:
- Test the model
- Step 1:
kipoi test ~/.kipoi/models/my_new_model
- Step 2:
kipoi test-source kipoi --all -k my_new_model
- Step 1:
- Commit your changes
cd ~/.kipoi/models && git commit -m "Added <my new model>"
- Fork the https://github.com/kipoi/models repo on github (click on the Fork button)
- Add your fork as a git remote to
~/.kipoi/models
cd ~/.kipoi/models && git remote add fork https://github.com/<username>/models.git
- Push to your fork
git push fork master
- Submit a pull-request (click the New pull request button on your github fork -
https://github.com/<username>/models>
)
See docs/contributing getting started and docs/tutorials/contributing/models for more information.
To explore available models, visit http://kipoi.org/models. See kipoi/README.md and docs/using getting started for more information on how to programatically access the models from this repository using CLI, python or R.
This model source (https://github.com/kipoi/models) is included in the Kipoi config file (~/.kipoi/config.yaml
) by default:
# ~/.kipoi/config.yaml
model_sources:
kipoi:
type: git-lfs
remote_url: git@github.com:kipoi/models.git
local_path: ~/.kipoi/models/
If you wish to keep the models stored elsewhere, edit the local_path
accordingly.