7.1.3 • Published 12 months ago

@molgenis/vip-report-template v7.1.3

Weekly downloads
46
License
LGPL-3.0
Repository
github
Last release
12 months ago

Build Status

vip-report-template

The default report template for the VIP report generator. This template is a good default for any .vcf file with support for .vcf files annotated with VIP.

Usage

$ pnpm install
$ pnpm run build # build report template in dist folder
$ pnpm run dev   # dev server on localhost:3000

Config

The config.json file is used to configure which fields, filters and sort options are shown on screen. Furthermore, it is used to pass the vip pipeline configuration to the report template. There are 3 top level elements:

  • vip: used to pass the VIP configuration
  • sample_variants: to configure the sample variants screen
  • variants: to configure the variants screen

Example:

{
  "vip": {VIP_CONFIG_HERE},
  "sample_variants": {SAMPLE_VARIANTS_SCREEN_CONFIG_HERE},
  "variants": {VARIANTS_SCREEN_CONFIG_HERE},
  "sample_variant": {SAMPLE_VARIANT_SCREEN_CONFIG_HERE},
  "variant": {VARIANT_SCREEN_CONFIG_HERE},
  "sample_variant_consequence": {SAMPLE_VARIANT_CONSEQUENCE_SCREEN_CONFIG_HERE},
  "variant_consequence": {VARIANT_CONSEQUENCE_SCREEN_CONFIG_HERE}
}

VIP config

Configuring screen content

Variant types

For the sample variant view multiple "subviews":

  • all: which shows all types of variants
  • snv: shows the single nucleotide variants and small indels.
  • sv: shows structural variants
  • str: shows the short tandem repeats. All of these screens can be configured independently, if the configuration for a specific variant type view is missing, the "all" configuration is used for this specific view.

Example:

    "cells": {
      "all": [FIELDS_CONFIG_HERE],
      "snv": [FIELDS_CONFIG_HERE],
      "sv": [FIELDS_CONFIG_HERE],

"str" is missing in this example, the "all" config is used for the str view.

Cells

This section specifies which information should be shown in the table with variant information. Per cell the following information can/should be specified:

  • "type": the type of field, one of:
    • fixed: the standard columns of an VCF file, excluding the FORMAT and INFO columns, one of: pos,id,ref,alt,qual,filter
    • info: a VCF INFO field
    • format: a VCF FORMAT field, currently unsupported
    • genotype: a VCF FORMAT field in the context of the current sample of the screen.
    • composed: a custom field based on information from multiple fields, see the "Composed" section.
  • "name": the name of the field in the VCF file
  • "label": optional label, name is used if no label is specified.
  • "description": optional description to be shown in the tooltip for the column on screen.

Example:

        {
          "type": "info",
          "name": "myInfoField"
        },
        {
          "type": "composed",
          "name": "my_composed_fieldname",
          "label": "My Composed Field Label",
          "description": "Description explaining that this is just and example field."
        },
Groups

Cells can be grouped to indicate that certain cells belong together, an example of this are the child fields of the VEP INFO field.

Example:

        {
          "type": "info",
          "name": "myInfoField"
        },
        {
            "type": "group",
            "fields": [
              {
                "type": "info",
                "name": "CSQ/Consequence",
              },
              {
                "type": "info",
                "name": "CSQ/SYMBOL"
              }
            ]
        }
Composed

The following composed field are available:

idrequiredoptionaldescription
clinVarINFO/CSQ/clinVar_CLNSIGINFO/CSQ/clinVar_CLNID, INFO/CSQ/clinVar_CLNREVSTATThis field shows the ClinVar values with a tooltip containing the ClinVar star rating.
geneINFO/CSQ/SYMBOLINFO/CSQ/Gene, INFO/CSQ/IncompletePenetrance, INFO/CSQ/SYMBOL_SOURCEThe gene name with a link to https://genenames.org and an indication if the gene is associated with incomplete penetrance.
genotypeFORMAT/GT, sample existsFORMAT/REPCN, FORMAT/VIAB, INFO/SVTYPE, INFO/RU, INFO/RUMATCH, INFO/DisplayRUShows the genotype based on the variant type. For SNV/SV: rendering the REF and ALT nucleotides (rendered with colors per nucleotide) for the alleles rather than the allele numbers. For STR: Shows the genotype as the called repeat unit in combination with the number of repeat units seen per allele.
genotype_maternalFORMAT/GT, sample.maternalId existsFORMAT/REPCN, FORMAT/VIAB, INFO/SVTYPE, INFO/RU, INFO/RUMATCH, INFO/DisplayRUSame as genotype, but for the maternal sample
genotype_paternalFORMAT/GT, sample.paternalId existsFORMAT/REPCN, FORMAT/VIAB, INFO/SVTYPE, INFO/RU, INFO/RUMATCH, INFO/DisplayRUSame as genotype, but for the paternal sample
gnomAdAfINFO/CSQ/gnomAD_AFINFO/CSQ/gnomAD_COV, INFO/CSQ/gnomAD_QC, INFO/CSQ/ALLELE_NUMShows the GnomAD allele frequency with a link to https://gnomad.broadinstitute.org, and an indicator to warn for low quality.
hpoINFO/CSQ/HPOINFO/CSQ/GADO_PDShows the associated HPO terms with a link to https://hpo.jax.org, the column also shows an indicator if the gene received a high or low confidence GADO score.
inheritancePatternINFO/CSQ/InheritanceModesGeneFORMAT/VICShows the inheritance patterns of the gene, an indicator is show if the gene is associated with the AR pattern and there is a possible compound AR pattern for the sample.
locusCHROM, POSshow chromosome:position with a link to the report variant detail view.
vipCINFO/CSQ/VIPCINFO/CSQ/VIPPshows the VIP classification with a link to the consequence details view, and the VIP classification path as tooltip.
vipCSFORMAT/VIPC_S, sample existsFORMAT/VIPP_Sshows the VIP classification with a link to the consequence details view, and the VIP classification path as tooltip.
vkglINFO/CSQ/VKGL_CLINFO/CSQ/VKGL_AMC, INFO/CSQ/VKGL_ERASMUS, INFO/CSQ/VKGL_LUMC, INFO/CSQ/VKGL_NKI, INFO/CSQ/VKGL_RADBOUD_MUMC, INFO/CSQ/VKGL_UMCG, INFO/CSQ/VKGL_UMCU, INFO/CSQ/VKGL_VUMCshows the VKGL classification(s), if data for specific labs is available this is shown in the tooltip.

A composed field will be used in the report if the requirements are met, otherwise it will be ignored.

Filters

Composed

The following composed filters are available:

idrequiredoptionaldescription
allelicImbalanceFORMAT/GT, FORMAT/VIAB, sample existsFilter to select variants that are/are not showing allelic imbalance.
deNovoFORMAT/VID, sample existsFilter to select only variants that are/are not DeNovo
hpoINFO/CSQ/HPO, sample exists, sample.phenotypes > 0Filter to select variants that match certain HPO terms
inheritanceMatchFORMAT/VIM, sample existsFilter to select variants for which the suitable inheritance patterns for the sample contain the selected pattern.
locusCHROM, POSFilter to select variants based on their chromosome optionally within a certain position range on this chromosome.
vipCINFO/CSQ/VIPC, parameter vcf.filter.consequences=true, vcf.filter.classes > 0Filter on the VIP classification value stored in INFO/CSQ/VIPC, but only includes categories defined in the VIP configuration parameter vcf.filter.classes
vipCSFORMAT/VIPC_S, sample exists, sample.proband=true, parameter vcf.filter.sample_classes > 0Filter on the VIP sample classification value stored in FORMAT/VIPC_S, but only includes categories defined in the VIP configuration parameter vcf.filter_samples.classes

Sorts

Via this section available sort options and the default sort of the different views can be configured. Currently only INFO fields with single numerical values can be used for sorting.

Multiple sort fields can be specified for a single sort option to create a secondary, tertiary, etc. sort.

Example:

{
  "sorts": {
    "all": [
      {
        "selected": true,
        "orders": [
          {
            "direction": "desc",
            "field": {
              "type": "info",
              "name": "MySortField"
            }
          }
        ]
      },
      {
        "selected": false,
        "orders": [
          {
            "direction": "asc",
            "field": {
              "type": "info",
              "name": "MySortOtherField"
            }
          }
        ]
      }
    ],
    "str": [
      {
        "selected": true,
        "orders": [
          {
            "direction": "desc",
            "field": {
              "type": "info",
              "name": "MySortPrimarySortField"
            }
          },
          {
            "direction": "asc",
            "field": {
              "type": "info",
              "name": "MySortSecondarySortField"
            }
          }
        ]
      },
      {
        "selected": false,
        "orders": [
          {
            "direction": "asc",
            "field": {
              "type": "info",
              "name": "MySortOtherField"
            }
          }
        ]
      }
    ]
  }
}

Records per page

Via this section available records per page options and the default can be configured.

Example:

"recordsPerPage": {
      "str": [
        {
          "number": 10
        },
        {
          "number": 20,
          "selected": true
        },
        {
          "number": 50
        },
        {
          "number": 100
        }
      ]
    }

Wildcards

Regular expressions like can be used to include multiple fields at once in you config.

Examples: Include all INFO fields

        {
          "type": "info",
          "name": ".*"
        }

Include all nested CSQ child fields

        {
          "type": "info",
          "name": "CSQ/.*"
        }

Include all CSQ child fields starting with a "G" and a name of 4 characters long ending with an "e" (Gene)

        {
          "type": "info",
          "name": "CSQ/G..e"
        }

Metadata

In the metadata json file additional field metadata can be specified in addition or as replacement of the field definition in the VCF file This is particularly useful for nested fields like VEP, and to specify the categories of a categorical field.

Example:

{
  "format": {
     "MyFormatfield": {
        "label": "My Format field",
        "description": "This describes my Format field",
        "numberType": "NUMBER",
        "numberCount": 1,
        "type": "INTEGER"
    },
    "MyCategoricalFormatField": {
      "label": "My Categorical Format Field",
      "description": "This is a format categorical field.",
      "numberType": "NUMBER",
      "numberCount": 1,
      "type": "CATEGORICAL",
      "categories": {
        "1": {
          "label": "Value1",
          "description": "This is value 1"
        },
        "2": {
          "label": "Value2",
          "description": "This is value 2"
        }
      }
    }
  },
  "info": {
    "CSQ": {
      "nestedFields": {
        "MyNestedfield": {
          "label": "My nested field",
          "description": "This describes my nested field",
          "numberType": "NUMBER",
          "numberCount": 1,
          "type": "INTEGER"
        },
        "MyCategoricalNestedField": {
          "label": "My Categorical Nested Field",
          "description": "This is a nested categorical field.",
          "numberType": "NUMBER",
          "numberCount": 1,
          "type": "CATEGORICAL",
          "categories": {
            "1": {
              "label": "Value1",
              "description": "This is value 1"
            },
            "2": {
              "label": "Value2",
              "description": "This is value 2"
            }
          }
        }
      }
    },
    "MyInfofield": {
      "label": "My INFO field",
      "description": "This describes my INFO field",
      "numberType": "NUMBER",
      "numberCount": 1,
      "type": "INTEGER"
    },
    "MyCategoricalField": {
      "label": "My Categorical Field",
      "description": "This is a categorical field.",
      "numberType": "NUMBER",
      "numberCount": 1,
      "type": "CATEGORICAL",
      "categories": {
        "1": {
          "label": "Value1",
          "description": "This is value 1"
        },
        "2": {
          "label": "Value2",
          "description": "This is value 2"
        }
      }
    }
  }
}

Null values

In the metadata json file "null" values can be specified for categorical fields, these values should contain a label and optionally a description. The label value is rendered in filters and used to display the file in tables and views if it is empty, the description is used in tooltips. In cases where the categorical field is of a type that can have multiple values, an array containing the null value is returned if the field is empty.

Example

"MyCategoricalField": {
  "label": "My Categorical Field",
  "description": "This is a categorical field.",
  "numberType": "NUMBER",
  "numberCount": 1,
  "type": "CATEGORICAL",
  "categories": {
    "1": {
      "label": "Value1",
      "description": "This is value 1"
    },
    "2": {
      "label": "Value2",
      "description": "This is value 2"
    }
  },
  "nullValue": {
    "label": "EmptyValue"
  }
}
7.1.3

12 months ago

7.1.2

12 months ago

7.1.1

1 year ago

7.1.0

1 year ago

7.0.6

1 year ago

7.0.5

1 year ago

7.0.0

1 year ago

7.0.4

1 year ago

7.0.3

1 year ago

7.0.2

1 year ago

7.0.1

1 year ago

6.1.1

2 years ago

6.2.0

2 years ago

6.0.2

2 years ago

6.0.1

2 years ago

6.0.0

2 years ago

5.8.0

2 years ago

5.7.0

2 years ago

5.5.0

3 years ago

5.6.0

2 years ago

5.4.1

3 years ago

5.5.5

2 years ago

5.5.4

2 years ago

5.5.3

3 years ago

5.5.2

3 years ago

5.3.0

3 years ago

5.4.0

3 years ago

5.2.3

3 years ago

5.2.2

3 years ago

5.2.1

3 years ago

5.2.0

3 years ago

5.1.5

3 years ago

5.1.4

3 years ago

5.1.3

3 years ago

5.1.6

3 years ago

5.1.2

3 years ago

5.1.1

3 years ago

5.1.0

3 years ago

4.0.0

3 years ago

5.0.0

3 years ago

3.1.3

4 years ago

3.1.4

3 years ago

3.0.0-beta2

4 years ago

3.1.2

4 years ago

3.1.1

4 years ago

3.1.0

4 years ago

3.0.0

4 years ago

3.0.0-beta

4 years ago

2.7.3

4 years ago

2.7.0

4 years ago

2.7.2

4 years ago

2.6.3

4 years ago

2.7.1

4 years ago

2.6.4

4 years ago

2.6.2

5 years ago

2.6.1

5 years ago

2.6.0

5 years ago

2.5.1

5 years ago

2.5.0

5 years ago

2.4.0

5 years ago

2.3.0

5 years ago

2.2.1

5 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.9.0

5 years ago

1.8.0

5 years ago

1.7.0

5 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

6 years ago

1.0.0

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago