Skip to content

Commit

Permalink
Merge branch 'release/0.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
abought committed Jul 29, 2020
2 parents d795a9e + 33c5389 commit 3464825
Show file tree
Hide file tree
Showing 25 changed files with 1,827 additions and 1,298 deletions.
78 changes: 55 additions & 23 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,57 @@
module.exports = {
root: true,
env: {
node: true,
},
extends: [
'plugin:vue/essential',
'@vue/airbnb',
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'indent': ['error', 4],
'camelcase': 'off',
'object-curly-newline': ['error', {'multiline': true}],
'no-plusplus': ['error', {'allowForLoopAfterthoughts': true}],
'no-param-reassign': [2, { 'props': false }],
'no-underscore-dangle': 'off',
'no-unused-vars': ['error', { 'args': 'none' }]

},
parserOptions: {
parser: 'babel-eslint',
},
root: true,
env: {
node: true,
},
extends: [
'eslint:recommended',
// 'vue-preset/eslint:recommended',
'plugin:vue/essential',
'plugin:vue/recommended',
],
rules: {
'arrow-parens': 'error',
'brace-style': 'error',
'camelcase': 'off',
'comma-dangle': ['warn', 'always-multiline'],
'comma-spacing': 'warn',
'curly': 'error',
'eol-last': 'error',
'eqeqeq': ['error', 'smart'],
'indent': [
'error',
4,
{
'FunctionExpression': { 'parameters': 'first' },
'CallExpression': { 'arguments': 'first' }
}
],
'keyword-spacing': 'warn',
'linebreak-style': ['error', 'unix'],
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-param-reassign': ['error', { 'props': false }],
'no-plusplus': ['error', { 'allowForLoopAfterthoughts': true }],
'no-underscore-dangle': 'off',
'no-unused-vars': ['error', { 'args': 'none' }],
'object-curly-newline': ['error', { consistent: true }],
'prefer-template': 'error',
'quotes': [
'error',
'single',
{
'avoidEscape': true,
'allowTemplateLiterals': true
}
],
'semi': [
'error',
'always'
],
'space-before-blocks': 'error',
'space-infix-ops': 'error'
},
parserOptions: {
parser: 'babel-eslint',
},
};
5 changes: 0 additions & 5 deletions .postcssrc.js

This file was deleted.

9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{
"name": "localzoom",
"version": "0.5.4",
"version": "0.6.0",
"license": "MIT",
"main": "lib/LzTabix.umd.min.js",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"build:library": "vue-cli-service build --target lib src/library.js --name LzTabix --dest lib",
"deploy": "./deploy.sh",
"lint": "vue-cli-service lint",
"test:unit": "vue-cli-service test:unit"
Expand All @@ -16,9 +14,9 @@
"bootstrap": "^4.4.1",
"bootstrap-vue": "^2.0.0-rc.11",
"gwas-credible-sets": "^0.1.0",
"locuszoom": "0.11.0",
"locuszoom": "0.12.0-beta.2",
"lodash": "^4.17.11",
"tabix-reader": "https://github.com/abought/tabix-reader",
"tabix-reader": "^1.0.0",
"tabulator-tables": "^4.1.4",
"vue": "^2.6.10",
"vue-bootstrap-typeahead": "^0.2.6"
Expand All @@ -30,6 +28,7 @@
"@vue/cli-service": "^3.0.0",
"@vue/eslint-config-airbnb": "^4.0.0",
"@vue/test-utils": "^1.0.0-beta.20",
"autoprefixer": "^9.8.4",
"chai": "^4.1.2",
"node-sass": "^4.9.0",
"sass-loader": "^7.0.1",
Expand Down
3 changes: 0 additions & 3 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- Necessary includes for LocusZoom.js (code is imported via modules) -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/locuszoom.css" type="text/css"/>
<title>LocalZoom ~ Plot your own Tabixed Data with LocusZoom.js</title>

<style>
Expand Down
101 changes: 56 additions & 45 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<script>
import 'locuszoom/dist/locuszoom.css';
import { BCard, BCollapse, VBToggle } from 'bootstrap-vue/esm/';
import {
Expand All @@ -13,6 +15,13 @@ import GwasToolbar from './components/GwasToolbar.vue';
export default {
name: 'LocalZoom',
components: {
GwasToolbar,
BCollapse,
BCard,
PlotPanes,
},
directives: { VBToggle },
data() {
return {
// Used to trigger the initial drawing of the plot
Expand Down Expand Up @@ -71,13 +80,6 @@ export default {
this.end = region.end;
},
},
components: {
GwasToolbar,
BCollapse,
BCard,
PlotPanes,
},
directives: { VBToggle },
};
</script>

Expand All @@ -87,48 +89,52 @@ export default {
<div class="col-md-12">
<h1><strong>LocalZoom: Plot your own data with LocusZoom.js</strong></h1>
<hr>
<button class="btn-link" v-v-b-toggle.instructions>Instructions</button>
<b-collapse id="instructions" class="mt-2">
<button
v-v-b-toggle.instructions
class="btn-link">Instructions</button>
<b-collapse
id="instructions"
class="mt-2">
<b-card>
<div class="card-text">
This is a demonstration of loading GWAS results via the web browser, fetching only the
data
required for that region. It relies on four assumptions:
<ol>
<li>Your data has been stored in a compressed format, and indexed using Tabix. The
This is a demonstration of loading GWAS results via the web browser, fetching only the
data
required for that region. It relies on four assumptions:
<ol>
<li>Your data has been stored in a compressed format, and indexed using Tabix. The
index file must be in the same path, with the suffix <em>.tbi</em></li>
<li>The data is hosted in a place that is reachable by web browser (eg local files
<li>The data is hosted in a place that is reachable by web browser (eg local files
or a service such as S3)
</li>
<li>If using a remote URL, the host location must support byte range requests. (<a
</li>
<li>If using a remote URL, the host location must support byte range requests. (<a
href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Range_requests#Checking_if_a_server_supports_partial_requests">how
to check</a>)
</li>
<li>Your file contains information required to draw a plot. Chromosome, position,
to check</a>)
</li>
<li>Your file contains information required to draw a plot. Chromosome, position,
ref, and alt alleles can be specified as either individual columns, or a SNP
marker (eg <code>chr:pos_ref/alt</code>); there must also be a p-value
(or -log10 pvalue) for each SNP as a separate column. Beta, SE, and alt allele
frequency information are optional, but will be used on the plot if provided.
<em>Client-side plots cannot be generated from rsIDs.</em></li>
</ol>
</ol>

<p>This service is designed to efficiently fetch only the data needed for the plot
<p>This service is designed to efficiently fetch only the data needed for the plot
region of interest. Therefore, it cannot generate summary views that would require
processing the entire file (eg Manhattan plots).
</p>

<p>
LD and overlay information is based on a specific build (<strong>build GRCh37</strong>
or <strong>build GRCh38</strong> are supported). Exercise caution when interpreting
plots based on a GWAS with positions from a different build.
</p>

<p>
Credible sets are
<a href="https://github.com/statgen/gwas-credible-sets/">calculated</a> based on the
p-values for the displayed region. At the moment this tool does not support
uploading your own custom credible set annotations.
</p>
</p>

<p>
LD and overlay information is based on a specific build (<strong>build GRCh37</strong>
or <strong>build GRCh38</strong> are supported). Exercise caution when interpreting
plots based on a GWAS with positions from a different build.
</p>

<p>
Credible sets are
<a href="https://github.com/statgen/gwas-credible-sets/">calculated</a> based on the
p-values for the displayed region. At the moment this tool does not support
uploading your own custom credible set annotations.
</p>
</div>
</b-card>
</b-collapse>
Expand All @@ -138,21 +144,26 @@ export default {
<div class="row">
<div class="col-md-12">
<gwas-toolbar
@config-ready="receiveAssocOptions"
@select-range="updateRegion"
:max_studies="4"
:max_studies="4"
@config-ready="receiveAssocOptions"
@select-range="updateRegion"
/>
</div>
</div>

<div class="row">
<div class="col-md-12">
<plot-panes ref="plotWidget"
:dynamic_urls="true"
:assoc_layout="base_assoc_layout" :assoc_sources="base_assoc_sources"
:study_names="study_names" :has_credible_sets="has_credible_sets"
:build="build"
:chr="chr" :start="start" :end="end" />
<plot-panes
ref="plotWidget"
:dynamic_urls="true"
:assoc_layout="base_assoc_layout"
:assoc_sources="base_assoc_sources"
:study_names="study_names"
:has_credible_sets="has_credible_sets"
:build="build"
:chr="chr"
:start="start"
:end="end" />
</div>
</div>

Expand Down
Loading

0 comments on commit 3464825

Please sign in to comment.