diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d2aba89..8fb05b0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## [unreleased] ### Added - Condensed `/coverage/d4/genes/summary` for condensed stats over a gene list +- Documentation for new coverage summary endpoint ### Changed - GitHub tests action to use d4tools 0.3.10 ### Fixed diff --git a/docs/usage/sample-coverage.md b/docs/usage/sample-coverage.md index c2ba5582..709aeb73 100644 --- a/docs/usage/sample-coverage.md +++ b/docs/usage/sample-coverage.md @@ -130,6 +130,42 @@ And it would return the following result: ] ``` +### Condensed summary stats for one or more samples over a list of HGNC IDs + +To obtain condensed statistics for one or more samples, use the `/coverage/d4/genes/summary` endpoint. +Send a request with a list of HGNC gene IDs, the path to the d4 files for the samples, and the coverage threshold for computing coverage completeness. +The endpoint will return the average coverage and coverage completeness for all the genes included in the query. +You need to provide a parameter `interval_type` to specify whether the statistics should be computed over entire genes, gene transcripts, or exons. + +#### Request example: + +``` shell +curl -X 'POST' \ + 'https://chanjo2-stage.scilifelab.se/coverage/d4/genes/summary' \ + -H 'accept: application/json' \ + -H 'Content-Type: application/json' \ + -d '{ + "build": "GRCh37", + "samples": [ + { + "name": "TestSample", + "coverage_file_path": "" + } + ], + "hgnc_gene_ids": [ + 2861, 3791, 6481, 7436, 30521 + ], + "coverage_threshold": 10, + "interval_type": "genes" +}' +``` + +#### Response from chanjo2: + +``` shell +{"TestSample":{"mean_coverage":54.38,"coverage_completeness_percent":33.03}} +``` + ### Case and samples coverage queries Genes, transcripts and exons coverage data can be computed by sending POST requests to their relative endpoints: @@ -150,7 +186,7 @@ These endpoints are very similar and accept the following parameters: While the only required parameter is "build", it is necessary to specify a list of genes (either ensembl_gene_ids, hgnc_gene_ids or hgnc_gene_symbols) and either a case or a list of samples. -### Coverage and coverage completeness query esamples +### Coverage and coverage completeness query examples - Given all samples from case "internal_id", retrieve mean coverage and coverage completeness with threshold 30, 20 on the genes from the Cerebral folate deficiency PanelAPP panel (*DHFR, FOLR1, MTHFR, SLC46A1*):