@molgenis/vip-report-template 6.1.1 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/.nvmrc +1 -1
  2. package/.travis.yml +9 -11
  3. package/README.md +411 -1
  4. package/eslint.config.mjs +11 -0
  5. package/package.json +40 -35
  6. package/scripts/deploy_npm_registry.sh +5 -0
  7. package/src/App.tsx +35 -29
  8. package/src/assets/sass/main.scss +12 -4
  9. package/src/components/Allele.tsx +95 -0
  10. package/src/components/Anchor.tsx +1 -1
  11. package/src/components/Breadcrumb.tsx +8 -5
  12. package/src/components/DatasetDropdown.tsx +10 -23
  13. package/src/components/ErrorNotification.tsx +9 -0
  14. package/src/components/GenomeBrowser.tsx +40 -23
  15. package/src/components/HpoTerm.tsx +1 -1
  16. package/src/components/{record/Pager.tsx → Pager.tsx} +21 -14
  17. package/src/components/RecordsPerPage.tsx +9 -7
  18. package/src/components/RecordsTable.tsx +130 -0
  19. package/src/components/SampleTable.tsx +70 -98
  20. package/src/components/SearchBox.tsx +8 -2
  21. package/src/components/Sort.tsx +28 -25
  22. package/src/components/Table.tsx +16 -0
  23. package/src/components/Tooltip.tsx +20 -0
  24. package/src/components/VariantBreadcrumb.tsx +54 -0
  25. package/src/components/VariantConsequenceContainer.tsx +100 -0
  26. package/src/components/VariantConsequenceTable.tsx +58 -0
  27. package/src/components/VariantContainer.tsx +71 -0
  28. package/src/components/VariantFilters.tsx +27 -0
  29. package/src/components/VariantGenotypeTable.tsx +44 -0
  30. package/src/components/VariantInfoTable.tsx +24 -33
  31. package/src/components/VariantResults.tsx +103 -0
  32. package/src/components/VariantTable.tsx +62 -66
  33. package/src/components/VariantTypeSelect.tsx +34 -0
  34. package/src/components/VariantsContainer.tsx +150 -0
  35. package/src/components/VariantsContainerHeader.tsx +70 -0
  36. package/src/components/field/Field.tsx +80 -0
  37. package/src/components/field/FieldAlt.tsx +19 -0
  38. package/src/components/field/FieldChrom.tsx +6 -0
  39. package/src/components/{record/Id.tsx → field/FieldFilter.tsx} +2 -1
  40. package/src/components/field/FieldFormat.tsx +10 -0
  41. package/src/components/{record/Filter.tsx → field/FieldId.tsx} +1 -1
  42. package/src/components/field/FieldPos.tsx +6 -0
  43. package/src/components/field/FieldQual.tsx +6 -0
  44. package/src/components/field/FieldRef.tsx +8 -0
  45. package/src/components/field/composed/FieldClinVar.tsx +72 -0
  46. package/src/components/field/composed/FieldComposed.tsx +68 -0
  47. package/src/components/field/composed/FieldGene.tsx +39 -0
  48. package/src/components/field/composed/FieldGenotype.tsx +35 -0
  49. package/src/components/{record/format/GenotypeField.tsx → field/composed/FieldGenotypeSnvSv.tsx} +20 -16
  50. package/src/components/field/composed/FieldGenotypeStr.tsx +31 -0
  51. package/src/components/field/composed/FieldGnomAd.tsx +58 -0
  52. package/src/components/field/composed/FieldHpo.tsx +50 -0
  53. package/src/components/field/composed/FieldInheritanceModes.tsx +32 -0
  54. package/src/components/field/composed/FieldLocus.tsx +18 -0
  55. package/src/components/field/composed/FieldVipC.tsx +25 -0
  56. package/src/components/field/composed/FieldVipCS.tsx +15 -0
  57. package/src/components/field/composed/FieldVkgl.tsx +37 -0
  58. package/src/components/field/genotype/FieldGenotype.tsx +19 -0
  59. package/src/components/field/genotype/FieldGenotypeType.tsx +9 -0
  60. package/src/components/field/info/FieldConsequence.tsx +15 -0
  61. package/src/components/{record/info/Hgvs.tsx → field/info/FieldHgvs.tsx} +4 -6
  62. package/src/components/field/info/FieldInfo.tsx +27 -0
  63. package/src/components/{record/info/PubMed.tsx → field/info/FieldPubMed.tsx} +4 -7
  64. package/src/components/field/typed/FieldCategorical.tsx +17 -0
  65. package/src/components/{record/field/FieldValueCharacter.tsx → field/typed/FieldCharacter.tsx} +3 -2
  66. package/src/components/{record/field/FieldValueFlag.tsx → field/typed/FieldFlag.tsx} +3 -2
  67. package/src/components/{record/field/FieldValueFloat.tsx → field/typed/FieldFloat.tsx} +3 -2
  68. package/src/components/{record/field/FieldValueInteger.tsx → field/typed/FieldInteger.tsx} +3 -2
  69. package/src/components/{record/field/FieldValueString.tsx → field/typed/FieldString.tsx} +3 -2
  70. package/src/components/field/typed/FieldTyped.tsx +20 -0
  71. package/src/components/field/typed/FieldTypedItem.tsx +49 -0
  72. package/src/components/field/typed/FieldTypedMultiple.tsx +21 -0
  73. package/src/components/filter/Filter.tsx +56 -48
  74. package/src/components/filter/FilterWrapper.scss +23 -0
  75. package/src/components/filter/FilterWrapper.tsx +63 -0
  76. package/src/components/filter/composed/FilterAllelicImbalance.tsx +26 -0
  77. package/src/components/filter/composed/FilterComposed.tsx +92 -0
  78. package/src/components/filter/composed/FilterDeNovo.tsx +35 -0
  79. package/src/components/filter/composed/FilterHpo.tsx +16 -0
  80. package/src/components/filter/composed/FilterInheritance.tsx +42 -0
  81. package/src/components/filter/composed/FilterLocus.tsx +75 -0
  82. package/src/components/filter/composed/FilterVipC.tsx +16 -0
  83. package/src/components/filter/composed/FilterVipCS.tsx +16 -0
  84. package/src/components/filter/fixed/FilterAlt.tsx +20 -0
  85. package/src/components/filter/fixed/FilterChrom.tsx +22 -0
  86. package/src/components/filter/fixed/FilterFilter.tsx +20 -0
  87. package/src/components/filter/fixed/FilterFixed.tsx +96 -0
  88. package/src/components/filter/fixed/FilterId.tsx +20 -0
  89. package/src/components/filter/fixed/FilterPos.tsx +22 -0
  90. package/src/components/filter/fixed/FilterQual.tsx +21 -0
  91. package/src/components/filter/fixed/FilterRef.tsx +22 -0
  92. package/src/components/filter/typed/FilterCategorical.tsx +119 -0
  93. package/src/components/filter/typed/FilterFlag.tsx +23 -0
  94. package/src/components/filter/typed/FilterInterval.tsx +72 -0
  95. package/src/components/filter/typed/FilterString.tsx +43 -0
  96. package/src/components/filter/typed/FilterTyped.tsx +56 -0
  97. package/src/components/form/ButtonApply.tsx +11 -0
  98. package/src/components/form/ButtonDownload.tsx +11 -0
  99. package/src/components/form/ButtonReset.tsx +9 -0
  100. package/src/components/{Checkbox.tsx → form/Checkbox.tsx} +4 -9
  101. package/src/components/form/Input.tsx +19 -0
  102. package/src/components/form/Select.scss +7 -0
  103. package/src/components/form/Select.tsx +34 -0
  104. package/src/components/tree/DecisionTreeBoolMultiQuery.tsx +1 -1
  105. package/src/components/tree/DecisionTreeBoolQuery.tsx +1 -1
  106. package/src/components/tree/DecisionTreeNode.tsx +41 -39
  107. package/src/components/tree/DecisionTreeNodeBool.tsx +1 -1
  108. package/src/components/tree/DecisionTreeNodeBoolMulti.tsx +1 -1
  109. package/src/components/tree/DecisionTreeNodeCategorical.tsx +1 -1
  110. package/src/components/tree/DecisionTreeNodeExists.tsx +1 -1
  111. package/src/components/tree/DecisionTreeNodeLeaf.tsx +1 -1
  112. package/src/components/tree/DecisionTreeOutcomeNode.tsx +1 -1
  113. package/src/components/tree/DecisionTreePath.tsx +1 -1
  114. package/src/igv.d.ts +2 -1
  115. package/src/index.tsx +48 -19
  116. package/src/mocks/GRCh37/decisionTree.json +23 -22
  117. package/src/mocks/GRCh37/field_metadata.json +435 -95
  118. package/src/mocks/GRCh37/sampleTree.json +143 -0
  119. package/src/mocks/GRCh37/static.ts +63 -133
  120. package/src/mocks/GRCh37/vcf/family.vcf.blob +37 -31
  121. package/src/mocks/GRCh38/decisionTree.json +52 -33
  122. package/src/mocks/GRCh38/decisionTreeStr.json +572 -0
  123. package/src/mocks/GRCh38/fasta/chr1_149380406-149403321.fasta.gz.blob +0 -0
  124. package/src/mocks/GRCh38/field_metadata.json +435 -95
  125. package/src/mocks/GRCh38/sampleTree.json +175 -0
  126. package/src/mocks/GRCh38/static.ts +101 -42
  127. package/src/mocks/GRCh38/str.cram.blob +0 -0
  128. package/src/mocks/GRCh38/str.cram.crai.blob +0 -0
  129. package/src/mocks/GRCh38/vcf/family.vcf.blob +25 -24
  130. package/src/mocks/GRCh38/vcf/no_vep.vcf.blob +29 -28
  131. package/src/mocks/GRCh38/vcf/samples_0.vcf.blob +28 -27
  132. package/src/mocks/GRCh38/vcf/samples_1.vcf.blob +29 -28
  133. package/src/mocks/GRCh38/vcf/samples_100.vcf.blob +28 -27
  134. package/src/mocks/GRCh38/vcf/str.vcf.blob +321 -0
  135. package/src/mocks/MockApiClient.ts +341 -328
  136. package/src/mocks/config_cram.json +701 -0
  137. package/src/mocks/config_vcf.json +699 -0
  138. package/src/store/app.ts +30 -0
  139. package/src/store/index.tsx +3 -168
  140. package/src/store/variants.ts +182 -0
  141. package/src/types/config.d.ts +190 -0
  142. package/src/types/configCellComposed.d.ts +86 -0
  143. package/src/types/configCells.d.ts +129 -0
  144. package/src/types/configFilter.d.ts +80 -0
  145. package/src/types/configFilterComposed.d.ts +60 -0
  146. package/src/types/configSort.d.ts +13 -0
  147. package/src/types/filter.d.ts +17 -0
  148. package/src/types/store.d.ts +34 -0
  149. package/src/utils/api.ts +281 -0
  150. package/src/utils/config/config.ts +182 -0
  151. package/src/utils/config/configCells.ts +74 -0
  152. package/src/utils/config/configCellsComposed.ts +508 -0
  153. package/src/utils/config/configCellsField.ts +61 -0
  154. package/src/utils/config/configCellsFixed.ts +126 -0
  155. package/src/utils/config/configFilters.ts +46 -0
  156. package/src/utils/config/configFiltersComposed.ts +208 -0
  157. package/src/utils/config/configFiltersField.ts +49 -0
  158. package/src/utils/config/configFiltersFixed.ts +106 -0
  159. package/src/utils/config/configSorts.ts +44 -0
  160. package/src/utils/config/configValidator.ts +380 -0
  161. package/src/utils/config/configVip.ts +25 -0
  162. package/src/utils/csq.ts +115 -0
  163. package/src/utils/decisionTree.ts +45 -0
  164. package/src/utils/download.ts +30 -0
  165. package/src/utils/error.ts +69 -0
  166. package/src/utils/query/query.ts +55 -0
  167. package/src/utils/query/queryFilter.ts +132 -0
  168. package/src/utils/query/queryFilterComposed.ts +247 -0
  169. package/src/utils/query/queryFilterField.ts +75 -0
  170. package/src/utils/query/queryFilterFixed.ts +44 -0
  171. package/src/utils/query/querySample.ts +18 -0
  172. package/src/utils/query/queryVariantType.ts +76 -0
  173. package/src/utils/query/selector.ts +41 -0
  174. package/src/utils/{sortUtils.ts → query/sort.ts} +32 -11
  175. package/src/utils/sample.ts +19 -35
  176. package/src/utils/utils.ts +66 -2
  177. package/src/utils/variantType.ts +43 -0
  178. package/src/utils/vcf.ts +352 -0
  179. package/src/views/Help.tsx +109 -114
  180. package/src/views/Home.tsx +3 -2
  181. package/src/views/Sample.tsx +12 -7
  182. package/src/views/SampleVariant.tsx +23 -112
  183. package/src/views/SampleVariantConsequence.tsx +54 -114
  184. package/src/views/SampleVariants.tsx +33 -445
  185. package/src/views/SampleVariantsRedirect.tsx +20 -0
  186. package/src/views/Samples.tsx +7 -10
  187. package/src/views/Variant.tsx +31 -61
  188. package/src/views/VariantConsequence.tsx +42 -72
  189. package/src/views/Variants.tsx +29 -138
  190. package/src/views/VariantsRedirect.tsx +25 -0
  191. package/src/views/data/data.tsx +32 -6
  192. package/tests/store/variants.test.ts +122 -0
  193. package/tests/utils/config/config.test.ts +167 -0
  194. package/tests/utils/config/configCells.test.ts +86 -0
  195. package/tests/utils/config/configCellsComposed.test.ts +1163 -0
  196. package/tests/utils/config/configCellsField.test.ts +164 -0
  197. package/tests/utils/config/configCellsFixed.test.ts +99 -0
  198. package/tests/utils/config/configFilters.test.ts +80 -0
  199. package/tests/utils/config/configFiltersComposed.test.ts +504 -0
  200. package/tests/utils/config/configFiltersField.test.ts +140 -0
  201. package/tests/utils/config/configFiltersFixed.test.ts +81 -0
  202. package/tests/utils/config/configSorts.test.ts +55 -0
  203. package/tests/utils/config/configValidator.test.ts +56 -0
  204. package/tests/utils/config/configVip.test.ts +53 -0
  205. package/tests/utils/decisionTree.test.ts +71 -0
  206. package/tests/utils/download.test.ts +20 -0
  207. package/tests/utils/query/query.test.ts +84 -0
  208. package/tests/utils/query/queryFilter.test.ts +243 -0
  209. package/tests/utils/query/queryFilterComposed.test.ts +301 -0
  210. package/tests/utils/query/queryFilterField.test.ts +75 -0
  211. package/tests/utils/query/queryFilterFixed.test.ts +86 -0
  212. package/tests/utils/query/querySample.test.ts +45 -0
  213. package/tests/utils/query/queryVariantType.test.ts +56 -0
  214. package/{src/__tests__/sortUtils.test.ts → tests/utils/query/sort.test.ts} +3 -4
  215. package/tests/utils/sample.test.ts +259 -0
  216. package/tests/utils/utils.test.ts +120 -0
  217. package/tests/utils/variantType.test.ts +48 -0
  218. package/tests/utils/vcf.test.ts +649 -0
  219. package/tsconfig.json +6 -2
  220. package/vite.config.mts +20 -3
  221. package/.eslintignore +0 -4
  222. package/.eslintrc.js +0 -23
  223. package/src/Api.ts +0 -12
  224. package/src/__tests__/decisionTreeUtils.test.ts +0 -75
  225. package/src/__tests__/field.test.ts +0 -107
  226. package/src/__tests__/query.test.ts +0 -188
  227. package/src/__tests__/sample.test.ts +0 -184
  228. package/src/__tests__/utils.test.ts +0 -24
  229. package/src/__tests__/viewUtils.test.ts +0 -125
  230. package/src/components/ConsequenceTable.tsx +0 -45
  231. package/src/components/Error.tsx +0 -9
  232. package/src/components/FieldHeader.tsx +0 -26
  233. package/src/components/InfoCollapsablePane.tsx +0 -90
  234. package/src/components/VariantInfoNestedTable.tsx +0 -127
  235. package/src/components/VariantSampleTable.tsx +0 -58
  236. package/src/components/VariantsSampleTable.tsx +0 -183
  237. package/src/components/VariantsTable.tsx +0 -124
  238. package/src/components/filter/FilterAllelicBalance.tsx +0 -81
  239. package/src/components/filter/FilterCategorical.tsx +0 -81
  240. package/src/components/filter/FilterClinVar.tsx +0 -21
  241. package/src/components/filter/FilterGene.tsx +0 -34
  242. package/src/components/filter/FilterHpo.tsx +0 -161
  243. package/src/components/filter/FilterInheritance.tsx +0 -162
  244. package/src/components/filter/FilterIntegerGq.tsx +0 -47
  245. package/src/components/filter/FilterVI.tsx +0 -68
  246. package/src/components/filter/FilterVariantType.tsx +0 -146
  247. package/src/components/filter/Filters.tsx +0 -29
  248. package/src/components/filter/InfoFilter.tsx +0 -39
  249. package/src/components/filter/InfoFilters.tsx +0 -35
  250. package/src/components/filter/SampleFilters.tsx +0 -93
  251. package/src/components/filter/SamplesFilters.tsx +0 -33
  252. package/src/components/record/Allele.tsx +0 -38
  253. package/src/components/record/AlleleBreakend.tsx +0 -5
  254. package/src/components/record/AlleleMissing.tsx +0 -5
  255. package/src/components/record/AlleleNucs.tsx +0 -49
  256. package/src/components/record/AlleleSymbolic.tsx +0 -5
  257. package/src/components/record/Alt.tsx +0 -17
  258. package/src/components/record/Chrom.tsx +0 -5
  259. package/src/components/record/Format.tsx +0 -40
  260. package/src/components/record/Info.tsx +0 -55
  261. package/src/components/record/Pos.tsx +0 -5
  262. package/src/components/record/Qual.tsx +0 -5
  263. package/src/components/record/RecordDownload.tsx +0 -66
  264. package/src/components/record/Ref.tsx +0 -6
  265. package/src/components/record/field/Field.tsx +0 -36
  266. package/src/components/record/field/FieldMultipleValue.tsx +0 -22
  267. package/src/components/record/field/FieldSingleValue.tsx +0 -35
  268. package/src/components/record/info/ClinVar.tsx +0 -81
  269. package/src/components/record/info/Consequence.tsx +0 -18
  270. package/src/components/record/info/Gene.tsx +0 -56
  271. package/src/components/record/info/GnomAD.tsx +0 -54
  272. package/src/components/record/info/Hpo.tsx +0 -52
  273. package/src/components/record/info/InheritanceModes.tsx +0 -22
  274. package/src/components/record/info/VipC.tsx +0 -23
  275. package/src/components/record/info/Vkgl.tsx +0 -42
  276. package/src/mocks/GRCh37/vcf/no_vep.vcf.blob +0 -61
  277. package/src/mocks/GRCh37/vcf/samples_0.vcf.blob +0 -93
  278. package/src/mocks/GRCh37/vcf/samples_1.vcf.blob +0 -93
  279. package/src/mocks/GRCh37/vcf/samples_100.vcf.blob +0 -93
  280. package/src/utils/ApiUtils.ts +0 -259
  281. package/src/utils/csqUtils.ts +0 -27
  282. package/src/utils/decisionTreeUtils.ts +0 -14
  283. package/src/utils/field.ts +0 -49
  284. package/src/utils/query.ts +0 -154
  285. package/src/utils/viewUtils.ts +0 -32
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 18.18.2
1
+ engine-strict=true
package/.travis.yml CHANGED
@@ -1,6 +1,8 @@
1
1
  os: linux
2
- dist: focal
2
+ dist: jammy
3
3
  language: node_js
4
+ node_js:
5
+ - 22
4
6
  branches:
5
7
  only:
6
8
  - main
@@ -11,30 +13,26 @@ cache:
11
13
  - "~/.pnpm-store"
12
14
  before_install:
13
15
  - corepack enable
14
- - corepack prepare pnpm@latest-8 --activate
16
+ - corepack prepare pnpm@latest-9 --activate
15
17
  - pnpm config set store-dir ~/.pnpm-store
16
18
  install:
17
19
  - pnpm install
18
20
  script:
19
21
  - pnpm run lint
20
- - pnpm run test
21
- before_deploy:
22
+ - pnpm run coverage
22
23
  - pnpm run build
24
+ before_deploy:
23
25
  - mv dist/index.html dist/vip-report-template.html
24
26
  deploy:
25
- - provider: npm
26
- api_token:
27
- secure: TxQUU8xNTVTqhQ6pYTR+ic7Crv6rPZ7UbRo8HJJOGlFA30Vb/O36kh3Vgwx3fM5oinC1I38pzmHjJ4WVz2qiUZcgNzDHMorQhErbfSWLO8G7XTsVkMkyozPPtgdCCT2Z7FfdTKmY5an+V4ZJlreM83+vlJmUzMoGahZElESBk94QkTnPAqk46whXAf/zToEw7OJsxd2N3uPyPB8+rgg5VMApRBsCegt3KyetiMBIYWX+kJLxXEGK7OnJmxz1SGrYHR87YEDog7awBIhrXNcBWc4Lj55oWEqp3JQlpLnVDhEUCSO8cmQkyIMTYZ3eIKoyrDk9vfAYYbDsRvagFXKTZGvv0ZQv8s7a1lWAadTyvgbmo3cvX/KHfam5pGf2DFEXWIHZgvoIzq8GY6V4sjOEWRG2sAn+jKiNT5jPgG8sG0faP2JVr55WoN4jRthk5ABckyS8PByWrwcLILTeBPuX7DpiKtzUzzRw/qHAGo59+bFyZiKIc5I+S59fnttJ6Vz4jpjsavOzNsgIGUsTs3y1kosNLYoJVcI3RjpgHQuOfzawKb2l22B5wbJ1/1llhrSqYCtEjAhUuruB3bhy+/WiN4ulKp29Ct7/IEN3ctBXdMBm2xCPlsPSTBeXzwJNeWykTnpFx9qykjtSj3CwS8ZDnY3M+/dLhywrI46EGa03YRw=
27
+ - provider: script
28
+ script: bash scripts/deploy_npm_registry.sh
28
29
  on:
29
30
  tags: true
30
- edge:
31
- branch: v2.0.3-beta.4 # workaround for https://travis-ci.community/t/builds-suddenly-fail-with-error-installing-dpl/14270/3
32
31
  - provider: releases
33
32
  token:
34
33
  secure: rQ19Q5xN6T+dJp4nDT+B4QREJNCc9HpOdipE7jcAP/PVD49kd3AI4joZD9nBn53a091rl7VHviqzyRvHyvBI00VWGhQOmbUqd45c5h4Vn0qUZno2Wl2M7iuUyllvovQHS0C34nLDSBkKhJv0ESit/xiyyVy8JxwO1mgFcLgsY0cKiupwbhepUw5V2S458pNLW9e4RxT7RIaQWUagYp+PJYRKAYn5AAxih65mv2+wSGQPzcOKJDRSTlDtLaCrfZCNJm/7f3iSAOm1CCA1HLxNO2ACFL4bhnghWPS7O6VyTv1POexgwbH0OQxHmO/pdm3geLrTWX7PaHaZNUB1CHoNXC5FE/J9sUSrjClfGL9qFo5WEkBAgH3a5lLwUoCWZecUJPnyeIEFieg5OSjnXFrTECWo5Ut4g5RtzOWQtTLEwOXQgDBtE3NLkH/DRayO9vliEs9/6CnZ8AndH17cj/GmB//2DTjOMr3yCQVuI5ZeANBAUoXAg/C6kQDTdP8oyLay7UBJnX1aEWWLf3Gwo0UBFE83YIuzqVzIvU8HYgFiPgjxFwKBmebS4qu1n9ils2X0nWaY9KZY4lIjzkxsgsZ2pqt1Z6a5AQsEqXv06Tjy6tB7/I9TG7vl4eTBBJBPsRKMNnTfkE6Zr3oHC+ihWIMolAqyaTriOh23Gs/xzEuK+T8=
35
34
  file: dist/vip-report-template.html
36
35
  on:
37
36
  tags: true
38
- edge:
39
- branch: v2.0.3-beta.4 # workaround for https://travis-ci.community/t/builds-suddenly-fail-with-error-installing-dpl/14270/3
37
+ edge: true
40
38
 
package/README.md CHANGED
@@ -1,9 +1,419 @@
1
1
  [![Build Status](https://app.travis-ci.com/molgenis/vip-report-template.svg?branch=main)](https://app.travis-ci.com/molgenis/vip-report-template)
2
+
2
3
  # vip-report-template
3
- The default report template for the [VIP report generator](https://github.com/molgenis/vip-report). This template is a good default for any .vcf file with support for .vcf files annotated with [VIP](https://github.com/molgenis/vip).
4
+
5
+ The default report template for the [VIP report generator](https://github.com/molgenis/vip-report). This template is a
6
+ good default for any .vcf file with support for .vcf files annotated with [VIP](https://github.com/molgenis/vip).
7
+
4
8
  ## Usage
9
+
5
10
  ```bash
6
11
  $ pnpm install
7
12
  $ pnpm run build # build report template in dist folder
8
13
  $ pnpm run dev # dev server on localhost:3000
9
14
  ```
15
+
16
+ ## Config
17
+
18
+ The config.json file is used to configure which fields, filters and sort options are shown on screen.
19
+ Furthermore, it is used to pass the vip pipeline configuration to the report template.
20
+ There are 3 top level elements:
21
+
22
+ - vip: used to pass the VIP configuration
23
+ - sample_variants: to configure the sample variants screen
24
+ - variants: to configure the variants screen
25
+
26
+ Example:
27
+
28
+ ```
29
+ {
30
+ "vip": {VIP_CONFIG_HERE},
31
+ "sample_variants": {SAMPLE_VARIANTS_SCREEN_CONFIG_HERE},
32
+ "variants": {VARIANTS_SCREEN_CONFIG_HERE},
33
+ "sample_variant": {SAMPLE_VARIANT_SCREEN_CONFIG_HERE},
34
+ "variant": {VARIANT_SCREEN_CONFIG_HERE},
35
+ "sample_variant_consequence": {SAMPLE_VARIANT_CONSEQUENCE_SCREEN_CONFIG_HERE},
36
+ "variant_consequence": {VARIANT_CONSEQUENCE_SCREEN_CONFIG_HERE}
37
+ }
38
+ ```
39
+
40
+ ### VIP config
41
+
42
+ ### Configuring screen content
43
+
44
+ #### Variant types
45
+
46
+ For the sample variant view multiple "subviews":
47
+
48
+ - all: which shows all types of variants
49
+ - snv: shows the single nucleotide variants and small indels.
50
+ - sv: shows structural variants
51
+ - str: shows the short tandem repeats.
52
+ All of these screens can be configured independently, if the configuration for a specific variant type view is
53
+ missing, the "all" configuration is used for this specific view.
54
+
55
+ Example:
56
+
57
+ ```
58
+ "cells": {
59
+ "all": [FIELDS_CONFIG_HERE],
60
+ "snv": [FIELDS_CONFIG_HERE],
61
+ "sv": [FIELDS_CONFIG_HERE],
62
+ ```
63
+
64
+ "str" is missing in this example, the "all" config is used for the str view.
65
+
66
+ #### Cells
67
+
68
+ This section specifies which information should be shown in the table with variant information.
69
+ Per cell the following information can/should be specified:
70
+
71
+ - "type": the type of field, one of:
72
+ - fixed: the standard columns of an VCF file, excluding the FORMAT and INFO columns,
73
+ one of: pos,id,ref,alt,qual,filter
74
+ - info: a VCF INFO field
75
+ - format: a VCF FORMAT field, currently unsupported
76
+ - genotype: a VCF FORMAT field in the context of the current sample of the screen.
77
+ - composed: a custom field based on information from multiple fields, see the "Composed" section.
78
+ - "name": the name of the field in the VCF file
79
+ - "label": optional label, name is used if no label is specified.
80
+ - "description": optional description to be shown in the tooltip for the column on screen.
81
+
82
+ Example:
83
+
84
+ ```
85
+ {
86
+ "type": "info",
87
+ "name": "myInfoField"
88
+ },
89
+ {
90
+ "type": "composed",
91
+ "name": "my_composed_fieldname",
92
+ "label": "My Composed Field Label",
93
+ "description": "Description explaining that this is just and example field."
94
+ },
95
+ ```
96
+
97
+ ##### Groups
98
+
99
+ Cells can be grouped to indicate that certain cells belong together, an example of this are the child fields of the VEP
100
+ INFO field.
101
+
102
+ Example:
103
+
104
+ ```
105
+ {
106
+ "type": "info",
107
+ "name": "myInfoField"
108
+ },
109
+ {
110
+ "type": "group",
111
+ "fields": [
112
+ {
113
+ "type": "info",
114
+ "name": "CSQ/Consequence",
115
+ },
116
+ {
117
+ "type": "info",
118
+ "name": "CSQ/SYMBOL"
119
+ }
120
+ ]
121
+ }
122
+ ```
123
+
124
+ ##### Composed
125
+
126
+ The following composed field are available:
127
+
128
+ | id | required | optional | description |
129
+ |--------------------|-----------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
130
+ | clinVar | `INFO/CSQ/clinVar_CLNSIG` | `INFO/CSQ/clinVar_CLNID`, `INFO/CSQ/clinVar_CLNREVSTAT` | This field shows the ClinVar values with a tooltip containing the ClinVar star rating. |
131
+ | gene | `INFO/CSQ/SYMBOL` | `INFO/CSQ/Gene`, `INFO/CSQ/IncompletePenetrance`, `INFO/CSQ/SYMBOL_SOURCE` | The gene name with a link to https://genenames.org and an indication if the gene is associated with incomplete penetrance. |
132
+ | genotype | `FORMAT/GT`, `sample` exists | `FORMAT/REPCN`, `FORMAT/VIAB`, `INFO/SVTYPE`, `INFO/RU`, `INFO/RUMATCH`, `INFO/DisplayRU` | Shows 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. |
133
+ | genotype_maternal | `FORMAT/GT`, `sample.maternalId` exists | `FORMAT/REPCN`, `FORMAT/VIAB`, `INFO/SVTYPE`, `INFO/RU`, `INFO/RUMATCH`, `INFO/DisplayRU` | Same as `genotype`, but for the maternal sample |
134
+ | genotype_paternal | `FORMAT/GT`, `sample.paternalId` exists | `FORMAT/REPCN`, `FORMAT/VIAB`, `INFO/SVTYPE`, `INFO/RU`, `INFO/RUMATCH`, `INFO/DisplayRU` | Same as `genotype`, but for the paternal sample |
135
+ | gnomAdAf | `INFO/CSQ/gnomAD_AF` | `INFO/CSQ/gnomAD_COV`, `INFO/CSQ/gnomAD_QC`, `INFO/CSQ/ALLELE_NUM` | Shows the GnomAD allele frequency with a link to https://gnomad.broadinstitute.org, and an indicator to warn for low quality. |
136
+ | hpo | `INFO/CSQ/HPO` | `INFO/CSQ/GADO_PD` | Shows 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. |
137
+ | inheritancePattern | `INFO/CSQ/InheritanceModesGene` | `FORMAT/VIC` | Shows 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. |
138
+ | locus | `CHROM`, `POS` | | show chromosome:position with a link to the report variant detail view. |
139
+ | vipC | `INFO/CSQ/VIPC` | `INFO/CSQ/VIPP` | shows the VIP classification with a link to the consequence details view, and the VIP classification path as tooltip. |
140
+ | vipCS | `FORMAT/VIPC_S`, `sample` exists | `FORMAT/VIPP_S` | shows the VIP classification with a link to the consequence details view, and the VIP classification path as tooltip. |
141
+ | vkgl | `INFO/CSQ/VKGL_CL` | `INFO/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_VUMC` | shows the VKGL classification(s), if data for specific labs is available this is shown in the tooltip. |
142
+
143
+ A composed field will be used in the report if the requirements are met, otherwise it will be ignored.
144
+
145
+ #### Filters
146
+
147
+ ##### Composed
148
+
149
+ The following composed filters are available:
150
+
151
+ | id | required | optional | description |
152
+ |------------------|----------------------------------------------------------------------------------------------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
153
+ | allelicImbalance | `FORMAT/GT`, `FORMAT/VIAB`, `sample` exists | | Filter to select variants that are/are not showing allelic imbalance. |
154
+ | deNovo | `FORMAT/VID`, `sample` exists | | Filter to select only variants that are/are not DeNovo |
155
+ | hpo | `INFO/CSQ/HPO`, `sample` exists, `sample.phenotypes` > 0 | | Filter to select variants that match certain HPO terms |
156
+ | inheritanceMatch | `FORMAT/VIM`, `sample` exists | | Filter to select variants for which the suitable inheritance patterns for the sample contain the selected pattern. |
157
+ | locus | `CHROM`, `POS` | | Filter to select variants based on their chromosome optionally within a certain position range on this chromosome. |
158
+ | vipC | `INFO/CSQ/VIPC`, parameter `vcf.filter.consequences=true`, `vcf.filter.classes` > 0 | | Filter on the VIP classification value stored in INFO/CSQ/VIPC, but only includes categories defined in the VIP configuration parameter `vcf.filter.classes` |
159
+ | vipCS | `FORMAT/VIPC_S`, `sample` exists, `sample.proband=true`, parameter `vcf.filter.sample_classes` > 0 | | Filter 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` |
160
+
161
+ #### Sorts
162
+
163
+ Via this section available sort options and the default sort of the different views can be configured.
164
+ Currently only INFO fields with single numerical values can be used for sorting.
165
+
166
+ Multiple sort fields can be specified for a single sort option to create a secondary, tertiary, etc. sort.
167
+
168
+ Example:
169
+
170
+ ```
171
+ {
172
+ "sorts": {
173
+ "all": [
174
+ {
175
+ "selected": true,
176
+ "orders": [
177
+ {
178
+ "direction": "desc",
179
+ "field": {
180
+ "type": "info",
181
+ "name": "MySortField"
182
+ }
183
+ }
184
+ ]
185
+ },
186
+ {
187
+ "selected": false,
188
+ "orders": [
189
+ {
190
+ "direction": "asc",
191
+ "field": {
192
+ "type": "info",
193
+ "name": "MySortOtherField"
194
+ }
195
+ }
196
+ ]
197
+ }
198
+ ],
199
+ "str": [
200
+ {
201
+ "selected": true,
202
+ "orders": [
203
+ {
204
+ "direction": "desc",
205
+ "field": {
206
+ "type": "info",
207
+ "name": "MySortPrimarySortField"
208
+ }
209
+ },
210
+ {
211
+ "direction": "asc",
212
+ "field": {
213
+ "type": "info",
214
+ "name": "MySortSecondarySortField"
215
+ }
216
+ }
217
+ ]
218
+ },
219
+ {
220
+ "selected": false,
221
+ "orders": [
222
+ {
223
+ "direction": "asc",
224
+ "field": {
225
+ "type": "info",
226
+ "name": "MySortOtherField"
227
+ }
228
+ }
229
+ ]
230
+ }
231
+ ]
232
+ }
233
+ }
234
+ ```
235
+
236
+ #### Records per page
237
+
238
+ Via this section available records per page options and the default can be configured.
239
+
240
+ Example:
241
+
242
+ ```
243
+ "recordsPerPage": {
244
+ "str": [
245
+ {
246
+ "number": 10
247
+ },
248
+ {
249
+ "number": 20,
250
+ "selected": true
251
+ },
252
+ {
253
+ "number": 50
254
+ },
255
+ {
256
+ "number": 100
257
+ }
258
+ ]
259
+ }
260
+ ```
261
+
262
+ ### Wildcards
263
+
264
+ Regular expressions like can be used to include multiple fields at once in you config.
265
+
266
+ Examples:
267
+ Include all INFO fields
268
+
269
+ ```
270
+ {
271
+ "type": "info",
272
+ "name": ".*"
273
+ }
274
+ ```
275
+
276
+ Include all nested CSQ child fields
277
+
278
+ ```
279
+ {
280
+ "type": "info",
281
+ "name": "CSQ/.*"
282
+ }
283
+ ```
284
+
285
+ Include all CSQ child fields starting with a "G" and a name of 4 characters long ending with an "e" (Gene)
286
+
287
+ ```
288
+ {
289
+ "type": "info",
290
+ "name": "CSQ/G..e"
291
+ }
292
+ ```
293
+
294
+ ## Metadata
295
+
296
+ In the metadata json file additional field metadata can be specified in addition or as replacement of the field
297
+ definition in the VCF file
298
+ This is particularly useful for nested fields like VEP, and to specify the categories of a categorical field.
299
+
300
+ Example:
301
+
302
+ ```
303
+ {
304
+ "format": {
305
+ "MyFormatfield": {
306
+ "label": "My Format field",
307
+ "description": "This describes my Format field",
308
+ "numberType": "NUMBER",
309
+ "numberCount": 1,
310
+ "type": "INTEGER"
311
+ },
312
+ "MyCategoricalFormatField": {
313
+ "label": "My Categorical Format Field",
314
+ "description": "This is a format categorical field.",
315
+ "numberType": "NUMBER",
316
+ "numberCount": 1,
317
+ "type": "CATEGORICAL",
318
+ "categories": {
319
+ "1": {
320
+ "label": "Value1",
321
+ "description": "This is value 1"
322
+ },
323
+ "2": {
324
+ "label": "Value2",
325
+ "description": "This is value 2"
326
+ }
327
+ }
328
+ }
329
+ },
330
+ "info": {
331
+ "CSQ": {
332
+ "nestedFields": {
333
+ "MyNestedfield": {
334
+ "label": "My nested field",
335
+ "description": "This describes my nested field",
336
+ "numberType": "NUMBER",
337
+ "numberCount": 1,
338
+ "type": "INTEGER"
339
+ },
340
+ "MyCategoricalNestedField": {
341
+ "label": "My Categorical Nested Field",
342
+ "description": "This is a nested categorical field.",
343
+ "numberType": "NUMBER",
344
+ "numberCount": 1,
345
+ "type": "CATEGORICAL",
346
+ "categories": {
347
+ "1": {
348
+ "label": "Value1",
349
+ "description": "This is value 1"
350
+ },
351
+ "2": {
352
+ "label": "Value2",
353
+ "description": "This is value 2"
354
+ }
355
+ }
356
+ }
357
+ }
358
+ },
359
+ "MyInfofield": {
360
+ "label": "My INFO field",
361
+ "description": "This describes my INFO field",
362
+ "numberType": "NUMBER",
363
+ "numberCount": 1,
364
+ "type": "INTEGER"
365
+ },
366
+ "MyCategoricalField": {
367
+ "label": "My Categorical Field",
368
+ "description": "This is a categorical field.",
369
+ "numberType": "NUMBER",
370
+ "numberCount": 1,
371
+ "type": "CATEGORICAL",
372
+ "categories": {
373
+ "1": {
374
+ "label": "Value1",
375
+ "description": "This is value 1"
376
+ },
377
+ "2": {
378
+ "label": "Value2",
379
+ "description": "This is value 2"
380
+ }
381
+ }
382
+ }
383
+ }
384
+ }
385
+ ```
386
+
387
+ ### Null values
388
+
389
+ In the metadata json file "null" values can be specified for categorical fields, these values should contain a label and
390
+ optionally a description.
391
+ The label value is rendered in filters and used to display the file in tables and views if it is empty, the description
392
+ is used in tooltips.
393
+ In cases where the categorical field is of a type that can have multiple values, an array containing the null value is
394
+ returned if the field is empty.
395
+
396
+ ### Example
397
+
398
+ ```
399
+ "MyCategoricalField": {
400
+ "label": "My Categorical Field",
401
+ "description": "This is a categorical field.",
402
+ "numberType": "NUMBER",
403
+ "numberCount": 1,
404
+ "type": "CATEGORICAL",
405
+ "categories": {
406
+ "1": {
407
+ "label": "Value1",
408
+ "description": "This is value 1"
409
+ },
410
+ "2": {
411
+ "label": "Value2",
412
+ "description": "This is value 2"
413
+ }
414
+ },
415
+ "nullValue": {
416
+ "label": "EmptyValue"
417
+ }
418
+ }
419
+ ```
@@ -0,0 +1,11 @@
1
+ import pluginJs from "@eslint/js";
2
+ // workaround: import .js because of https://github.com/solidjs-community/eslint-plugin-solid/issues/118
3
+ import solid from "eslint-plugin-solid/configs/typescript";
4
+ import tseslint from "typescript-eslint";
5
+
6
+ export default [
7
+ { files: ["**/*.{js,mjs,cjs,ts,tsx}"] },
8
+ pluginJs.configs.recommended,
9
+ solid,
10
+ ...tseslint.configs.recommended,
11
+ ];
package/package.json CHANGED
@@ -1,47 +1,38 @@
1
1
  {
2
2
  "name": "@molgenis/vip-report-template",
3
- "version": "6.1.1",
3
+ "version": "7.0.0",
4
4
  "description": "Report Template for Variant Call Format (VCF) Report Generator",
5
- "scripts": {
6
- "build": "vite build",
7
- "build-dev": "vite build --mode dev",
8
- "coverage": "vitest run --coverage",
9
- "dev": "vite",
10
- "format": "prettier --write src/**/*.{tsx,ts}",
11
- "lint": "eslint src/**/*.{tsx,ts}",
12
- "prepare": "husky",
13
- "test": "vitest run",
14
- "test:watch": "vitest"
15
- },
16
5
  "license": "LGPL-3.0",
17
6
  "devDependencies": {
18
- "@molgenis/vite-plugin-inline": "^1.0.24",
19
- "@typescript-eslint/eslint-plugin": "^7.12.0",
20
- "@typescript-eslint/parser": "^7.12.0",
21
- "@vitest/coverage-v8": "^1.6.0",
22
- "bulma": "^1.0.1",
23
- "eslint": "^8.57.0",
7
+ "@molgenis/vite-plugin-inline": "^1.0.27",
8
+ "@types/async-lock": "^1.4.2",
9
+ "@types/node": "^22.9.3",
10
+ "@vitest/coverage-v8": "^2.1.5",
11
+ "async-lock": "^1.4.1",
12
+ "bulma": "^1.0.2",
13
+ "eslint": "^9.15.0",
24
14
  "eslint-config-prettier": "^9.1.0",
25
- "eslint-plugin-prettier": "^5.1.3",
26
- "eslint-plugin-solid": "^0.14.0",
27
- "husky": "^9.0.11",
28
- "jsdom": "^24.1.0",
29
- "prettier": "^3.3.1",
30
- "sass": "^1.77.4",
31
- "typescript": "^5.4.5",
32
- "vite": "^5.2.12",
15
+ "eslint-plugin-solid": "^0.14.4",
16
+ "husky": "^9.1.7",
17
+ "jsdom": "^25.0.1",
18
+ "prettier": "^3.3.3",
19
+ "sass": "^1.81.0",
20
+ "typescript": "^5.6.3",
21
+ "typescript-eslint": "^8.15.0",
22
+ "vite": "^5.4.11",
33
23
  "vite-plugin-solid": "^2.10.2",
34
- "vitest": "^1.6.0"
24
+ "vitest": "^2.1.5"
35
25
  },
36
26
  "dependencies": {
37
- "@fortawesome/fontawesome-svg-core": "^6.5.2",
38
- "@fortawesome/free-solid-svg-icons": "^6.5.2",
39
- "@molgenis/vip-report-api": "^5.0.4",
40
- "@molgenis/vip-report-vcf": "^2.0.2",
41
- "@solidjs/router": "^0.13.5",
27
+ "@fortawesome/fontawesome-svg-core": "^6.7.1",
28
+ "@fortawesome/free-solid-svg-icons": "^6.7.1",
29
+ "@molgenis/vip-report-api": "^6.2.1",
30
+ "@molgenis/vip-report-vcf": "^3.0.8",
31
+ "@solidjs/router": "^0.15.1",
32
+ "ajv": "^8.17.1",
42
33
  "base64-js": "^1.5.1",
43
- "igv": "^2.15.11",
44
- "solid-js": "^1.8.17"
34
+ "igv": "^3.1.0",
35
+ "solid-js": "^1.9.3"
45
36
  },
46
37
  "lint-staged": {
47
38
  "src/**/*.{tsx,ts}": [
@@ -59,5 +50,19 @@
59
50
  "repository": {
60
51
  "type": "git",
61
52
  "url": "git+https://github.com/molgenis/vip-report-template.git"
53
+ },
54
+ "engines": {
55
+ "node": "22",
56
+ "pnpm": "9"
57
+ },
58
+ "scripts": {
59
+ "build": "vite build",
60
+ "build-dev": "vite build --mode dev",
61
+ "coverage": "vitest run --coverage",
62
+ "dev": "vite",
63
+ "format": "prettier --write src/**/*.{json,tsx,ts}",
64
+ "lint": "eslint src/**/*.{json,tsx,ts}",
65
+ "test": "vitest run",
66
+ "test:watch": "vitest"
62
67
  }
63
- }
68
+ }
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env bash
2
+ pnpm config set registry "https://registry.npmjs.org"
3
+ pnpm config set //registry.npmjs.org/:_authToken "${NPM_TOKEN}"
4
+ # workaround: packageManager is added to package.json after git checkout resulting in 'Unclean working tree' error
5
+ pnpm publish --no-git-checks .