Coder Social home page Coder Social logo

oncoprint's Introduction

Oncoprint

Install

Install it directly from GitHub:

library(devtools)
install_github("dakl/oncoprint")

Usage

This package can be used to create beautiful oncoprints in R.

library(oncoprint)
data(tcga_brca)
# vertical x-labels
vert_x <- theme(axis.text.x = element_text(angle = 90, hjust = 1, vjust=.5))

oncoprint(tcga_brca) + coord_fixed() + vert_x

oncoprint-example

The main function (oncoprint(M)) works on a matrix of strings on on this form:

      TCGA-BH-A1EV-01 TCGA-A2-A1FW-01 TCGA-AO-A1KS-01 TCGA-D8-A1JB-01 TCGA-D8-A1JD-01
BRCA1 ""              ""              ""              ""              ""             
BRCA2 "AMP;"          "AMP;"          "AMP;"          "HOMDEL;"       "HOMDEL;"      

Row names are genes, column names are samples. The following annotations are allowed by default:

  • Ampilifications (AMP), red fill
  • Deletions (HOMDEL), blue fill
  • Somatic mutations (MUT), green box
  • Germline mutations (GERMLINE), purple box
  • Upregulation (UP), red outline
  • Downregulation (DOWN), blue outline

Each element is changable by passing (defaults listed below)

keys = list(somatic = "MUT", germline = "GERMLINE", amp = "AMP",
            del = "HOMDEL", upreg = "UP", downreg = "DOWN")

to the function call. Also, the genes can be sorted by most altered gene by passing sortGenes = TRUE (default FALSE, which keeps order from matrix). Samples are always sorted using an adaptation of the algorithm used in cBioPortal.

oncoprint's People

Contributors

dakl avatar mmoisse avatar

Stargazers

frankfanslc avatar  avatar Sean Davis avatar Andreas Sjödin avatar  avatar Wouter Hendrickx avatar Nice avatar

Watchers

 avatar James Cloos avatar  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.