From 66c3614468dde30e40b51c8d9b74f870360d1506 Mon Sep 17 00:00:00 2001 From: Dennis Hendriksen Date: Fri, 23 Apr 2021 09:50:05 +0200 Subject: [PATCH 1/3] update vip-report-api 2.1.0 to 2.2.0 --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6c804842..79d652a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "2.1.0", "license": "LGPL-3.0", "dependencies": { - "@molgenis/vip-report-api": "^2.1.0", + "@molgenis/vip-report-api": "^2.2.0", "bootstrap-vue": "^2.21.2", "core-js": "^3.9.1", "file-saver": "^2.0.5", @@ -2359,9 +2359,9 @@ } }, "node_modules/@molgenis/vip-report-api": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@molgenis/vip-report-api/-/vip-report-api-2.1.0.tgz", - "integrity": "sha512-uPCT2JxGFfh3EUkK76GMjwXZeqDKt06OpoSsaE47whGcUndKifULbdQPAYLiMVOu2SPGi+Ol4QCWCSsLexhYwQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@molgenis/vip-report-api/-/vip-report-api-2.2.0.tgz", + "integrity": "sha512-4XD+5jBWTEWjXgB/46yFJARD99tgQlYK064eMnukrv6PMHlRdhmpL60zmjzrJ/DVdbzZoWR5aE8hZ1xoJS9o7A==", "dependencies": { "ascii85": "^1.0.2", "buffer": "^6.0.3", @@ -26954,9 +26954,9 @@ } }, "@molgenis/vip-report-api": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@molgenis/vip-report-api/-/vip-report-api-2.1.0.tgz", - "integrity": "sha512-uPCT2JxGFfh3EUkK76GMjwXZeqDKt06OpoSsaE47whGcUndKifULbdQPAYLiMVOu2SPGi+Ol4QCWCSsLexhYwQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@molgenis/vip-report-api/-/vip-report-api-2.2.0.tgz", + "integrity": "sha512-4XD+5jBWTEWjXgB/46yFJARD99tgQlYK064eMnukrv6PMHlRdhmpL60zmjzrJ/DVdbzZoWR5aE8hZ1xoJS9o7A==", "requires": { "ascii85": "^1.0.2", "buffer": "^6.0.3", diff --git a/package.json b/package.json index 13166dcc..2d399ca9 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "i18n:report": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/locales/**/*.json'" }, "dependencies": { - "@molgenis/vip-report-api": "^2.1.0", + "@molgenis/vip-report-api": "^2.2.0", "bootstrap-vue": "^2.21.2", "core-js": "^3.9.1", "file-saver": "^2.0.5", From 85f4faf36cb2fe7fcd21168039c44f9f33053c89 Mon Sep 17 00:00:00 2001 From: Dennis Hendriksen Date: Fri, 23 Apr 2021 10:02:30 +0200 Subject: [PATCH 2/3] genome browser: use embedded genes data --- src/components/GenomeBrowser.vue | 18 +++++++++++++++--- src/mocks/apiDataMock.ts | 4 +++- src/store/actions.ts | 3 +++ tests/unit/store/actions.spec.ts | 5 +++++ 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/components/GenomeBrowser.vue b/src/components/GenomeBrowser.vue index 4f2492b4..12df30f1 100644 --- a/src/components/GenomeBrowser.vue +++ b/src/components/GenomeBrowser.vue @@ -14,7 +14,7 @@ export default Vue.extend({ ...mapState(['selectedRecord']) }, methods: { - ...mapActions(['getFastaGz', 'getVcfGz']), + ...mapActions(['getFastaGz', 'getGenesGz', 'getVcfGz']), hasGenomeBrowser() { return Vue.prototype.$browser !== undefined; }, @@ -40,9 +40,14 @@ export default Vue.extend({ Vue.prototype.$browser = undefined; }, async createBrowserConfig(record: Vcf.Record): Promise { - const data = await Promise.all([this.getFastaGz({ contig: record.c, pos: record.p }), this.getVcfGz()]); + const data = await Promise.all([ + this.getFastaGz({ contig: record.c, pos: record.p }), + this.getVcfGz(), + this.getGenesGz() + ]); const fastaGz = data[0]; const vcfGz = data[1]; + const genesGz = data[2]; if (fastaGz === null) { return null; } @@ -54,7 +59,14 @@ export default Vue.extend({ name: 'Variants', url: 'data:application/gzip;base64,' + vcfGz.toString('base64') }); - + if (genesGz !== null) { + tracks.push({ + type: 'annotation', + format: 'gff', + name: 'Genes', + url: 'data:application/gzip;base64,' + genesGz.toString('base64') + }); + } return { reference: { id: this.genomeBrowserDb !== null ? this.genomeBrowserDb : 'reference_unknown', diff --git a/src/mocks/apiDataMock.ts b/src/mocks/apiDataMock.ts index fc8ae837..5aa94012 100644 --- a/src/mocks/apiDataMock.ts +++ b/src/mocks/apiDataMock.ts @@ -158,6 +158,8 @@ export const apiData: ApiData.Container = { 'ABzY800000001qKyA1;|3`6_dB}G2KB`E?3DzpHL>_18Ps2p%MEy)xqf4=X>^L4+S=k)?Gx*k>CRpYNUQv1~E1U1z)<){HUgK@3OpdD*YMpQZCLsRPOg#3HeB%g=*rDgim-XO`4SIzknUZ$mU&QLN&-bH0qq9Tf)?f?nTFQuea#aiBS=9>g64l!@3tiU_ySz#ZKDkW000' - } + }, + genesGz: + 'ABzY8o^FC*00ZroO>g2b5Qfk6S9pc?v`w&`Pe9R%f|hb1q7JodaEKd~lmw-@ud_XJ9FDNu0M{^r_x1;xQhd`hf;rDOqGONH{`#RM@Sq}eELK)E0gvI1|m=F1X|r^EXo@mC~x)8nziNjOobaW~K!s@Zbe8xMcoVRw-bM?Q^g+)kevJJu_i0Yq?z(hkKG*E_Xbs{-~pUCK%#%~l+QM!#1su0(^wSTuztFzvMLBvy%FO3&JD4UcOO1$YV;y9L{uhFu!r*sZ+nXmHTz-k6o{bvm2P#uvqm`(j!7g5UcK`P8{(&(f}R+qqD3qd~b*hCTbmg8$@Y){Sv|Mp_r3%@pQ0@Yt%R`JhGYnrSyB&IqF@id%l`hkYiaObO=YR~8GQ-6Tm;pY*Sp0%0{-D)8(Y_8)QiIu({tOHG4ar=N1tDg^I>oIB1xJg=U0=fUX0TO<9^O6$lgr0m_5KYb6NJ?gxSl4b{mxI!eoLM(s02lUIG&9VhOfsO;&=~F1Jggn9y@jJKo>v5bYd=;wyumnBq(rMEkGKI}53vK^+%Zyfs`nz-jP`%k{tE2Ts|0$$^;w0W1G>qSeL{An{6i0Y(q`{G$6r3ugkl?htHz-ZthZLSHBpO8Bh7#TcDLOSs!_m#Y5|Mz`OA>aBic)*|^)5UO6P)<}P_&0uv*%uRb6OV7ylR@qe}458a%mvrTF#}a>}h~&WDf|kw8x3rwi(Ety3Oe*^v+9z7l;+SM3p@^9QzLFkc*Qvz{L)GE$L?Le-}CWh5gg9H, locus: Locus): Promise { return api.getFastaGz(locus.contig, locus.pos); + }, + getGenesGz(): Promise { + return api.getGenesGz(); } }; diff --git a/tests/unit/store/actions.spec.ts b/tests/unit/store/actions.spec.ts index a9f3af64..b0ae9939 100644 --- a/tests/unit/store/actions.spec.ts +++ b/tests/unit/store/actions.spec.ts @@ -178,3 +178,8 @@ test('get fasta gz', async (done) => { ); done(); }); + +test('get genes gz', async (done) => { + expect(await actions.getGenesGz()).not.toBe(null); + done(); +}); From 275f1e27a693b28af41976e1ec09ead4057db039 Mon Sep 17 00:00:00 2001 From: Dennis Hendriksen Date: Fri, 23 Apr 2021 10:04:06 +0200 Subject: [PATCH 3/3] bump version 2.1.0 to 2.2.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 79d652a0..79901a0a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@molgenis/vip-report-template", - "version": "2.1.0", + "version": "2.2.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@molgenis/vip-report-template", - "version": "2.1.0", + "version": "2.2.0", "license": "LGPL-3.0", "dependencies": { "@molgenis/vip-report-api": "^2.2.0", diff --git a/package.json b/package.json index 2d399ca9..1dc03171 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@molgenis/vip-report-template", - "version": "2.1.0", + "version": "2.2.0", "description": "Report Template for Variant Call Format (VCF) Report Generator", "scripts": { "serve": "vue-cli-service serve",