Skip to content

Commit

Permalink
Updated examples. Version bump.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobinso committed Oct 11, 2024
1 parent d8ae932 commit b962c35
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 59 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ Below are examples and a quickstart guide. See the [developer documentation](ht

# Examples

***[Alignments](https://igv.org/web/release/3.0.7/examples/cram-vcf.html)***
***[Alignments](https://igv.org/web/release/3.0.8/examples/cram-vcf.html)***

***[Interactions](https://igv.org/web/release/3.0.7/examples/interact.html)***
***[Interactions](https://igv.org/web/release/3.0.8/examples/interact.html)***

***[Copy number](https://igv.org/web/release/3.0.7/examples/copyNumber.html)***
***[Copy number](https://igv.org/web/release/3.0.8/examples/copyNumber.html)***

***[Multiple regions](https://igv.org/web/release/3.0.7/examples/multi-locus.html)***
***[Multiple regions](https://igv.org/web/release/3.0.8/examples/multi-locus.html)***

***[Mutation Annotation Format (MAF)](https://igv.org/web/release/3.0.7/examples/maf-tcga.html)***
***[Mutation Annotation Format (MAF)](https://igv.org/web/release/3.0.8/examples/maf-tcga.html)***

***[Variant color options](https://igv.org/web/release/3.0.7/examples/variant-colors.html)***
***[Variant color options](https://igv.org/web/release/3.0.8/examples/variant-colors.html)***

***[More](https://igv.org/web/release/3.0.7/examples/)***
***[More](https://igv.org/web/release/3.0.8/examples/)***


# Quickstart
Expand All @@ -39,18 +39,18 @@ Below are examples and a quickstart guide. See the [developer documentation](ht
igv.js consists of a single javascript file with no external dependencies.

Pre-built files for script include, AMD, or CJS module systems (igv.min.js) and an ES6 module (igv.esm.min.js)
can be downloaded from [https://cdn.jsdelivr.net/npm/[email protected].7/dist/](https://cdn.jsdelivr.net/npm/[email protected].7/dist/).
can be downloaded from [https://cdn.jsdelivr.net/npm/[email protected].8/dist/](https://cdn.jsdelivr.net/npm/[email protected].8/dist/).

To import igv as an ES6 module

```javascript
import igv from "https://cdn.jsdelivr.net/npm/[email protected].7/dist/igv.esm.min.js"
import igv from "https://cdn.jsdelivr.net/npm/[email protected].8/dist/igv.esm.min.js"
```

Or as a script include (defines the "igv" global)

```html
<script src="https://cdn.jsdelivr.net/npm/[email protected].7/dist/igv.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected].8/dist/igv.min.js"></script>
```

Alternatively you can install with npm
Expand Down
53 changes: 7 additions & 46 deletions dev/encode/bigwig.html
Original file line number Diff line number Diff line change
@@ -1,46 +1,24 @@
<head>

<link rel="stylesheet" href="https://unpkg.com/@reservoirgenomics/[email protected]/dist/hglib.css">
<script crossorigin src="https://unpkg.com/[email protected]/dist/higlass-plugins.min.js">

</script>
<script crossorigin src="https://unpkg.com/@reservoirgenomics/[email protected]/dist/hglib.js">

</script>

<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<title>Juicebox</title>
<title>IGV</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>

<!-- IGV JS -->
<script src="../../dist/igv.min.js"></script>



</head>
<body>

<div id="igv-container" style="width: auto; margin-left: 10px; border: 1px solid black;">
</div>

<script>
<script type="module">

import igv from "../../js/index.js"

const igvConfig ={
"reference": {
"id": "hg19",
"name": "Human (CRCh37/hg19)",
"fastaURL": "https://s3.amazonaws.com/igv.broadinstitute.org/genomes/seq/hg19/hg19.fasta",
"indexURL": "https://s3.amazonaws.com/igv.broadinstitute.org/genomes/seq/hg19/hg19.fasta.fai",
"cytobandURL": "https://s3.amazonaws.com/igv.broadinstitute.org/genomes/seq/hg19/cytoBand.txt"
},
"locus": [
"chr8:128,746,315-128,755,680"
],
"genome": "hg19",
"locus": "chr8:128,746,315-128,755,680",
"tracks": [
{
"type": "sequence",
"order": -1.7976931348623157e+308
},
{
"url": "https://www.encodeproject.org/files/ENCFF000ATR/@@download/ENCFF000ATR.bigWig",
"color": "#018448",
Expand Down Expand Up @@ -76,23 +54,6 @@
"height": 50,
"autoscale": true,
"order": 5
},
{
"name": "Refseq Genes",
"format": "refgene",
"url": "https://s3.amazonaws.com/igv.org.genomes/hg19/refGene.sorted.txt.gz",
"indexURL": "https://s3.amazonaws.com/igv.org.genomes/hg19/refGene.sorted.txt.gz.tbi",
"visibilityWindow": -1,
"removable": false,
"order": 1000000,
"filename": "refGene.sorted.txt.gz",
"sourceType": "file",
"type": "annotation",
"maxRows": 500,
"filterTypes": [
"chromosome",
"gene"
]
}
]
}
Expand Down
17 changes: 17 additions & 0 deletions dev/ucsc/simpleGenark.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<html>

<body>

<div id="igvDiv"></div>

<script type="module">

import igv from "https://cdn.jsdelivr.net/npm/[email protected]/dist/igv.esm.min.js"

igv.createBrowser(document.getElementById('igvDiv'), {genome: "GCA_000002305.1"})

</script>

</body>

</html>
26 changes: 26 additions & 0 deletions examples/genark.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<html>

<body>

<h1>UCSC Genark Example</h1>

<p>Example of specifying a genome hosted at the <a href="https://hgdownload.soe.ucsc.edu/hubs/" target="_blank">UCSC
Genark</a> assembly hub. For a complete list of available assemblies see the
<a href="https://hgdownload.soe.ucsc.edu/hubs/UCSC_GI.assemblyHubList.txt" target="_blank">hub assembly list.</a>
</p>

<div id="igvDiv"></div>

<script type="module">

import igv from "../dist/igv.esm.min.js"

const config = {genome: "GCA_000002305.1"}

igv.createBrowser(document.getElementById('igvDiv'), config)

</script>

</body>

</html>
2 changes: 1 addition & 1 deletion js/embedCss.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/version.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const _version = "3.0.7"
const _version = "3.0.8"
function version() {
return _version
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "igv",
"version": "3.0.7",
"version": "3.0.8",
"main": "dist/igv.esm.js",
"browser": "dist/igv.js",
"module": "dist/igv.esm.js",
Expand Down

0 comments on commit b962c35

Please sign in to comment.