Skip to main content

Automatically render coverage reports from Chanjo ouput

Project description

Example report (eng)

Chanjo Report

Automatically generate basic coverage reports from Chanjo SQL databases. This plugin installs as a subcommand ("report") to the Chanjo command line interface.

Usage

Chanjo Report supports a number of output formats: tabular, PDF, and HTML. To print a PDF coverage report for a group of samples "WGS-prep" do:

$ chanjo report --render pdf --group "WGS-prep" > ./coverage-report.pdf

Features

Supported output formats

Chanjo Reports multiple output formats:

  • tabular: easily parsable and pipeable
  • PDF: easily distributable (for humans)
  • HTML: easily deliverable on the web

Supported languages (translations)

The coverage report (HTML/PDF) can be render is the following languages:

  • English
  • Swedish

Motivation

We are using the output from Chanjo at Clincal Genomics to report success of sequencing across the exome based on coverage. Our customers, clinicians mostly, are specifically interested in knowing to what degree their genes of interest are covered by sequencing along with some intuitive overall coverage metrics. They want the output in PDF format to file it in their system.

As a side effect of finding it easiest to convert HTML to PDF, Chanjo Report has a built in Flask server that can be used to render reports dynamically and even be plugged into other Flask servers as a Blueprint.

Installation

The latest version of Chanjo-report can be installed by cloning and installing the repository from Clinical Genomics github:

$ git clone https://github.com/Clinical-Genomics/chanjo-report.git
$ cd chanjo-report
$ pip install --editable .

Demo instance with Docker

To run a local demo with Docker, ensure you have a Docker engine running. If you do not have Docker set up, we can recommend Docker Desktop (https://www.docker.com/products/docker-desktop/).

Then use make with the repository Makefile to build and run:

make build
make setup
make report

Point your browser to http://127.0.0.1:5000 and find the demo samples.

Comprehensive instructions

We provide a Dockerfile to run the server in a container. To run a demo instance of the server with a pre-populated database consisting of a case with 3 samples, clone the repository using the following commands:

$ git clone https://github.com/Clinical-Genomics/chanjo-report.git
$ cd chanjo-report

Then you could make use of the services present in the Docker-compose file following these 3 steps:

  1. Build the images

    make build
    
  2. Launch chanjo to create a populate the database with demo data

    make setup
    
  3. Launch the chanjo-report server

    make report
    

A running instance of the server should now be available at the following url: http://localhost:5000/.

In order to generate a report containing all 3 demo samples, use the respective request args: http://localhost:5000/report?sample_id=sample1&sample_id=sample2&sample_id=sample3

Please be aware that if you are building and running the Dockerized version of chanjo-report, there might be issues on macOS if your processor is Apple silicon (or another ARM64 based architecture). In order to build the chanjo-report image in the ARM64 architecture, you can set the environment variable DOCKER_DEFAULT_PLATFORM:

export DOCKER_DEFAULT_PLATFORM=linux/amd64
make build
make setup
make report

License

MIT. See the LICENSE file for more details.

Contributing

Anyone can help make this project better - read CONTRIBUTING to get started!

Project details


Download files

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

Source Distribution

chanjo_report-4.12.0.tar.gz (36.5 kB view details)

Uploaded Source

Built Distribution

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

chanjo_report-4.12.0-py2.py3-none-any.whl (26.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file chanjo_report-4.12.0.tar.gz.

File metadata

  • Download URL: chanjo_report-4.12.0.tar.gz
  • Upload date:
  • Size: 36.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for chanjo_report-4.12.0.tar.gz
Algorithm Hash digest
SHA256 45a7706aa3ee5050c0bb39a5b8f4748c0995aae85e6ff0f4ac041773313ee97f
MD5 b1e88cfaeeb64685e773feeb2eb1df82
BLAKE2b-256 845cbec105c3dabf4b4e60905691ca7a3219f815cce0442185d2574145e04def

See more details on using hashes here.

File details

Details for the file chanjo_report-4.12.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for chanjo_report-4.12.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 035376869c8d38628d7209825a5797e25e8825d35a806b16a46dd61a54952ff9
MD5 a9349610ddde92acd38ce5f6aa5c41d9
BLAKE2b-256 14ca74248e28c5e4f9f92abbebd842e7b8591f383b4a474c2842b2f39d1ffbac

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