Skip to content

Commit

Permalink
Merge branch 'release/0.9.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
abought committed Dec 10, 2021
2 parents 8b1364f + bf3a620 commit 83f5181
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "localzoom",
"version": "0.9.2",
"version": "0.9.3",
"license": "MIT",
"engines": {
"node": ">=10.13.0"
Expand Down
10 changes: 8 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ export default {
has_credible_sets: true,
};
},
computed: {
show_instructions() {
return window.location.hash.includes('instructions');
},
},
methods: {
receiveTrackOptions(data_type, filename, display_name, source_configs, panel_configs, extra_plot_state) {
if (!this.known_tracks.length) {
Expand Down Expand Up @@ -95,6 +100,7 @@ export default {
class="btn btn-link">Instructions</button>
<b-collapse
id="instructions"
:visible="show_instructions"
class="mt-1 mb-4">
<b-card>
<div class="card-text">
Expand Down Expand Up @@ -122,9 +128,9 @@ export default {
<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>If using a remote URL, the host location must support cross-origin 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>)
to check</a>) (<a href="https://docs.cancergenomicscloud.org/docs/enabling-cross-origin-resource-sharing-cors#CORS">how to configure cloud storage</a>)
</li>
<li>Your file contains all of the information required to draw a plot (see individual file format instructions for details).</li>
</ol>
Expand Down
13 changes: 8 additions & 5 deletions src/components/GwasToolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export default {
TabixAdder,
},
props: {
// These two fields are sync bindings (this component notifies its parent of changes)
genome_build: {
type: String,
default: 'GRCh37',
Expand All @@ -37,11 +36,13 @@ export default {
default: 6,
},
// Track a list of studies that were added to the plot. Useful to prevent duplicates.
// TODO: move to live-binding provide/inject to support export widget / my.locuszoom.org ?
known_tracks: {
type: Array,
default: () => [], // Each item is object of form { type, filename, display_name }
},
// Get a list of suggested entries for batch mode (useful in my.locuszoom.org, which pre-calculates top loci genome wide)
// Should fetch pre-computed top loci, and return list of [ {chr, start, end} ] entries
batch_region_getter: { type: Function, default: null },
},
data() {
return {
Expand Down Expand Up @@ -146,8 +147,6 @@ export default {
@ready="receiveTabixReader"
@fail="showMessage"
/>


</div>
</div>
<div
Expand All @@ -165,7 +164,11 @@ export default {
<batch-spec
:max_range="max_region_size"
class="ml-1"
@ready="activateBatchMode"/>
@ready="activateBatchMode">
<template v-if="batch_region_getter" #preset-button="{updateRegions}">
<button class="btn btn-warning" @click="updateRegions(batch_region_getter())">Get top hits</button>
</template>
</batch-spec>
</div>
<b-dropdown
v-else
Expand Down
9 changes: 7 additions & 2 deletions src/components/TabixAdder.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ import { blobReader, urlReader } from 'tabix-reader';
import GwasParserOptions from './GwasParserOptions.vue';
import { DATA_TYPES } from '../util/constants';
import { positionToStartRange } from '../util/entity-helpers';
import { VBTooltip } from 'bootstrap-vue/src/';
export default {
name: 'TabixAdder',
components: { BDropdown, BFormGroup, BFormRadio, BFormRadioGroup, GwasParserOptions },
directives: { VBTooltip },
props: {
// Allow the user to add custom LD
allow_ld: { type: Boolean, default: false },
Expand Down Expand Up @@ -230,9 +232,12 @@ export default {
<b-dropdown
ref="options_dropdown"
:lazy="true"
text="Add tabix-indexed datafile"
variant="success"
>
<template #button-content>
<span v-v-b-tooltip.right="'This will plot data from local files. Nothing will be uploaded and these tracks will disappear when the page reloads.'">Add tabix-indexed datafile</span>
</template>

<div
class="px-3"
style="width: 300px;">
Expand Down Expand Up @@ -295,7 +300,7 @@ export default {
name="data-type"
value="plink_ld"
>
PLINK 1.9 LD (overlay on GWAS; see guide above)
PLINK 1.9 LD (overlay on GWAS; see <a target="_blank" href="https://statgen.github.io/localzoom#instructions">instructions</a>)
</b-form-radio>
</b-form-group>

Expand Down

0 comments on commit 83f5181

Please sign in to comment.