Coder Social home page Coder Social logo

cuskinfor / igv.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from igvteam/igv.js

0.0 2.0 0.0 71.06 MB

Embeddable genomic visualization component based on the Integrative Genomics Viewer

License: MIT License

JavaScript 87.54% CSS 4.44% HTML 8.00% PHP 0.02%

igv.js's Introduction

igv.js

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

Examples

Alignments viewer

Copy number viewer

More

Quickstart

Installation

igv.js consists of a single javascript file with no external dependencies. Pre-built expanded and minified js files can be downloaded from http://igv.org/web/release. The current release is 2.0.0-rc5.

Alternatively you can install with npm

npm install igv

and source one of the files in node_modules/igv/dist.

To use igv.js include it with a script tag

<script src="igv.min.js/>

or import it as a requirejs module

requirejs(['igv.min'], function (igv) {...} (see examples/igv-require.html)

or import it as an es6 module

import igv from 'igv.esm.min.js' (see examples/igv-esm.html)

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. An example of a browser on a single alignment track opened at a specific locus:

      var igvDiv = document.getElementById("igv-div");
      var options =
        {
            genome: "hg19",
            locus: "chr8:128,747,267-128,754,546",
            tracks: [
                {
                    type: 'alignment',
                    format: 'bam',
                    url: 'https://data.broadinstitute.org/igvdata/1KG/b37/data/HG02450/alignment/HG02450.mapped.ILLUMINA.bwa.ACB.low_coverage.20120522.bam',
                    name: 'HG02450'
                }
            ]
        };

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

API

See the Wiki for full documentation of the API.

Development

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 grunt

This creates a dist folder with the following files

  • igv.js, igv.min.js - ES5 compatible files for script or requirejs imports
  • igv.esm.js, igv.esm.min.js -- ES6 module

Tests

To run the tests start an http-server

npm run http-server

Then open http://localhost:8080/test/runTests.html.

Examples

To run the examples start an http-server

npm run http-server

Then open http://localhost:8080/index.html.

License

igv.js is MIT licensed.

igv.js's People

Contributors

turner avatar jrobinso avatar khadley avatar skushch avatar ishanley avatar david-ma avatar romgrk avatar romanzenka avatar bw2 avatar brianjohnhaas avatar zoecastillo avatar vrockai avatar jmtcsngr avatar mschroering avatar llincoln3 avatar eweitz avatar blajoie avatar ahwagner avatar chenopodium avatar chris7 avatar lh3 avatar jiaojiao123 avatar luisico avatar mikeas1 avatar liefeld avatar wardweistra avatar crashete avatar helgathorv avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.