Package: scout-browser
Analyze VCFs and collaborate on solving rare diseases quickerWhat 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.DocumentationThis README only gives a brief overview of Scout, for a more complete reference, please check out our docs:https://clinical-genomics.github.io/scout.Runnable demo image - does not require installing of software and databaseA simple demo instance of Scout requires the installation of Docker and can be launched either by using the command:docker-compose up -dormake up.The repository includes a Makefile with common shortcuts to simplify setting up and working with Scout. To see a full list and description of these shortcuts run:make help.This demo is consisting of 3 containers:a MongoDB instance, on the default port 27017 in the container, mapped to host port 27013scout-cli --> the Scout command line, connected to the database. Populates the database with demo datascout-web --> the Scout web app, that serves the app on localhost, port 8000.Once the server has started you and open the app in the web browser at the following address:http://localhost:8000/The command to stop the demo are eitherdocker-compose downormake down.Instructions on how to run a Scout image connected to your local database or a custom database are presenton this page.Installationgitclonehttps://github.com/Clinical-Genomics/scoutcdscout
pipinstall--editable.Scout PDF reports are created usingFlask-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 installationpages.NB: in order to convert HTML reports into PDF reports, we have recently switched from the WeasyPrint lib topython-pdfkit. For this reason, when upgrading to a Scout version >4.47, you need to install an additionalwkhtmltopdf system library.You also need to have an instance of MongoDB running. I've found that it's easiest to do using the official Docker image:dockerrun--namemongo-p27017:27017mongoUsageDemo - requires pip-installing the app in a container and a running instance of mongodbOnce 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:scoutsetupdemoThis will setup an instance of scout with a database calledscout-demo. Now runscout--demoserveAnd play around with the interface. A user has been created with emailclark.kent@mail.comso use that address to get accessInitialize scoutTo initialize a working instance with all genes, diseases etc runscoutsetupdatabasefor more info, runscout --helpThe previous command initializes 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:scoutloadpanelscout/demo/panel_1.txt
scoutloadcasescout/demo/643594.config.yamlIntegration with chanjo for coverage report visualizationScout may be configured to visualize coverage reports produced byChanjo. Instructions on
how to enable this feature can be found in the documentchanjo_coverage_integration.Integration with loqusdb for integrating local variant frequenciesScout may be configured to visualize local variant frequencies monitored byLoqusdb.
Instructions on how to enable this feature can be found in the documentloqusdb integration.Integration with Gens for displaying copy number profiles for variantsScout may be configured to link to a localGensinstallation.
Instructions on how to enable this feature can be found in the documentGens integration.Server setupScout 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 productionADMINS=['paul.anderson@magnolia.com']MONGO_HOST='localhost'MONGO_PORT=27017MONGO_DBNAME='scout'MONGO_USERNAME='testUser'MONGO_PASSWORD='testPass'# enable user authentication using Google OAuth 2.0GOOGLE=dict(client_id="client_id_string.apps.googleusercontent.com",client_secret="client_secret_string",discovery_url="https://accounts.google.com/.well-known/openid-configuration")# enable Phenomizer gene predictions from phenotype termsPHENOMIZER_USERNAME='???'PHENOMIZER_PASSWORD='???'# enable Chanjo coverage integrationSQLALCHEMY_DATABASE_URI='???'REPORT_LANGUAGE='en'# or 'sv'# other interesting settingsSQLALCHEMY_TRACK_MODIFICATIONS=False# this is essential in productionTEMPLATES_AUTO_RELOAD=False# consider turning off in productionSECRET_KEY='secret key'# override in production!Most of the config settings are optional. A minimal config would consist of SECRET_KEY and MONGO_DBNAME.Starting the server in now really easy, for the demo and local development we will use the CLI:scout--flask-configconfig.pyserveHosting a production serverWhen 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.pygunicorn--workers4--bind0.0.0.0:8080scout.server.auto:appFor added security and flexibility, we recommend a reverse proxy solution like NGINX.Setting up a user login systemScout currently supports 3 mutually exclusive types of login:Google authentication via OpenID Connect (OAuth 2.0)LDAP authenticationSimple authentication using userid and passwordThe first 2 solutions are both suitable for a production server. A description on how to set up an advanced login system is available in theadmin guideIntegration with Matchmaker ExchangeStarting from release 4.4, Scout offers integration for patient data sharing via Matchmaker
Exchange.
General info about Matchmaker and patient matching could be found inthis paper.
For a technical guideline of our implementation of Matchmaker Exchange at Clinical Genomics and its
integration with Scout check scoutsmatchmaker docs.
A user-oriented guide describing how to share case and variant data to Matchmaker using Scout can
be foundhere.DevelopmentTo keep the code base consistent, formatting withBlackis always applied as part of the PR submission process via GitHub Actions. While not strictly required, to avoid confusion, it is suggested that developers apply Black locally.
Black defaults to 88 characters per line, we use 100.To format all the files in the project run:black--line-length100.We recommend using Black withpre-commit.
In.pre-commit-config.yamlyou can find the pre-commit configuration.
To enable this configuration run:pre-commitinstallTestTo run unit tests:pytestContributing to ScoutIf 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 inCONTRIBUTING.