Open sidrahmaryam opened 3 years ago
I don't think you'll be able to do this with the tracksplot. Were you looking for something more like a volcano plot?
I've used something like this snipped (using hvplots
) for these:
import hvplot.pandas
def plot_volcano(dedf):
dedf = dedf.copy()
dedf = dedf[dedf["pvals"].notnull()]
dedf.loc[dedf["logfoldchanges"] == np.inf, "logfoldchanges"] = 10
dedf.loc[dedf["logfoldchanges"] == -np.inf, "logfoldchanges"] = -10
return dedf.hvplot.scatter(
"logfoldchanges",
"pvals",
xlim=(dedf["logfoldchanges"][dedf["logfoldchanges"].abs() != np.inf].min(), dedf["logfoldchanges"][dedf["logfoldchanges"].abs() != np.inf].max()),
ylim=(dedf["pvals"][dedf["pvals"].abs() != np.inf].min(), dedf["pvals"][dedf["pvals"].abs() != np.inf].max() + .5),
hover_cols=list(dedf.columns),
logy=True,
flip_yaxis=True
)
plot_volcano(sc.get.rank_genes_groups(adata, ...))
Hello, I actually wanted to know that in the plot that I have posted what does the numbers on right hand side signify. Like 5, 3, 3,.. and so on. Thanks
Ah, I believe that should just be expression level per row.
It looks like it formats pretty poorly due to the small area and fantasize though.
Hello, I wanted to do differential gene expression on the clusters of my data. When I plotted them, I obtained the expressed genes. However, I wanted to know the significance of the number in y-axis on the right hand side.
I am attaching the screenshot of the image.
Thank you