Coder Social home page Coder Social logo

Comments (8)

enblacar avatar enblacar commented on September 24, 2024 1

Hmmm they look ok, apart from the fact that now the feature to plot is "signatrue" instead of "signature"...

It seems like a proper bug. I will add it to the to-do list for the next update. I am sorry it did not work!

Many thanks for the quick feedback and feel free to open another Issue if you face other problems!

Best,
Enrique

from scpubr.

enblacar avatar enblacar commented on September 24, 2024

Hi @venkan,

Thanks for using my package!

In order for you to map a diverging palette to the plots, you need to use enforce_symmetry = TRUE. Otherwise, I only allow the use of sequential palettes for variables that are not centered, transformation that enforce_symmetry will perform on the data to plot if you set it to TRUE.

You can then set symmetry.type to absolute to make it centered around 0 or centered alongisde with symmetry.center to tailor the center to your liking.

For this, you need to update to v2.0.2.

Hope this helps!
Enrique

from scpubr.

venkan avatar venkan commented on September 24, 2024

Thank you. When I use

SCpubr::do_FeaturePlot(scdata, features = c("signature"), reduction = "umap", split.by = "DiseaseGroup", ncol=4, order = FALSE, font.size = 8, plot.axes = TRUE, legend.length = 8, legend.width = 0.5, legend.position = "bottom", pt.size=0.3, enforce_symmetry=TRUE, diverging.palette="RdBu")

Screenshot 2024-04-17 at 13 56 29

I'm using ‘2.0.2.9000’ package version. I want the scaling from -0.5 to -0.1 and centered with -0.3 with diverging.palette="RdBu". So, I used it like below:

SCpubr::do_FeaturePlot(scdata, features = c("signature"), reduction = "umap", split.by = "DiseaseGroup", ncol=4,order = FALSE, font.size = 8, plot.axes = TRUE, legend.length = 8, legend.width = 0.5, legend.position = "bottom", pt.size=0.3, diverging.palette="RdBu", symmetry.type = "centered", symmetry.center=-0.3)

But why the colors are not changed in the output plot below?

Screenshot 2024-04-17 at 14 08 52

I want the colors that are used for enforce_symmetry=TRUE with the scaling I want.

from scpubr.

enblacar avatar enblacar commented on September 24, 2024

In your second input, there is not enforce_symmetry = TRUE. Can you try with that and let me know if it works?

Best,
Enrique

from scpubr.

venkan avatar venkan commented on September 24, 2024

Thanks for your quick reply.

SCpubr::do_FeaturePlot(scdata, features = c("signature"), reduction = "umap", split.by = "DiseaseGroup", ncol=4,order = FALSE, font.size = 8, plot.axes = TRUE,legend.length = 8, legend.width = 0.5, legend.position = "bottom", pt.size=0.3, diverging.palette="RdBu", symmetry.type = "centered", symmetry.center=-0.3, enforce_symmetry=TRUE)

Output:

Screenshot 2024-04-17 at 14 39 51

You see the above image. Scaling is wrong.

from scpubr.

enblacar avatar enblacar commented on September 24, 2024

Hmmm true:

Can you check one more thing? Try adding to what you already have:
min.cutoff = -0.5
max.cutoff = -0.1

If it does not work, I will need to have check to fix the bug!

Let me know if it works and thanks for the help!
Enrique

from scpubr.

venkan avatar venkan commented on September 24, 2024

Thanks again. but didn't work.

SCpubr::do_FeaturePlot(scdata, features = c("signature"), reduction = "umap", split.by = "DiseaseGroup", ncol=4,order = FALSE, font.size = 8, plot.axes = TRUE,legend.length = 8, legend.width = 0.5, legend.position = "bottom", pt.size=0.3, diverging.palette="RdBu", symmetry.type = "centered", symmetry.center=-0.3, enforce_symmetry=TRUE, min.cutoff = -0.5, max.cutoff = -0.1)

Output:

Screenshot 2024-04-17 at 14 47 32

Please check whether the arguments I gave above are right. Thank you !!

from scpubr.

venkan avatar venkan commented on September 24, 2024

sorry. that's a typo (signature it is). Only when I use split.by have this problem.

from scpubr.

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.