Giter VIP home page Giter VIP logo

Comments (4)

pkharchenko avatar pkharchenko commented on August 25, 2024 2

from conos.

ACastanza avatar ACastanza commented on August 25, 2024

Thanks! I was able to get it to do (mostly) what I wanted! Note: show.na was incorrect, it is `plot.na. However, I can only seem to get it to plot colored by sample, not with clustering or with gene expression.

To dump the full cell->sample relationship table I used:
write.table(con$getDatasetPerCell(), file = "FILENAME", sep="\t", quote= FALSE, col.names = FALSE)

Then manually replaced the sample IDs I wanted to set to NA.
Then I added the plot.na=FALSE parameter to the appropriate conos $plotGraph functions.

Okay, so I think what I'd need is to dump the tables for cell->cluster and cell->gene relationships as well, modify and read back in those tables as groups annotation with plot.na=FALSE, but can't seem to find a function to dump that information.

from conos.

GMaciag avatar GMaciag commented on August 25, 2024

Maybe the answer is a bit late, but if anyone else will be looking for a similar method, I find it the easiest to save the conos plot to a ggplot object and work on that. So in your case you would do

samples_to_plot <- c() # Vector with sample names you want to keep on the plot
p <- con$plotGraph()
p$data$Sample <- con$getDatasetPerCell()
p$data <- subset(p$data, p$data$Sample %in% samples_to_plot)
p

With this approach you can also make separate plots for each of the samples (or just some of them). Simply add:

p + facet_wrap(~Sample)
p

from conos.

VPetukhov avatar VPetukhov commented on August 25, 2024

Okay, so I think what I'd need is to dump the tables for cell->cluster and cell->gene relationships as well, modify and read back in those tables as groups annotation with plot.na=FALSE, but can't seem to find a function to dump that information.

Did it in #39. Now, if groups are provided, they used to filter which cells are plotted even if you color by gene.

from conos.

Related Issues (20)

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.