Giter VIP home page Giter VIP logo

splicejam's Introduction

splicejam

Splicejam was created to analyze and visualize RNA-seq and transcript isoform splicing data. Splicejam aims to provide sashimi plots with enough customizations to support publication-quality figures.

An example sashimi plot is shown below for the gene Gria1. Each panel shows transcript expression in a region of mouse hippocampus, where "CA1_CB" shows data that originated from cell bodies of CA1, and "CA2_CB" shows corresponding data from cell bodies of CA2.


A depiction of the CA1 and CA2 regions of mouse hippocampus is shown in Fig 4a from Dudek et al. Nature Reviews Neuroscience(2016)

Features of a splicejam sashimi plot:

  • The dark color polygons represent RNA transcript sequence coverage for exons in the Gria1 gene.
  • Wide ribbons are drawn to indicate splice junctions, areas where the sequences are aligned with a wide gap, typically spanning two exons.
  • The thickness of the ribbon (in height) represents the number of aligned reads that span the gap, usually about 70-80% the height of the adjacent exons.
  • The ribbons are shaded light to dark based upon how predominant the splice junction is from exon to exon. The darkest ribbons represent the most predominant path from exon to exon through the gene.
  • Introns are drawn with a fixed width (along the x-axis) and do not use genome coordinates. Introns are normally about 100 times wider than exons, and when drawn to scale obscure the detailed coverage of the exons. The x-axis labels indicate genome coordinates.

Sashimi plot at closer range

The x-axis range is adjusted in the following plot to show more detail around the differentially spliced exons. Notice the relative heights of the exons differ across CA1 and CA2, consistent with the corresponding changes in splice junctions. Clearly CA1 and CA2 favor different and mutually exclusive exons for Gria1.

Incidentally, these two isoforms of Gria1 represent the "flop" and "flip" forms of the AMPA receptor complex. In human, the genes Gria2, Gria3, and Gria4 comprise the AMPA receptor complex, and each genes has two isoforms with "flop" and "flip" designations.

Package Reference

A full online function reference is available via the pkgdown documentation:

Full splicejam command reference: https://jmw86069.github.io/splicejam

The splicejam package is part of a suite of R packages called "jampack" which is available through GitHub, see https://github.com/jmw86069/jampack

How to install

Install using the R package devtools and this command:

devtools::install_github("jmw86069/splicejam")

About sashimi plots

Sashimi plots were originally envisioned by MISO, which introduced the innovative idea to compress intron width in order to reveal the detailed exon sequence coverage, and to highlight changes in splice junctions.

Katz, Y, Wang ET, Silterra J, Schwartz S, Wong B, Thorvaldsdóttir H, Robinson JT, Mesirov JP, Airoldi EM, Burge, CB. Sashimi plots: Quantitative visualization of alternative isoform expression from RNA-seq data. http://biorxiv.org/content/early/2014/02/11/002576

Splicejam re-envisions classic sashimi plots by displaying splice junctions as wide arcs proportional in size to the number of junction reads, making them directly comparable to exon coverages on the same plot. Inspired by:

These ribbons were ultimately made feasible to implement in R thanks to the package ggforce which implemented geom_diagonal_wide.

splicejam's People

Contributors

jmw86069 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

splicejam's Issues

jamGeomean(x, na.rm = TRUE) cannot handle NaN

Hello,
testing the jamGeomean() function on a vector containing NaN, it returns NaN although na.rm is set to TRUE.

small example

x = c(-3, 5, -4, 0, 4, -1, -2, 3, 2, -5, NaN)
jamGeomean(x, na.rm = TRUE)
[1] NaN

Error in iMatrixTx[detectedTxUse, , drop = FALSE] : subscript out of bounds

Hi, I am using your great software want to call differential splicing.
However, when i reached here, there was a problem:
diffSpliceL <- runDiffSplice(
iMatrixTx=iMatrixTxTPM,
detectedTx= detectedTx,
tx2geneDF=tx2geneDF,
txColname=txColname,
geneColname=geneColname,
iDesign=iDesign,
iContrasts=iContrasts,
cutoffFDR=0.05,
cutoffFold=1.5,
collapseByGene=TRUE,
spliceTest="t",
verbose=FALSE,
useVoom=FALSE);

Saying: Error in iMatrixTx[detectedTxUse, , drop = FALSE] : subscript out of bounds
How can i solve them?

I use mouse as species, i followed your pipeline, all is well, only one part when i do
geneMatch <- match(rownames(txiTx[[assayNames[1]]]),
tx2geneDF[,txColname]);
It seems the order is chaotic, so i use this following instead.
assays1=lapply(txiTx[assayNames], function(x){log2(1+x)})
rowData1=DataFrame(tx2geneDF[geneMatch,,drop=FALSE])
colData1=DataFrame(sampleDF)
rownames(rowData1) <- NULL
TxSE <- SummarizedExperiment(
assays=assays1,
rowData=rowData1,
colData=colData1,
);

This "rownames(rowData1) <- NULL" is what i add.

Not able to install Splicejam in R

I get error messages when installing Splicejam. This error was unexpected because I successfully used Splicejam a month ago. However, a month later, I got error messages each time I wanted to load the package. In an attempt to solve the problem, I uninstalled splicejam and tried reinstalling again, but keep getting error messages. I am using two platforms, one having R version 3.6 and the other having R version 4:

The following error was generated from version 4.0
Error: Failed to install 'splicejam' from GitHub:
Failed to install 'jamba' from GitHub:
(converted from warning) installation of package ‘C:/Users/Bruker/AppData/Local/Temp/RtmpU38hNU/file2b684a8e33e6/jamba_0.0.55.900.tar.gz’ had non-zero exit status

For R version 3.6, the following version was generated:
make: *** [cpp11.o] Error 1
ERROR: compilation failed for package ‘tidyr’

  • removing ‘/home/relindis/R/x86_64-redhat-linux-gnu-library/3.6/tidyr’
    Error: Failed to install 'splicejam' from GitHub:
    (converted from warning) installation of package ‘tidyr’ had non-zero exit status

I really appreciate any help that can enable me successfully install and load splicejam.
Thank you

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.