Skip to main content

Clinical DNA variant visualizer and browser.

Project description

Analyze VCFs and collaborate on solving rare diseases quicker

Build Status PyPI Version Coverage Status GitHub issues-closed Average time to resolve an issue Percentage of issues still open GitHub commits

What is Scout?

  • Simple - Analyze variants in a simple to use web interface.
  • Aggregation - Combine results from multiple analyses and VCFs into a centralized database.
  • Collaboration - Write comments and share cases between users and institutes.

Documentation

This README only gives a brief overview of Scout, for a more complete reference, please check out our docs: www.clinicalgenomics.se/scout.

Installation

git clone https://github.com/Clinical-Genomics/scout
cd scout
pip install --requirement requirements.txt --editable .

Scout PDF reports are created using Flask-WeasyPrint. This library requires external dependencies which need be installed separately (namely Cairo and Pango). See platform-specific instructions for Linux, macOS and Windows available on the WeasyPrint installation pages.

You also need to have an instance of MongoDB running. I've found that it's easiest to do using the official Docker image:

docker run --name mongo -p 27017:27017 mongo

Usage

Demo

Once installed, you can setup Scout by running a few commands using the included command line interface. Given you have a MongoDB server listening on the default port (27017), this is how you would setup a fully working Scout demo:

scout setup demo

This will setup an instance of scout with a database called scout-demo. Now run

scout --demo serve

And play around with the interface. A user has been created with email clark.kent@mail.com so use that adress to get access

Initialize scout

To initialize a working instance with all genes, diseases etc run

scout setup database

for more info, run scout --help

If you intent to use authentication, make sure you are using a Google email!

The previous command setup the database with a curated collection of gene definitions with links to OMIM along with HPO phenotype terms. Now we will load some example data. Scout expects the analysis to be accomplished using various gene panels so let's load one and then our first analysis case:

scout load panel scout/demo/panel_1.txt
scout load case scout/demo/643594.config.yaml

Integration with chanjo for coverage report visualization

Scout may be configured to visualize coverage reports produced by Chanjo. Instructions on how to enable this feature can be found in the document chanjo_coverage_integration.

Server setup

Scout needs a server config to know which databases to connect to etc. Depending on which information you provide you activate different parts of the interface automatically, including user authentication, coverage, and local observations.

This is an example of the config file:

# scoutconfig.py

# list of email addresses to send errors to in production
ADMINS = ['paul.anderson@magnolia.com']

MONGO_HOST = 'localhost'
MONGO_PORT = 27017
MONGO_DBNAME = 'scoutTest'
MONGO_USERNAME = 'testUser'
MONGO_PASSWORD = 'testPass'

# enable user authentication using Google OAuth
GOOGLE = dict(
		consumer_key='CLIENT_ID',
		consumer_secret='CLIENT_SECRET',
		base_url='https://www.googleapis.com/oauth2/v1/',
		authorize_url='https://accounts.google.com/o/oauth2/auth',
		request_token_url=None,
		request_token_params={
				'scope': ("https://www.googleapis.com/auth/userinfo.profile "
						  "https://www.googleapis.com/auth/userinfo.email"),
		},
		access_token_url='https://accounts.google.com/o/oauth2/token',
		access_token_method='POST'
)

# enable Phenomizer gene predictions from phenotype terms
PHENOMIZER_USERNAME = '???'
PHENOMIZER_PASSWORD = '???'

# enable Chanjo coverage integration
SQLALCHEMY_DATABASE_URI = '???'
REPORT_LANGUAGE = 'en'  # or 'sv'

# other interesting settings
SQLALCHEMY_TRACK_MODIFICATIONS = False  # this is essential in production
TEMPLATES_AUTO_RELOAD = False  			# consider turning off in production
SECRET_KEY = 'secret key'               # override in production!

Starting the server in now really easy, for the demo and local development we will use the CLI:

scout serve --config ./config.py

Scout Interface demo

Hosting a production server

When running the server in production you will likely want to use a proper Python server solution such as Gunicorn. This is also how we can multiprocess the server and use encrypted HTTPS connections.

SCOUT_CONFIG=./config.py gunicorn --workers 4 --bind 0.0.0.0:8080 --access-logfile - --error-logfile - --keyfile /tmp/myserver.key --certfile /tmp/server.crt wsgi_gunicorn:app

The wsgi_gunicorn.py file is included in the repo and configures Flask to work with Gunicorn.

Integration with MatchMaker Exchange

Starting from release 4.4, Scout offers integration for patient data sharing via MatchMaker Exchange. General info about MatchMaker and patient matching could be found in this paper.
For a technical guideline of our implementation of MatchMaker Exchange at Clinical Genomics and its integration with Scout follow this link.
A user-oriented guide describing how to share case and variant data to MatchMaker using Scout can be found here.

Example of analysis config

TODO.

Contributing to Scout

If you want to contribute and make Scout better, you help is very appreciated! Bug reports or feature requests are really helpful and can be submitted via github issues. Feel free to open a pull request to add a new functionality or fixing a bug, we welcome any help, regardless of the amount of code provided or your skills as a programmer. More info on how to contribute to the project and a description of the Scout branching workflow can be found here.

Project details


Release history Release notifications | RSS feed

This version

4.11

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scout-browser-4.11.tar.gz (4.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scout_browser-4.11-py2.py3-none-any.whl (4.3 MB view details)

Uploaded Python 2Python 3

File details

Details for the file scout-browser-4.11.tar.gz.

File metadata

  • Download URL: scout-browser-4.11.tar.gz
  • Upload date:
  • Size: 4.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for scout-browser-4.11.tar.gz
Algorithm Hash digest
SHA256 e5451321a7de5ad63056f6d98d65a2c90a030b217d8ca2f2a08664814dfe6c7a
MD5 e4e775f952aa0aecbce643757668a874
BLAKE2b-256 120d51c4916ece4f3dbf12b554c66ba3cd0febbd238b19a21d09a672a8c0b903

See more details on using hashes here.

File details

Details for the file scout_browser-4.11-py2.py3-none-any.whl.

File metadata

  • Download URL: scout_browser-4.11-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.3 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.6

File hashes

Hashes for scout_browser-4.11-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ef6cee7eecc0b9a0ee81acf3a9df44476647212653b2101dc8b947524536c825
MD5 9b169cbcdeed9a9a6b642e68a170b8ca
BLAKE2b-256 4f8fdcc74076dcb4a5431230c3b0d1254450d40995037da98e1915c5c72b9d73

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page