Giter Club home page Giter Club logo

dittoviz's Introduction

dittoViz

A comprehensive visualization toolkit built with coders of all skill levels and color-vision impaired audiences in mind. It allows creation of finely-tuned, publication-quality figures from single function calls.

Spawned out of the scRNAseq-focused dittoSeq-package, dittoViz contains most of it's visualization machinery with none of the added scRNAseq-related dependencies.

Visualizations include scatter plots, compositional bar plots, violin, box, and ridge plots, and more. Customization ranges from size and title adjustments to discrete-group circling and labeling, hidden data overlay upon cursor hovering via ggplotly() conversion, and many more, all with simple, discrete inputs.

Color blindness friendliness is powered by legend adjustments (enlarged keys), and by allowing the use of shapes or letter-overlay in addition to the carefully selected dittoColors().

Getting Started

Installation:

install.packages("dittoViz")

Then there are a few options for getting aquainted with the package:

  1. Read and follow along with the vignette available here!
  2. View documentation and run examples inside R with, e.g. ?yPlot or example("yPlot").

Visualization functions are:

  • scatterPlot()
  • scatterHex()
  • yPlot()
  • barPlot()
  • freqPlot()

Helper functions are:

  • dittoColors()
  • colLevels()

Long-Term plans for dittoViz

  1. Carry over as much functionality from dittoSeq as makes sense for targeting data stored in a data.frame-type object (rather than in Seurat/SingleCellExperiemnt/SummarizedExperiment objects).
  • Much of this work is now complete! ... But there are still a few missing bits, the biggest of which are dittoDotPlot() and dittoHeatmap() counterparts.
  1. Implement dittoViz inside of a dittoSeq-v2.0 after it gets accepted into Bioconductor.
  2. Python counterpart: a similarly named, largely equivalent, python companion which would target pandas.DataFrames using the plotnine ggplot-mimic and as similar syntax as possible.

dittoviz's People

Contributors

dtm2451 avatar j-andrews7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

j-andrews7

dittoviz's Issues

jitter of yPlot with multivar.aes="color" doesn't align properly

Current look of

library(dittoViz)
example("dittoExampleData", echo = FALSE)
yPlot(example_df, c("gene1", "gene2"), "groups", multivar.aes = "color")

image

It should have the jitter dots aligned with the boxplots and violin plots.

Likely just needs a group aes fix.

`extra.vars` functionality a la `dittoSeq`

This functionality is convenient in a lot of ways. Looking at dittoSeq, the data collection is pretty complicated. I haven't toyed with it here, but I assume it'd just be tweaking the .data_adjust_scatter function to pop them on as well.

I know one can use data.out to get the full data, but it being embedded in the plot object was handy in its own way.

Line chart

Would be nice to have, potentially mixed with the scatterPlot functionality.

Support for point fill and border thickness in scatterPlot

E.g.

df <- data.frame(id=runif(12), x=1:12, y=runif(12))
ggplot(df, aes(x=x, y=y)) + 
  geom_point(aes(fill=id, size=id), colour="black", shape=21, stroke = 2)

image

This would require some adjustments to how color.by is interpreted (to switch it to populate the fill aes instead) and addition of parameters to control stroke width and color (when fill is populated rather than color by color.by). Potentially confusing changes, as we'd only want it to work with the open shapes (21-25).

Would be interested in how you'd prefer something like this be implemented.

Ability to add multiple horizontal and vertical lines to `scatterPlot`

E.g. take a vector of numerics as input. Being able to add vertical lines as well would be nice. Could do it with a x.add.lines and y.add.lines parameters along with matching linetype and color for each axis.

Horizontal lines are already available in yPlot, and vertical lines make less sense there and would be tougher to implement.

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.