Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ucsc browser support for hic #4265

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"genome-visualizer": "ENCODE-DCC/valis-hpgv#1.9.0",
"google-analytics": "file:node_shims/google-analytics",
"graphlib": "ENCODE-DCC/graphlib#v1.0.8",
"igv-utils": "github:igvteam/igv-utils#v1.2.10-jb",
"immutable": "^3.7.5",
"install": "^0.13.0",
"js-cookie": "^2.2.1",
Expand Down
15 changes: 10 additions & 5 deletions src/encoded/static/components/vis_defines.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import React from 'react';
import PropTypes from 'prop-types';
import _ from 'underscore';
import url from 'url';
import { StringUtils } from 'igv-utils';
import * as encoding from '../libs/query_encoding';
import { Modal, ModalHeader, ModalBody, ModalFooter } from '../libs/ui/modal';
import * as globals from './globals';
Expand Down Expand Up @@ -116,12 +117,16 @@ export const visOpenBrowser = (dataset, browser, assembly, files, datasetUrl) =>
delete parsedUrl.path;
delete parsedUrl.search;
delete parsedUrl.query;
const fileQueries = files.map((file) => {
parsedUrl.pathname = file.href;
const name = file.biological_replicates && file.biological_replicates.length > 0 ? `&name=${dataset.accession} / ${file.title}, Replicate ${file.biological_replicates.join(',')}` : '';
return encoding.encodedURIComponentOLD(`{hicUrl=${url.format(parsedUrl)}${name}}`, { encodeEquals: true });
const juiceboxSessionJsonString = JSON.stringify({
browsers: files.map((file) => {
parsedUrl.pathname = file.href;
return {
name: file.biological_replicates && file.biological_replicates.length > 0 ? `${dataset.accession} / ${file.title}, Replicate ${file.biological_replicates.join(',')}` : '',
url: url.format(parsedUrl),
};
}),
});
href = `http://aidenlab.org/juicebox/?juicebox=${fileQueries.join(',')}`;
href = `http://aidenlab.org/juicebox/?session=blob:${StringUtils.compressString(juiceboxSessionJsonString)}`;
break;
}
case 'Ensembl': {
Expand Down
8 changes: 7 additions & 1 deletion src/encoded/static/vis_defs/HiC_vis_def.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"sortOrder": [ "Biosample", "Targets", "Replicates", "Views" ],
"Views": {
"tag": "view",
"group_order": [ "Topologically associated domains", "Nested TADs", "Genome compartments" ],
"group_order": [ "Topologically associated domains", "Nested TADs", "Genome compartments", "HiC" ],
"groups": {
"Topologically associated domains": {
"tag": "aTADS",
Expand All @@ -34,6 +34,12 @@
"maxHeightPixels": "64:18:8",
"windowingFunction": "mean+whiskers",
"output_type": [ "genome compartments" ]
},
"HiC": {
"tag": "dHIC",
"visibility": "dense",
"type": "hic",
"output_type": [ "chromatin interactions" ]
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/encoded/vis_defines.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
}

BROWSER_FILE_TYPES = {
'ucsc': {'bigWig', 'bigBed', 'bigInteract'},
'ucsc': {'bigWig', 'bigBed', 'bigInteract', 'hic'},
'ensembl': {'bigWig', 'bigBed'},
'quickview': {'bigWig', 'bigBed'},
'hic': {'hic'},
Expand Down