https://github.com/clinical-genomics/scout-reviewer-service

A rest service for generating REViewer output.

https://github.com/clinical-genomics/scout-reviewer-service

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.8%) to scientific vocabulary
Last synced: 11 months ago · JSON representation

Repository

A rest service for generating REViewer output.

Basic Info
  • Host: GitHub
  • Owner: Clinical-Genomics
  • Language: Python
  • Default Branch: main
  • Size: 729 KB
Statistics
  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • Open Issues: 8
  • Releases: 2
Created almost 5 years ago · Last pushed 11 months ago
Metadata Files
Readme Changelog

README.md

Scout-REViewer-service

A rest service for generating REViewer output.

Send in json with bam and vcf file references. Get a SVG with graph alignments.

Getting started

To make it run (a bit more) quickly

Run with docker

Setup

bash git clone <project> cd <project>

Create a docker specific env file called .env.docker in the root folder with the following content:

``` HOSTDATA=<absolutepathtohostmachinefolderwithreference_file>

SRS_PORT=5050

REVPATH=/REViewer/build/install/bin/REViewer REVREFPATH=/hostdata/.fasta REVCATALOGPATH=data/catalog_test.json ```

2 changes that needs to be made are:

  1. update the HOST_DATA value to point towards your .fasta reference file. This will be used as default if the user does not provide one.
  2. update the file name in the REV_REF_PATH to match the reference file in your host_data folder

SRS_PORT can be changed to set the port the service exposes.

REVCATALOGPATH can be changed to point to a custom file in the host_data folder but this is not required as one is provided by default.

run

bash env $(cat .env.docker) docker compose up

The crazy env $(cat .env.docker) is because docker compose up does not support an --env-file option like docker run does.

To develop locally

Setup

bash git clone <project> cd <project>

Create an env file called .env. With the following content:

REV_PATH=/Users/<User>/bin/REViewer/build/install/bin/REViewer REV_REF_PATH=../my_host_data/human_g1k_v37_decoy.fasta REV_CATALOG_PATH=data/catalog_test.json

2 changes that needs to be made are:

  1. Update the REV_PATH value to point towards your instance of REViewer. See https://github.com/Illumina/REViewer for installation instructions.
  2. Update the file name in the REV_REF_PATH to point towards a reference file.

REV_CATALOG_PATH can be changed to point to another catalog file but this is not required as one is provided as default.

Then load dependencies and the virtual environment using anaconda or mini-conda:

bash conda env create

Run (development)

bash conda activate Scout-REViewer-service

bash uvicorn main:app --reload

API

Example requests

Notice that the first time REViewer runs with a new reference file it will take a bit longer since it will generate a fasta.fai file. You can avoid this by adding a corresponding (same name, different file extension) fasta.fai file to the same location as your fasta file (or provide one with the API request – TBD) – if you already have one.

files accessible from another server

If running in docker use host.docker.internal instead of localhost to access your own server.

bash curl --location --request POST 'http://127.0.0.1:8000/reviewer' \ --header 'Content-Type: application/json' \ --data-raw '{ "reads": "http://localhost:5010/justhusky_exphun_hugelymodelbat_realigned.bam", "reads_index": "http://localhost:5010/justhusky_exphun_hugelymodelbat_realigned.bam.bai", "vcf": "http://localhost:5010/justhusky_exphun_hugelymodelbat.vcf", "catalog": "http://localhost:5010/catalog_test.json", "locus": "TCF4" }'

files from locally accessible file system

This will avoid copying the files and instead use the already existing files. This is preferred if possible as it should be faster and reduce writes.

bash curl --location --request POST 'http://127.0.0.1:8000/reviewer' \ --header 'Content-Type: application/json' \ --data-raw '{ "reads": "/<path_to_file>/justhusky_exphun_hugelymodelbat_realigned.bam", "reads_index": "/<path_to_file>/justhusky_exphun_hugelymodelbat_realigned.bam.bai", "vcf": "/<path_to_file>/justhusky_exphun_hugelymodelbat.vcf", "catalog": "/<path_to_file>/catalog_test.json", "locus": "TCF4" }'

Docs

Automatically generated API docs can be accessed at http://<server-address>:<port>/docs when running the server. But the content of this README.md is more extensive.

Testing

Needs a .fasta reference file to run. See instructions for .env files above.

pytest

Owner

  • Name: Clinical Genomics
  • Login: Clinical-Genomics
  • Kind: organization
  • Location: Stockholm, Sweden

GitHub Events

Total
  • Create event: 2
  • Release event: 1
  • Issues event: 2
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 15
  • Pull request review event: 1
  • Pull request review comment event: 2
  • Pull request event: 3
Last Year
  • Create event: 2
  • Release event: 1
  • Issues event: 2
  • Delete event: 1
  • Issue comment event: 1
  • Push event: 15
  • Pull request review event: 1
  • Pull request review comment event: 2
  • Pull request event: 3

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 47
  • Total Committers: 2
  • Avg Commits per committer: 23.5
  • Development Distribution Score (DDS): 0.277
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Fredrik Carlsson me@f****o 34
Daniel Nilsson d****n@g****m 13
Committer Domains (Top 20 + Academic)
fc.io: 1

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 11
  • Total pull requests: 2
  • Average time to close issues: 12 minutes
  • Average time to close pull requests: about 2 hours
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • dnil (10)
Pull Request Authors
  • dnil (4)
Top Labels
Issue Labels
Enhancement (7) Effort M (4) Effort S (4) Gain S (4) Gain L (3) Gain M (1) Refactor (1) Future plans (1)
Pull Request Labels

Dependencies

environment.yml conda
  • pip
  • python
  • reviewer
  • trgt
.github/workflows/merge_main.yml actions
  • actions/checkout v2 composite
  • docker/build-push-action v2 composite
  • docker/login-action v1 composite
  • docker/setup-buildx-action v1 composite
.github/workflows/pull_request.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • docker/build-push-action v2 composite
  • docker/login-action v1 composite
  • docker/setup-buildx-action v1 composite
  • jamescurtin/isort-action master composite
  • psf/black stable composite
.github/workflows/release.yml actions
  • actions/checkout v2 composite
  • docker/build-push-action v2 composite
  • docker/login-action v1 composite
  • docker/setup-buildx-action v1 composite
Dockerfile docker
  • continuumio/miniconda3 latest build
docker-compose.yml docker