Skip to content

Commit

Permalink
Merge branch 'release/0.1.12'
Browse files Browse the repository at this point in the history
  • Loading branch information
abought committed Jul 29, 2020
2 parents d283e38 + 05dfb26 commit 3cd1d34
Show file tree
Hide file tree
Showing 6 changed files with 276 additions and 37 deletions.
2 changes: 1 addition & 1 deletion assets/js/pages/gwas_region.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Vue from 'vue';
import App from '../../vue/gwas_region.vue';

import { paramsFromUrl } from 'locuszoom/dist/ext/lz-dynamic-urls.min';
import { paramsFromUrl } from 'locuszoom/esm/ext/lz-dynamic-urls';

import { stateUrlMapping, getBasicSources, createStudyLayout, getBasicLayout } from 'localzoom/src/util/lz-helpers';
import count_region_view from 'localzoom/src/util/metrics';
Expand Down
13 changes: 9 additions & 4 deletions assets/js/util/lz-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,32 @@
*/

import LocusZoom from 'locuszoom';
import 'locuszoom/dist/locuszoom.css';

import { sourceName} from 'localzoom/src/util/lz-helpers';
import {AssociationLZ} from 'locuszoom/esm/data/adapters';

LocusZoom.KnownDataSources.extend('AssociationLZ', 'AssociationApi', {

class AssociationApi extends AssociationLZ {
getURL(state, chain,fields) {
const base = new URL(this.url, window.location.origin);
base.searchParams.set('chrom', state.chr);
base.searchParams.set('start', state.start);
base.searchParams.set('end', state.end);
return base;
},
}

annotateData(records) {
// Our API is a mix of portaldev and zorp field names. Smooth out differences.
// TODO: Eventually it would be nice to use a consistent field spec. Key blocker is lz layout.
return records.map(item => {
item.stderr_beta = item.se;
return item;
});
},
});
}
}

LocusZoom.Adapters.add('AssociationApi', AssociationApi);

/**
* Define sources used to add a study to the plot. Having this as a separate method is useful when dynamically
Expand Down
1 change: 0 additions & 1 deletion assets/js/util/pheweb_plots.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import _ from 'underscore';

// NOTE: `qval` means `-log10(pvalue)`.
// Hello
function fmt(format) {
// convenience functions- from pheweb common.js
const args = Array.prototype.slice.call(arguments, 1);
Expand Down
3 changes: 0 additions & 3 deletions locuszoom_plotting_service/templates/gwas/gwas_region.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
{% load render_bundle from webpack_loader %}

{% block title %}Region plot- {{ gwas.label }}{% endblock %}
{% block css %}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/locuszoom.css" type="text/css"/>
{% endblock %}

{% block content %}
<div class="container">
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"d3": "3.5.16",
"d3-tip": "0.9.0",
"gwas-credible-sets": "^0.1.0",
"localzoom": "https://github.com/statgen/localzoom#d795a9e",
"locuszoom": "0.11.0",
"localzoom": "https://github.com/statgen/localzoom#3464825",
"locuszoom": "0.12.0-beta.2",
"pako": "^1.0.8",
"underscore": "1.8.3",
"vue": "^2.6.10",
Expand Down
Loading

0 comments on commit 3cd1d34

Please sign in to comment.