Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide config for report + add params to this config #643

Merged
merged 42 commits into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
5fc2316
Provide config for report + add params to this config
bartcharbon Nov 12, 2024
1e1d807
update field_metadata.json and vcf_report_config.json
dennishendriksen Nov 22, 2024
0c20c52
fix config
dennishendriksen Nov 22, 2024
a3ff51a
Merge branch 'main' of https://github.com/molgenis/vip into feat/vari…
dennishendriksen Nov 22, 2024
e6a8e87
fix:update config to be compatible with latest vip-report-template
dennishendriksen Nov 25, 2024
8fc7b2d
Updated decision tree and inheritance modules
bartcharbon Nov 26, 2024
1be85fa
update inheritance and decision tree images
bartcharbon Nov 26, 2024
de34c2c
Merge branch 'feat/variant_type_views' of https://github.com/molgenis…
bartcharbon Nov 26, 2024
9f8c630
update md5sums
bartcharbon Nov 26, 2024
c62d489
Update decision-tree to 5.1.1
bartcharbon Nov 26, 2024
f710e47
update md5sum
bartcharbon Nov 27, 2024
76a75b1
inheritance matcher 3.3.1
bartcharbon Nov 27, 2024
98feae5
update md5sum
bartcharbon Nov 27, 2024
0dbe10a
inheritance match v3.3.2
bartcharbon Nov 27, 2024
c6e0e6d
update md5sum
bartcharbon Nov 27, 2024
9855e05
provide metadata to inheritance matcher
bartcharbon Nov 27, 2024
c8d0594
Report version 7.2.0
bartcharbon Nov 28, 2024
ee552fa
Update template + md5sums
bartcharbon Nov 28, 2024
9fa2a81
bump template in config
bartcharbon Nov 28, 2024
aef67f8
Fix report module
bartcharbon Nov 28, 2024
fe7e7d1
Fix config creation
bartcharbon Nov 28, 2024
fdbbce3
escape '(' and ')' in vip config
bartcharbon Nov 28, 2024
a1133bd
Fix json config creation
bartcharbon Nov 28, 2024
e640b53
attempt config fix
bartcharbon Nov 28, 2024
05161e2
Fix config double toJson
bartcharbon Nov 28, 2024
91a9f3c
Fix the config
bartcharbon Nov 28, 2024
a509eff
chore:remove resolved FIXME
dennishendriksen Nov 28, 2024
48c5e4f
Merge branch 'main' of https://github.com/molgenis/vip into feat/vari…
dennishendriksen Nov 29, 2024
aff47dd
chore:bump template
dennishendriksen Nov 29, 2024
5fdd0ee
Update ClinVar creating script and ClinVar resource
bartcharbon Nov 29, 2024
15928d8
Merge branch 'feat/variant_type_views' of https://github.com/molgenis…
bartcharbon Nov 29, 2024
1f71ca9
Fix metadata for clinVar_CLNREVSTAT
bartcharbon Nov 29, 2024
7051c1e
Update vcf config t use new clinvar
bartcharbon Nov 29, 2024
d83b0de
clinVar_CLNREVSTAT metadata update
bartcharbon Nov 29, 2024
3bc4f47
Update clinvar separator
bartcharbon Nov 29, 2024
b7a47b0
fix:create_clinvar.sh output header
dennishendriksen Nov 30, 2024
5981972
fix:header of clinvar resource
dennishendriksen Nov 30, 2024
aa8045f
fix:clinVar_CLNSIGINCL in field_metadata.json
dennishendriksen Nov 30, 2024
5984d09
fix:clinVar_CLNSIGINCL in decision tree
dennishendriksen Nov 30, 2024
00ad87c
fix:annotation docs for clinVar_CLNSIGINCL
dennishendriksen Nov 30, 2024
8ba5089
chore:remove unused vcf-decision-tree-5.0.0.def
dennishendriksen Nov 30, 2024
c804d9e
chore:update docs
dennishendriksen Nov 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions config/nxf_vcf.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ env {
CMD_VEP = "apptainer exec --no-mount home --bind \${TMPDIR} ${APPTAINER_CACHEDIR}/vep-111.0.sif vep"
CMD_FILTERVEP = "apptainer exec --no-mount home --bind \${TMPDIR} ${APPTAINER_CACHEDIR}/vep-111.0.sif filter_vep"
CMD_STRANGER = "apptainer exec --no-mount home --bind \${TMPDIR} ${APPTAINER_CACHEDIR}/stranger-0.8.1_v2.sif stranger"
CMD_VCFREPORT="apptainer exec --no-mount home --bind \${TMPDIR} ${APPTAINER_CACHEDIR}/vcf-report-7.0.3.sif"
CMD_VCFDECISIONTREE = "apptainer exec --no-mount home --bind \${TMPDIR} ${APPTAINER_CACHEDIR}/vcf-decision-tree-5.0.0.sif"
CMD_VCFINHERITANCEMATCHER = "apptainer exec --no-mount home --bind \${TMPDIR} ${APPTAINER_CACHEDIR}/vcf-inheritance-matcher-3.2.1.sif"
CMD_VCFREPORT="apptainer exec --no-mount home --bind \${TMPDIR} ${APPTAINER_CACHEDIR}/vcf-report-7.2.0.sif"
CMD_VCFDECISIONTREE = "apptainer exec --no-mount home --bind \${TMPDIR} ${APPTAINER_CACHEDIR}/vcf-decision-tree-5.1.1.sif"
CMD_VCFINHERITANCEMATCHER = "apptainer exec --no-mount home --bind \${TMPDIR} ${APPTAINER_CACHEDIR}/vcf-inheritance-matcher-3.3.2.sif"

// workaround for SAMtools https://github.com/samtools/samtools/issues/1366#issuecomment-769170935
REF_PATH = ":"
Expand Down Expand Up @@ -66,7 +66,7 @@ params {
expansionhunter_variant_catalog = "${projectDir}/resources/GRCh38/expansionhunter_variant_catalog.json"
stranger_catalog = "${projectDir}/resources/GRCh38/variant_catalog_grch38_fixed.json"
vep_custom_phylop = "${projectDir}/resources/GRCh38/hg38.phyloP100way.bw"
vep_plugin_clinvar = "${projectDir}/resources/GRCh38/clinvar_20241001-stripped.tsv.gz"
vep_plugin_clinvar = "${projectDir}/resources/GRCh38/clinvar_20241126-stripped.tsv.gz"
vep_plugin_gnomad = "${projectDir}/resources/GRCh38/gnomad.total.v4.1.sites.stripped.tsv.gz"
vep_plugin_spliceai_indel = "${projectDir}/resources/GRCh38/spliceai_scores.masked.indel.hg38.vcf.gz"
vep_plugin_spliceai_snv = "${projectDir}/resources/GRCh38/spliceai_scores.masked.snv.hg38.vcf.gz"
Expand Down Expand Up @@ -111,7 +111,8 @@ params {
include_crams = true
max_records = ""
max_samples = ""
template = "${projectDir}/resources/vip-report-template-v6.2.0.html"
template = "${projectDir}/resources/vip-report-template-v7.0.2.html"
config = "${projectDir}/resources/vcf_report_config.json"
metadata = "${projectDir}/resources/field_metadata.json"

GRCh38 {
Expand Down
114 changes: 85 additions & 29 deletions docs/advanced/annotations.md

Large diffs are not rendered by default.

15 changes: 13 additions & 2 deletions docs/advanced/report_templates.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
# Report templates

VIP outputs a standalone HTML report that can be viewed in any modern browser.
The report is based on the input sample sheet information and the output variant `vcf` data.

## Default

As a default VIP uses a report template that is suitable for most analysis:

![Example report](../img/report_example.png)

*Above: default report template*

## Customization
Using the `vcf.report.template` parameter (see [here](../usage/config.md#parameters)) it is possible to specify a different report template to create reports tailered to your needs.

Using the `vcf.report.template` parameter (see [here](../usage/config.md#parameters)) it is possible to specify a
different report template to create reports tailered to your needs.

The following repositories might be of interest when creating a new report template:

Expand All @@ -22,4 +26,11 @@ The following repositories might be of interest when creating a new report templ
The `vip-report` tool creates reports based on a report template as described in the following repositories:

- [vip-report](https://github.com/molgenis/vip-report)
- [vip-utils](https://github.com/molgenis/vip-utils)
- [vip-utils](https://github.com/molgenis/vip-utils)

## Configuration

A configuration .json file can be used in combination with a `vcf.report.template` to create reports that e.g. show
specific variant content or variant filters. The allowed contents of a configuration .json file depends on the
`vcf.report.template` used. For the default `vcf.report.template` the configuration options are
described [here](https://github.com/molgenis/vip-report-template).
3 changes: 2 additions & 1 deletion docs/usage/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Both the zipped and unzipped fasta should have an index.
| sv.cutesv.min_read_len | 500 | Ignores reads that only report alignments with not longer than bp |
| sv.cutesv.min_siglength | 10 | Minimum length of SV signal to be extracted |
| sv.cutesv.min_size | 30 | Minimum size of SV to be reported |
| sv.cutesv.min_support | 2 | Minimum number of reads that support a SV to be reported. Please note that the default is lower than the default of cuteSV itself to prevent missed SV calls. |
| sv.cutesv.min_support | 2 | Minimum number of reads that support a SV to be reported. Please note that the default is lower than the default of cuteSV itself to prevent missed SV calls. |
| sv.cutesv.read_range | 1000 | The interval range for counting reads distribution |
| sv.cutesv.report_readid | false | Enable to report supporting read ids for each SV |
| sv.cutesv.retain_work_dir | false | Enable to retain temporary folder and files |
Expand Down Expand Up @@ -142,6 +142,7 @@ Both the zipped and unzipped fasta should have an index.
| vcf.report.include_crams | true | allowed values: [true, false]. true: include cram files in the report for showing alignments in the genome browser, false: do not include the crams in the report, no aligments are shown in the genome browser. This will result in a smaller report size. |
| vcf.report.max_records | | |
| vcf.report.max_samples | | |
| vcf.report.config | | `vcf.report.template` configuration file |
| vcf.report.template | | for details, see [here](../advanced/report_templates.md) |
| vcf.report.GRCh38.genes | *installed* | |

Expand Down
12 changes: 6 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ download_files() {
urls+=("4d58cc7a4e3e497a245095a62562e27e" "images/spectre-0.2.1-patched_v2.sif")
urls+=("8f6e06847776448e004df8b863571109" "images/straglr-1.4.4_vip_v3.sif")
urls+=("9c69ac645e04b91c8f480289c536429c" "images/stranger-0.8.1_v2.sif")
urls+=("599813c5c0d547c955bd071ccdf220f8" "images/vcf-decision-tree-5.0.0.sif")
urls+=("f238b75e85e8a097447bad471369d0b2" "images/vcf-inheritance-matcher-3.2.1.sif")
urls+=("87b2d9031b1b8351d2da14dd0095fbea" "images/vcf-report-7.0.3.sif")
urls+=("8575e48d7da8a7f0728d08dc204e42a5" "images/vcf-decision-tree-5.1.1.sif")
urls+=("57a7329781d3cb0e5491c5f84fd49dcd" "images/vcf-inheritance-matcher-3.3.2.sif")
urls+=("9357590531fd4f1af1ab610ddafbdd3b" "images/vcf-report-7.2.0.sif")
urls+=("7bffc236a7c65b2b2e2e5f7d64beaa87" "images/vep-111.0.sif")
urls+=("82be3c18406e7c027ee4cec83a723d71" "nextflow-24.04.2-all")
if [ "${assembly}" == "ALL" ] || [ "${assembly}" == "GRCh37" ]; then
Expand All @@ -110,8 +110,8 @@ download_files() {
urls+=("498c22d840476a757be5f5b0e382f8d6" "resources/GRCh38/GRCh38_ncER_perc.bed.gz.tbi")
urls+=("7cc9cafbdde0b00f8007bc2911310b50" "resources/GRCh38/capice_model_v5.1.2-v3.ubj")
urls+=("03d4fb2f5fe500daa77c54455626f8f5" "resources/GRCh38/clinical_repeats.bed")
urls+=("52a5ef527d2509d2196329a67b447975" "resources/GRCh38/clinvar_20241001-stripped.tsv.gz")
urls+=("1231b9c88fb19034d313c4e003667238" "resources/GRCh38/clinvar_20241001-stripped.tsv.gz.tbi")
urls+=("8da13608d59915f031beade9c3981c2e" "resources/GRCh38/clinvar_20241126-stripped.tsv.gz")
urls+=("6b1ed6d55e870e37d2bed360abc26fe2" "resources/GRCh38/clinvar_20241126-stripped.tsv.gz.tbi")
urls+=("72f12f9ee918878030022c46ec850038" "resources/GRCh38/expansionhunter_variant_catalog.json")
urls+=("e4c68d0e98a9b5401542b2e8d5b05e82" "resources/GRCh38/gnomad.total.v4.1.sites.stripped.tsv.gz")
urls+=("eebfca693425c159d87479fef26d3774" "resources/GRCh38/gnomad.total.v4.1.sites.stripped.tsv.gz.tbi")
Expand Down Expand Up @@ -147,7 +147,7 @@ download_files() {
# update utils/install.sh when updating inheritance.tsv
urls+=("df31eb0fe9ebd9ae26c8d6f5f7ba6e57" "resources/inheritance_20240115.tsv")
urls+=("7138e76a38d6f67935699d06082ecacf" "resources/vep/cache/homo_sapiens_refseq_vep_111_GRCh38.tar.gz")
urls+=("78962f0c7c6fe5c63ef7c66b627c95a0" "resources/vip-report-template-v6.2.0.html")
urls+=("e5d17440fc84b49b2fba7a30b500ca93" "resources/vip-report-template-v7.0.2.html")
# when modifying urls array, please keep list in 'ls -l' order
for ((i = 0; i < ${#urls[@]}; i += 2)); do
download_file "${base_url}" "${urls[i+1]}" "${urls[i+0]}" "${output_dir}" "${validate}"
Expand Down
1 change: 1 addition & 0 deletions modules/vcf/inheritance.nf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ process inheritance {
vcfOutIndex = "${vcfOut}.csi"
vcfOutStats = "${vcfOut}.stats"

metadata = params.vcf.classify.metadata
probands = meta.probands.collect{ proband -> proband.individual_id}.join(",")
pedigree = "${meta.project.id}.ped"
pedigreeContent = createPedigree(meta.project.samples)
Expand Down
4 changes: 4 additions & 0 deletions modules/vcf/report.nf
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include { basename } from './utils'
include { createPedigree } from '../utils'
import groovy.json.JsonOutput

process report {
label 'vcf_report'
Expand Down Expand Up @@ -31,11 +32,14 @@ process report {
crams = meta.crams ? meta.crams.collect { "${it.individual_id}=${it.cram}" }.join(",") : ""
includeCrams = params.vcf.report.include_crams

configJsonStr = new File(params.vcf.report.config).getText('UTF-8').replaceFirst("\\{", "{\"vip\": {\"filter_field\": {\"type\": \"genotype\",\"name\": \"VIPC_S\"},\"params\":" + JsonOutput.toJson(params) + "},")

probands = meta.probands.collect{ proband -> proband.individual_id }.join(",")
hpoIds = meta.project.samples.findAll{ sample -> !sample.hpo_ids.isEmpty() }.collect{ sample -> [sample.individual_id, sample.hpo_ids.join(";")].join("/") }.join(",")
pedigree = "${meta.project.id}.ped"
pedigreeContent = createPedigree(meta.project.samples)


template 'report.sh'

stub:
Expand Down
1 change: 1 addition & 0 deletions modules/vcf/templates/inheritance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ inheritance () {
args+=("-jar" "/opt/vcf-inheritance-matcher/lib/vcf-inheritance-matcher.jar")
args+=("--input" "!{vcf}_replaced.vcf.gz")
args+=("--output" "!{vcfOut}_replaced.vcf.gz")
args+=("--metadata" "!{metadata}")
if [ -n "!{pedigree}" ]; then
args+=("--pedigree" "!{pedigree}")
fi
Expand Down
4 changes: 4 additions & 0 deletions modules/vcf/templates/report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ report() {
if [ -n "!{template}" ]; then
args+=("--template" "!{template}")
fi
cat << EOF > "vip_report_config.json"
!{configJsonStr}
EOF
args+=("--template_config" "vip_report_config.json")
if [ -n "!{crams}" ] && [[ "!{includeCrams}" == "true" ]]; then
args+=("--cram" "!{crams}")
fi
Expand Down
18 changes: 14 additions & 4 deletions resources/decision_tree_GRCh38.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@
{
"field": "INFO/CSQ/clinVar_CLNSIG",
"operator": "contains_any",
"value": [ "Conflicting_interpretations_of_pathogenicity" ]
"value": [
"Conflicting_classifications_of_pathogenicity"
]
}
],
"outcomeTrue": {
Expand All @@ -78,7 +80,10 @@
{
"field": "INFO/CSQ/clinVar_CLNSIG",
"operator": "contains_any",
"value": [ "Likely_pathogenic", "Pathogenic" ]
"value": [
"Likely_pathogenic",
"Pathogenic"
]
}
],
"outcomeTrue": {
Expand All @@ -91,7 +96,9 @@
{
"field": "INFO/CSQ/clinVar_CLNSIG",
"operator": "contains_any",
"value": [ "Uncertain_significance" ]
"value": [
"Uncertain_significance"
]
}
],
"outcomeTrue": {
Expand All @@ -104,7 +111,10 @@
{
"field": "INFO/CSQ/clinVar_CLNSIG",
"operator": "contains_any",
"value": [ "Likely_benign", "Benign" ]
"value": [
"Likely_benign",
"Benign"
]
}
],
"outcomeTrue": {
Expand Down
Loading