Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-scaling (min.cutoff, max.cutoff) in expression plots #3

Open
pbrazda opened this issue Nov 12, 2019 · 1 comment
Open

Re-scaling (min.cutoff, max.cutoff) in expression plots #3

pbrazda opened this issue Nov 12, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@pbrazda
Copy link

pbrazda commented Nov 12, 2019

Hi!

Thanks for this nice script! It works like a charm ;)

I would like to make these plots more comparable to my 2D seurat plots. When you plot gene-expression values and re-scale for expression >1 that is similar to FeaturePlot is seurat, I guess.
Could you tell me how to apply the min.cutoff, max.cutoff arguments in the plot_ly plot?

Thanks!

@Dragonmasterx87
Copy link
Owner

First of all my apologies for the late reply, somehow I either missed the notification for this or just didnt see it in my email!

So Im not sure of how to incorporate the min.cutoff and max.cutoff arguments in the code as yet, you can have either of the two thats what this length of code is doing essentially:

# Say you want change the scale, so that every cell having an expression >1 will be one color
# Basically, you are re-adjusting the scale here, so that any cell having a certain expression will light up on your 3D plot

# First make another column in your dataframe, where all values above 1 are re-assigned a value of 1
# This information is stored in the 'changed' column of your dataframe
plotting.data$changed <- ifelse(test = plotting.data$ACTB <1, yes = plotting.data$ACTB, no = 1)

Here the code is similar to a 'max.cutoff' for 1 being maximum. I've assigned the max value to be 1, but you can change this to 0.1 or 0.001 whatever you want which matches a maximal value in your expression dataset (say you're using the SCT transformed values to plot the 3D plot lets say).

I will brainstorm a solution and let you know, but this part of the code is very 'manual' where I'm making an extra column to accommodate these new arguments.

🐲

@Dragonmasterx87 Dragonmasterx87 added the enhancement New feature or request label Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants