sii-cell-atlas / paraCell

Single-cell analysis web interface, especially geared toward parasitologists. Inherits core functionality of cellxgene and cellxgene VIP for general purpose analysis, with additional features such as advanced gene search, host-parasite interactions, database integration and trajectory inference.
MIT License
2 stars 3 forks source link

Add cell population scatter plots #1

Closed haessar closed 2 years ago

haessar commented 2 years ago

During a comparison of the features in cell atlas and cellxgene_VIP, one was absent: "Cell population view" image

i.e. for a given cell population, compare gene expression for any 2 distinct condition groups.

To begin with, it would be good to have a new static plot feature in the VIP panel to replicate this. Later on, we can look into adding additional functionality, such as clicking an individual cell to bring up detailed information.

haessar commented 2 years ago

@EdwardAgboraw The file that contains the DE scatterplot Seurat data appears to be tcells_combined_de_ggplots_table.rds from tracing through the code. Will try to get a copy of this for you to look through.

haessar commented 2 years ago

Now that you have a basic scatterplot function, try the following approach:

  1. create a new feature branch from the cellxgene_VIP fork iii-cell-atlas/cellxgene_VIP: Enables cellxgene to generate violin, stacked violin, stacked bar, heatmap, volcano, embedding, dot, track, density, 2D density, sankey and dual-gene plot in high-resolution SVG/PNG format. It also performs differential gene expression analysis and provides a Command Line Interface (CLI) for advanced users to perform analysis using python and R. (github.com) (I've just added one called feature-cell-pop-view)

  2. Add your CellPopView function to VIPInterface.py

  3. Have a look at the exact format of the outputs for the other plotting functions (such as SGV, PGV, etc). There is a common pattern: They all take in an object called "data", which is fed through a function createData; and they return iostreamFig(fig). Are you able to reformat your inputs and outputs to ensure they follow this same pattern?

Hint: Remember the trace-through in the New user guide for the Violin Plots: in the SGVPlot js function there was a json data object being created (line 3593: var D {...}). This is the format that you can expect for the "data" input to your function. Are you able to mangle together something similar?