You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a question regarding the scaling in the cr.pl.heatmap. I noticed that when plotting per lineage, this scaling is done on a subset of the expression matrix for the lineage.
This tends to skew the result if you're plotting a gene that is not actually expressed that much in your lineage, because it will still scale it from 0-1 even if the expression in this lineage is almost 0 compared to other lineages.
I also wondered how this would affect comparisons between lineages, especially if you are comparing the same genes.
I thought it would be more representative to scale the entire expression matrix between 0 and 1 (i.e. all cells) and use those values to plot on your heatmap. This way heatmaps for different lineages would be comparable.
I tried doing this myself, I thought I could just scale my adata.X and then in the cr.pl.heatmap specify scale=False,use_raw = False,data_key = 'X' ,but this doesn't seem to work. The data is scaled and it looks fine on my umap, minimum value in the entire array is 0 and max is 1, but in my heatmap I get negative values and I don't understand why.
So my question to you is: How would you go about plotting the heatmap per lineage, but having the genes scaled between 1 and 0 for the entire dataset; and do you think this is a valid approach?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi Everyone,
I had a question regarding the scaling in the cr.pl.heatmap. I noticed that when plotting per lineage, this scaling is done on a subset of the expression matrix for the lineage.
This tends to skew the result if you're plotting a gene that is not actually expressed that much in your lineage, because it will still scale it from 0-1 even if the expression in this lineage is almost 0 compared to other lineages.
I also wondered how this would affect comparisons between lineages, especially if you are comparing the same genes.
I thought it would be more representative to scale the entire expression matrix between 0 and 1 (i.e. all cells) and use those values to plot on your heatmap. This way heatmaps for different lineages would be comparable.
I tried doing this myself, I thought I could just scale my adata.X and then in the cr.pl.heatmap specify scale=False,use_raw = False,data_key = 'X' ,but this doesn't seem to work. The data is scaled and it looks fine on my umap, minimum value in the entire array is 0 and max is 1, but in my heatmap I get negative values and I don't understand why.
So my question to you is: How would you go about plotting the heatmap per lineage, but having the genes scaled between 1 and 0 for the entire dataset; and do you think this is a valid approach?
Beta Was this translation helpful? Give feedback.
All reactions