This is an AWS Lambda function which takes an image of a genomics visualization and returns a Gosling specification which approximates the input visualization. Most of the code was copied and adapted from AutoGosling.
app.py
is the entry point for the lambda function.
Tested using Python 3.9.
git clone https://github.com/etowahadams/autogosling-aws-lambda.git
cd autogosling-aws-lambda
## Create a virtual environment
python -m venv env
source env/bin/activate
pip install -r requirements.txt
## Download the ONNX model
wget -O best.onnx https://drive.google.com/file/d/1x_e4V9LDgjsZhMWCnONbiQXK4Zfw6t27/view?usp=share_link
This will return the predicted Gosling specification
python3 main.py glyph.png