-
Notifications
You must be signed in to change notification settings - Fork 891
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
How I can this nice feature plot #657
Comments
Hi @fereshtehizadi, If I understand you correctly, what you want to plot is a ratio of expression values of two genes, right? If that is the case, you can simply use the following code for that: # Define a pseudocount to add to the data in order to avoid Inf and -Inf values
pseudocount <- 0.1
# Compute ratio of expression values of the two genes of interest
gene.exp.ratio <- (object@data["DDB_G0267412",] + pseudocount) / (object@data["DDB_G0277853",] + pseudocount)
# Add ratio of expression values in 'object@meta.data$gene.exp.ratio'
if (all(names(x = gene.exp.ratio) == rownames(x = object@meta.data))) {
cat("Cell names order match in 'gene.exp.ratio' and 'object@meta.data':\n",
"adding ratio of expression values in 'object@meta.data$gene.exp.ratio'")
object@meta.data$gene.exp.ratio <- gene.exp.ratio
}
# Plot ratio of expression values using Seurat::FeaturePlot()
Seurat::FeaturePlot(object = object, features.plot = "gene.exp.ratio") It is an adaptation of the code from issue #528. Note that if your denominator is of value 0, the ratio will return Hope this helps anyway! Best, |
I think you are hoping that the plot would reveal more discrimination between the two patterns. Unfortunately, the two genes may not be strong cluster markers in your data, despite prior knowledge (you can visualize this with VlnPlot). Alternately, the visualization min and max cutoffs set the coloring scale, and may be obscuring a more clear pattern |
Hi, Sorry, If I have a list of genes I know how to plot them in heat map on my cluster (let's say I have 8 clusters of cells for 8 time points), but I have also sub-clusters in each cluster. So could you please help me to figure out how I can have a heat map with sub-clusters for each cluster on which I am showing a list of genes. Something like like picture [ Thank you so much in advance |
My problem is this when I am plotting a feature plot I expect DDB_G0267412 be high lighted only in cluster 0 but I noticed a sporadic expression of cell types genes. So that I wish have a tSNE plot on which in a cluster the ratio of the expression of DDB_G0267412 to DDB_G0277853 be spotted only in cluster 0
For example in this picture each gene is a marker of a cluster beautifully
[
](url)
While I am plotting the same although I know DDB_G0267412 is cell type marker of cluster 0 and DDB_G0277853 is cell type marker of cluster 1 but I am obtaining this uninformative picture
[
](url)
The text was updated successfully, but these errors were encountered: