Giter Site home page Giter Site logo

data4cure / oncoprintjs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cbioportal/oncoprintjs

0.0 2.0 0.0 2.14 MB

OncoPrint visualization

License: GNU Lesser General Public License v3.0

JavaScript 10.83% HTML 0.13% Python 0.47% TypeScript 88.57%

oncoprintjs's Introduction

Build Status

OncoprintJS

This is the library that generates the Oncoprint visualization in cBioPortal. Essentially, it populates a canvas of a grid of m tracks of n types, where each element can either be a discrete value represented by a colored glyph on a grey background or a continuous value within a color range. Oncoprint can have many conceivable uses, but in cBioPortal, it is primarily used to visualize tracks of m genes and n patient samples, where the colored glyphs represent genomic alterations. It is also used to display a heatmap of gene and/or protein expression values for those m genes and n patient samples.

Using the Node Module

Oncoprint is on NPM. To install:

npm install --save oncoprintjs

In order to use it, just require it into your script.

const Oncoprint = require('oncoprintjs');

It can also be imported

import Oncoprint from "oncoprintjs";

A full documentation of the API is still pending, but the typescript declarations in dist/js/oncoprint.d.ts may be of use.

Development

Getting Started

First, clone the repo:

git clone https://github.com/cBioPortal/oncoprintjs.git

Install the necessary NPM packages defined in package.json by running:

npm install

Next, build

npm run build

Which will write dist/oncoprint.bundle.js, which is a CommonJS module and can be included using require, or import.

The directory rules/ contains glyph styling specifications that are specific to the genomic alterations use case of Oncoprint, which you may want to use.

Changes to Oncoprint

If you make changes to the Oncoprint code base and want to load it into the examples, do not modify oncoprint.bundle.js, since all of your code will get overwritten when compiled using npm run build. Instead, modify the files in src/ and then re-run npm run build.

oncoprintjs's People

Contributors

adamabeshouse avatar gideonite avatar inodb avatar fedde-s avatar pvannierop avatar rnugraha avatar pambot avatar dependabot[bot] avatar jjgao 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.