-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
203 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<link href=https://igv.org/web/img/favicon.ico rel="shortcut icon"> | ||
<title>IGV - Dev</title> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<p> | ||
<input id="fileInput" type="file"> | ||
</p> | ||
<p> | ||
<input id="processFileInput" type="button" value="Load Sample Info File"> | ||
</p> | ||
<p> | ||
<button id="sessionButton">Session JSON</button> | ||
</p> | ||
|
||
<div id="myDiv" style="padding-top: 50px;padding-bottom: 20px; height: auto"></div> | ||
|
||
<script type="module"> | ||
|
||
import igv from '../../js/index.js' | ||
|
||
const config = | ||
{ | ||
locus: "1:67,655,272-67,684,468", | ||
genome: "hg19", | ||
doShowROITableButton: true, | ||
showSampleNames: false, | ||
roi: | ||
[ | ||
{ | ||
name: 'ROI set 1', | ||
url: 'https://s3.amazonaws.com/igv.org.test/data/roi/roi_bed_1.bed', | ||
indexed: false, | ||
color: "rgba(94,255,1,0.25)" | ||
}, | ||
{ | ||
name: "ROI set 2", | ||
color: "rgba(3,52,249,0.25)", | ||
features: [ | ||
{ | ||
chr: "chr1", | ||
start: 67670000, | ||
end: 67671080, | ||
name: 'Set 2 feature 1' | ||
}, | ||
{ | ||
chr: "chr1", | ||
start: 67672095, | ||
end: 67673993 | ||
}, | ||
{ | ||
chr: "chr1", | ||
start: 67674681, | ||
end: 67675237 | ||
}, | ||
{ | ||
chr: "chr1", | ||
start: 67676055, | ||
end: 67676710 | ||
}, | ||
{ | ||
chr: "chr1", | ||
start: 67677561, | ||
end: 67677888 | ||
}, | ||
{ | ||
chr: "chr1", | ||
start: 67679263, | ||
end: 67679394 | ||
}, | ||
{ | ||
chr: "chr1", | ||
start: 67679950, | ||
end: 67680180 | ||
}, | ||
{ | ||
chr: "chr1", | ||
start: 67681849, | ||
end: 67682340 | ||
} | ||
] | ||
} | ||
], | ||
tracks: | ||
[ | ||
{ | ||
"type": "sequence", | ||
"order": -9007199254740991 | ||
}, | ||
{ | ||
"url": "https://www.dropbox.com/scl/fi/rob7ilg4ca0b9djhtcu3d/GBMCopyNumber.seg.gz?rlkey=c89kstbjm6ge73ytku2s4g0gf&dl=0", | ||
"filename": "GBMCopyNumber.seg.gz", | ||
"name": "GBMCopyNumber.seg.gz", | ||
"order": 1, | ||
"format": "seg", | ||
"type": "seg", | ||
"height": 300 | ||
}, | ||
{ | ||
"name": "Refseq Genes", | ||
"format": "refgene", | ||
"url": "https://hgdownload.soe.ucsc.edu/goldenPath/hg38/database/ncbiRefSeq.txt.gz", | ||
"indexed": false, | ||
"order": 1000001, | ||
"infoURL": "https://www.ncbi.nlm.nih.gov/gene/?term=$$", | ||
"type": "annotation", | ||
"height": 70 | ||
} | ||
] | ||
}; | ||
|
||
const browser = await igv.createBrowser(document.getElementById('myDiv'), config) | ||
|
||
document.getElementById('processFileInput').addEventListener('click', processFile) | ||
|
||
async function processFile() { | ||
const [ file ] = document.getElementById('fileInput').files | ||
await browser.loadSampleInfo({ url: file }) | ||
} | ||
|
||
document.getElementById("sessionButton").addEventListener("click", () => { | ||
try { | ||
const json = browser.toJSON() | ||
console.log(`${ json }`) | ||
} catch (e) { | ||
alert(e); | ||
} | ||
}) | ||
|
||
|
||
</script> | ||
|
||
</body> | ||
|
||
</html> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters