npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

igv

v3.1.0

Published

Embeddable genomic visualization component based on the Integrative Genomics Viewer

Downloads

29,988

Readme

igv.js

build

igv.js is an embeddable interactive genome visualization component developed by the Integrative Genomics Viewer (IGV) team.

Citing igv.js

James T Robinson, Helga Thorvaldsdottir, Douglass Turner, Jill P Mesirov, igv.js: an embeddable JavaScript implementation of the Integrative Genomics Viewer (IGV), Bioinformatics, Volume 39, Issue 1, January 2023, btac830, https://doi.org/10.1093/bioinformatics/btac830

Below are examples and a quickstart guide. See the developer documentation for more documentation.

Examples

Alignments

Interactions

Copy number

Multiple regions

Mutation Annotation Format (MAF)

Variant color options

More

Quickstart

Installation

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]/dist/.

To import igv as an ES6 module

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

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

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

Alternatively you can install with npm

npm install igv

and source the appropriate file for your module system (igv.min.js or igv.esm.min.js) in node_modules/igv/dist.

Usage

To create an igv.js browser supply a container div and an initial configuration defining the reference genome, initial tracks, and other state to the function igv.createBrowser(div, config).

This function returns a promise for an igv.Browser object which can used to control the browser. For example, to open a browser on a single alignment track opened at a specific locus:

      var igvDiv = document.getElementById("igv-div");
      var options =
        {
            genome: "hg38",
            locus: "chr8:127,736,588-127,739,371",
            tracks: [
                {
                    "name": "HG00103",
                    "url": "https://s3.amazonaws.com/1000genomes/data/HG00103/alignment/HG00103.alt_bwamem_GRCh38DH.20150718.GBR.low_coverage.cram",
                    "indexURL": "https://s3.amazonaws.com/1000genomes/data/HG00103/alignment/HG00103.alt_bwamem_GRCh38DH.20150718.GBR.low_coverage.cram.crai",
                    "format": "cram"
                }
            ]
        };

        igv.createBrowser(igvDiv, options)
                .then(function (browser) {
                    console.log("Created IGV browser");
                })

Documentation

Full documentation of the igv.js API is available at https://igv.org/doc/igvjs/.

Development

Requirements

Building igv.js and running the examples require Linux or MacOS. Other Unix environments will probably work but have not been tested.

Windows users can use Windows Subsystem for Linux.

Building

Building igv.js and running the examples requires node.js.

git clone https://github.com/igvteam/igv.js.git
cd igv.js
npm install
npm run build

This creates a dist folder with the following files

  • igv.js - UMDS file for script include, AMD, or CJS modules. A script include will define an "igv" global.
  • igv.min.js - minified version of igv.js
  • igv.esm.js -- ES6 module
  • igv.esm.min.js -- minified version of igv.esm.js

Tests

To run the tests from the command line

npm run test

Examples

To run the examples install http-server.

Start http-server from the project root directory

npx http-server 

Then open http://localhost:8080/examples in a web browser.

Supported Browsers

igv.js require a modern web browser with support for Javascript ECMAScript 2015 (ES6).

License

igv.js is MIT licensed.

Release Notes