Skip to content

Commit

Permalink
bam chunk optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobinso committed Mar 31, 2023
1 parent eadc1ab commit b800256
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 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 [Wiki](https://github.com/ig

# Examples

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

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

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

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

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

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

***[More](https://igv.org/web/release/2.15.1/examples/)***
***[More](https://igv.org/web/release/2.15.2/examples/)***


# Quickstart
Expand All @@ -39,18 +39,18 @@ Below are examples and a quickstart guide. See the [Wiki](https://github.com/ig
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].1/dist/](https://cdn.jsdelivr.net/npm/[email protected].1/dist/).
can be downloaded from [https://cdn.jsdelivr.net/npm/[email protected].2/dist/](https://cdn.jsdelivr.net/npm/[email protected].2/dist/).

To import igv as an ES6 module

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

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

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

Alternatively you can install with npm
Expand Down
2 changes: 1 addition & 1 deletion js/bam/indexUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function optimizeChunks(chunks, lowest) {
function canMerge(chunk1, chunk2) {
const gap = chunk2.minv.block - chunk1.maxv.block
const sizeEstimate = chunk1.maxv.block - chunk1.minv.block
return gap < 65000 && sizeEstimate < 5000000
return sizeEstimate < 5000000
}

export {optimizeChunks}
Expand Down

0 comments on commit b800256

Please sign in to comment.