diff --git a/README.md b/README.md index b22f8e8..d8272c0 100644 --- a/README.md +++ b/README.md @@ -27,10 +27,12 @@ yarn run serve ### Building for production The production build is a minified, concatenated bundle suitable for distribution on a server. -In order to use the Sentry error logging feature, you will need to create a file named -*.env.production.local* (ignored by git) with the following contents: +In order to use the Sentry error logging and Google Analytics feature, you will need to create a +file named *.env.production.local* (ignored by git) with the following contents +(both values are optional if you don't want to use these features): ```dotenv VUE_APP_SENTRY_DSN=https://dsn.example +VUE_APP_GOOGLE_ANALYTICS_KEY=UA-YOURKEY-1 ``` Then build the assets to the `dist/` folder. diff --git a/package.json b/package.json index 5caf014..b41899c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "localzoom", - "version": "0.3.1", + "version": "0.4.0", "license": "MIT", "main": "lib/LzTabix.umd.min.js", "scripts": { @@ -16,7 +16,7 @@ "bootstrap": "^4.1.3", "bootstrap-vue": "^2.0.0-rc.11", "gwas-credible-sets": "^0.1.0", - "locuszoom": "https://github.com/statgen/locuszoom#8b06580", + "locuszoom": "0.10.0-beta.2", "lodash": "^4.17.11", "tabix-reader": "https://github.com/abought/tabix-reader", "tabulator-tables": "^4.1.4", diff --git a/public/index.html b/public/index.html index d7ba38d..ac584f1 100644 --- a/public/index.html +++ b/public/index.html @@ -20,6 +20,17 @@ } + + <% if (process.env.NODE_ENV === 'production' && process.env.VUE_APP_GOOGLE_ANALYTICS_KEY) { %> + + + <% } %> + diff --git a/src/components/AdderWizard.vue b/src/components/AdderWizard.vue index 79ad22a..745b927 100644 --- a/src/components/AdderWizard.vue +++ b/src/components/AdderWizard.vue @@ -90,6 +90,7 @@ export default { first_data_index = this.file_reader.skip; } else { // Some files use headers that are not comment lines. + // FIXME: handle case where no data rows are found first_data_index = rows.findIndex(text => !isHeader(text)); } this.sample_data = rows.slice(first_data_index); diff --git a/src/util/lz-helpers.js b/src/util/lz-helpers.js index 4bc8429..3def512 100644 --- a/src/util/lz-helpers.js +++ b/src/util/lz-helpers.js @@ -181,8 +181,11 @@ function getBasicLayout(initial_state = {}, study_panels = [], mods = {}) { LocusZoom.Layouts.get('panel', 'genes', { proportional_height: 0.5 }), ]; + const dashboard = LocusZoom.Layouts.get('dashboard', 'standard_plot', { unnamespaced: true }); + dashboard.components.push(LocusZoom.Layouts.get('dashboard_components', 'ldlz2_pop_selector')); const extra = Object.assign({ state: initial_state, + dashboard, panels, }, mods); return LocusZoom.Layouts.get('plot', 'standard_association', extra); diff --git a/yarn.lock b/yarn.lock index d429deb..81d14d4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5412,9 +5412,10 @@ locate-path@^3.0.0: p-locate "^3.0.0" path-exists "^3.0.0" -"locuszoom@https://github.com/statgen/locuszoom#8b06580": - version "0.10.0-beta.1" - resolved "https://github.com/statgen/locuszoom#8b065804188279ff33cb30619aa555566c834d36" +locuszoom@0.10.0-beta.2: + version "0.10.0-beta.2" + resolved "https://registry.yarnpkg.com/locuszoom/-/locuszoom-0.10.0-beta.2.tgz#7c007c421ee3c1e39f9adab6612874761bb455c6" + integrity sha512-SkyquD7OCPJQcCrFoJxHBlA9/U9CNJb+EE1n+O/jnX5CqiFlPUHHrzi8KzBUPZ25DQHdtCHXM7YE+0imHTrYDg== dependencies: d3 "3.5.17" promise-polyfill "^8.1.3"