Skip to main content

Schug

Schug 🍲 is a service that gather data about genes, transcripts and exons from multiple sources and merge the information. Clinical Genomics Stockholm is currently maintaining an instance of Schug which can be used for downloading data. Here is the REST API with relevant endpoints.

Test the app using Docker

You can test Schug on your local computer using Docker. Make sure you have Docker installed and type the following commands in a terminal window:

git clone https://github.com/Clinical-Genomics/schug
cd schug
docker compose up

Then the app endpoints should be listed available at the following address http://localhost:8000/docs

The command to stop the demo is docker compose down.

Installation (development)

Make sure poetry is installed

git clone https://github.com/Clinical-Genomics/schug
cd schug
poetry install
schug serve --reload

Go to http://localhost:8000/docs and check out the API.

Ready-to-use endpoints

Once having set up an instance of Schug, you can use the following endpoints:

  • /genes/ensembl_genes/

    Downloads genes from Ensembl in text format. Specify a genome build by using the parameters 37 or 38.

    Usage: curl -X 'GET' 'http://0.0.0.0:8000/genes/ensembl_genes/?build=38' > ensembl_genes_38.txt

  • /transcripts/ensembl_transcripts/

    Downloads gene transcripts from Ensembl in text format. Specify a genome build by using the parameters 37 or 38.

    Usage: curl -X 'GET' 'http://0.0.0.0:8000/transcripts/ensembl_transcripts/?build=38' > ensembl_transcripts_38.txt

  • /exons/ensembl_exons/

    Downloads gene exons from Ensembl in text format. Specify a genome build by using the parameters 37 or 38.

    Usage: curl -X 'GET' 'http://0.0.0.0:8000/exons/ensembl_exons/?build=38' > ensembl_exons_38.txt

Issues While Downloading Genes, Transcripts, or Exons

You might encounter errors while downloading genes, transcripts, or exons, such as the following error:

httpx.RemoteProtocolError: peer closed connection without sending complete message body (incomplete chunked read)

This error often occurs when the external service prematurely closes the connection during data streaming. To address this issue, you can try increasing the max_tries parameter in your request, which otherwise defaults to 5. Increasing the number of retries can help handle intermittent network issues or temporary interruptions from the service.

Here’s an example of how to modify the request:

curl -X 'GET' 'http://0.0.0.0:8000/exons/ensembl_exons/?build=37&max_retries=10' > ensembl_exons_37.txt`

What is left to do?

The basic structure is outlined and implemented, however there are many details left to implement before this can be used. Some of the basic endpoints are in place but these need to be extended according to the needs of the users. Also the gene information needs to be completed, this will be done in a similar fashion as in Scout.

Metadata

Release files for schug 1.14.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for schug 1.14.1
File Size Uploaded
schug-1.14.1.tar.gz 20.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for schug 1.14.1
File Interpreter ABI Platform
schug-1.14.1-py3-none-any.whl Python 3 none any Details

Total release size: 50.7 kB

Release files / schug-1.14.1.tar.gz

Download URL schug-1.14.1.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
43a2d731f237612846a5486ed3565bf5f15401dde08a341fb8164a89c58803c8
BLAKE2b-256 checksum
How to use checksums
8f2171a3eab28f548df4b63a4a4abdd4166fb76412e3991925ab129f6dfd1ced
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.12.3 Linux/6.17.0-1022-azure

Release files / schug-1.14.1-py3-none-any.whl

Download URL schug-1.14.1-py3-none-any.whl
Size 30.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ca2fcaad5dca6a2bc1adf5faac284e258ff348d690c66482cf9ed8c5b42e453
BLAKE2b-256 checksum
How to use checksums
e17fe8cab2c3fa9072f43a424eebba6348337948e258a51df7ab9b8a3e91484b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.12.3 Linux/6.17.0-1022-azure

Release history Release notifications | RSS feed

This release

1.14.1 This release

2 release files

1.13.0

2 release files

1.12.0

2 release files

1.11.0

2 release files

1.10.1

2 release files

1.9.0

2 release files

1.8.0

2 release files

1.7

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.1

2 release files

1.5

2 release files

1.4

2 release files

1.3

2 release files

1.2

2 release files

1.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page