-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor CNVPytorTrack to allow conversion from a VariantTrack
- Loading branch information
Showing
7 changed files
with
251 additions
and
40 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<link href=https://igv.org/web/img/favicon.ico rel="shortcut icon"> | ||
<title>igv</title> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<h2>CNVpytor Track</h2> | ||
|
||
<button id="log-state">Log Session Json</button> | ||
<button id="pytor">Change to Pytor</button> | ||
|
||
<div id="igvDiv" style="padding-top: 50px;padding-bottom: 20px; height: auto"></div> | ||
|
||
<script type="module"> | ||
|
||
import igv from "../../js/index.js" | ||
|
||
const options = | ||
{ | ||
genome: "hg19", | ||
locus: "chr16", | ||
tracks: [ | ||
// { | ||
// type: "cnvpytor", | ||
// name: "HepG2 VCF", | ||
// url: "https://igv-genepattern-org.s3.amazonaws.com/test/pytor/HepG2.sample.vcf.gz" | ||
// | ||
// }, | ||
{ | ||
type: "variant", | ||
name: "HepG2 VCF", | ||
//url: "https://storage.googleapis.com/cnvpytor_data/HepG2.vcf.gz", | ||
url: "https://igv-genepattern-org.s3.amazonaws.com/test/pytor/HepG2.sample.vcf.gz" | ||
} | ||
] | ||
} | ||
|
||
igv.createBrowser(document.getElementById('igvDiv'), options) | ||
.then(browser => { | ||
const track = browser.findTracks("type", "variant")[0]; | ||
document.getElementById("log-state").addEventListener("click", () => console.log(browser.toJSON())) | ||
document.getElementById("pytor").addEventListener("click", () => { | ||
track.convertToPytor() | ||
}) | ||
}) | ||
|
||
|
||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<link href=https://igv.org/web/img/favicon.ico rel="shortcut icon"> | ||
<title>igv</title> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<h2>CNVpytor Track</h2> | ||
|
||
<button id="log-state">Log Session Json</button> | ||
<button id="pytor">Change to Pytor</button> | ||
|
||
<div id="igvDiv" style="padding-top: 50px;padding-bottom: 20px; height: auto"></div> | ||
|
||
<script type="module"> | ||
|
||
import igv from "../../js/index.js" | ||
|
||
const options = | ||
{ | ||
genome: "hg19", | ||
locus: "chr16", | ||
tracks: [ | ||
{ | ||
type: "variant", | ||
name: "HepG2 VCF", | ||
//maxVariantCount: 1000000, | ||
url: "https://igv-genepattern-org.s3.amazonaws.com/test/pytor/HepG2.vcf.gz" | ||
} | ||
] | ||
} | ||
|
||
igv.createBrowser(document.getElementById('igvDiv'), options) | ||
.then(browser => { | ||
const track = browser.findTracks("type", "variant")[0]; | ||
document.getElementById("log-state").addEventListener("click", () => console.log(browser.toJSON())) | ||
document.getElementById("pytor").addEventListener("click", () => { | ||
track.convertToPytor() | ||
}) | ||
}) | ||
|
||
|
||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<link href=https://igv.org/web/img/favicon.ico rel="shortcut icon"> | ||
<title>igv</title> | ||
|
||
</head> | ||
|
||
<body> | ||
|
||
<h2>CNVpytor Track</h2> | ||
<h4>Input: VCF file with ~16,700 sites</h4> | ||
|
||
|
||
<div id="igvDiv" style="padding-top: 50px;padding-bottom: 20px; height: auto"></div> | ||
|
||
<script type="module"> | ||
|
||
import igv from "../../dist/igv.esm.js" | ||
const options = | ||
{ | ||
genome: "hg19", | ||
locus: "chr16", | ||
tracks: [ | ||
{ | ||
type: "cnvpytor", | ||
name: "HepG2 VCF", | ||
url: "https://igv-genepattern-org.s3.amazonaws.com/test/pytor/HepG2.sample.vcf.gz", | ||
|
||
} | ||
] | ||
} | ||
|
||
igv.createBrowser(document.getElementById('igvDiv'), options) | ||
|
||
|
||
</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
Oops, something went wrong.