Skip to content

Commit

Permalink
Merge pull request #289 from Clinical-Genomics/custom_thresholds_howto
Browse files Browse the repository at this point in the history
Add documentation on how to customise app's default coverage levels used in reports
  • Loading branch information
northwestwitch authored Apr 19, 2024
2 parents 315adef + 6fad1f4 commit 87b25ca
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
### Added
- Coverage report and genes coverage overview endpoints now accept also requests with application/x-www-form-urlencoded data
- Allow system admin to customise coverage levels to be used in reports' metrics by editing the REPORT_COVERAGE_LEVELS in .env file
- Documentation on how to change app's default coverage level values to be used when creating the reports
### Changed
- Templates form submit data as application/x-www-form-urlencoded without having to transform it into json
### Fixed
Expand Down
21 changes: 21 additions & 0 deletions docs/deployment/docker-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,24 @@ docker run -d --rm -v $(pwd)/.env:/home/worker/app/.env -p 8000:8000 --expose 8

[docker-hub-chanjo2]: https://hub.docker.com/repository/docker/clinicalgenomics/chanjo2/general
[dockerfile-link]: /~https://github.com/Clinical-Genomics/chanjo2/blob/main/Dockerfile

#### Customising the coverage levels used to create coverage reports and genes overview reports

When generating coverage and genes overview reports, the metrics showcased in these documents are calculated across various coverage levels, such as 10x, 20x, and 50x.
These specific coverage levels can be directly specified in queries to the `/report` and `/overview` endpoints using the `completeness_thresholds parameter`, which accepts a list of integers.
For detailed instructions, please refer to the [coverage-reports documentation](../usage/coverage-reports.md).
Alternatively, you can define these coverage levels in the .env file by adding the following line:

```
REPORT_COVERAGE_LEVELS=[100,150,,..]
```

If the `REPORT_COVERAGE_LEVELS` parameter is not present in the .env file and a request does not include a completeness_thresholds value, the report metrics will **default to the following coverage level values: [10, 15, 20, 50, 100]**.

It's important to note that if coverage level values are provided through multiple methods as described above, the application will prioritize them in the following order:

1. Values specified in the user's request
2. Values included in the .env file
3. Default coverage level values

Furthermore, it's worth considering that the more coverage levels provided, the longer it will take for the report pages to load.
1 change: 1 addition & 0 deletions template.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ MYSQL_PORT=
MYSQL_HOST_NAME=mariadb
MYSQL_HOST_PORT=3307
CHANJO_HOST_PORT=8000
REPORT_COVERAGE_LEVELS=[100,150,200,300,500]

0 comments on commit 87b25ca

Please sign in to comment.