-
Notifications
You must be signed in to change notification settings - Fork 9
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
tso.plot_heatmap blank plot #15
Comments
Hi @bijendrabio Sorry for taking so long to answer you. What is your pandas version? import pandas as pd
pd.__version__ I couldn't reproduce your issue. It seems that your x-axis is also wrong. See the result I got below. To answer your question. Genes are ordered so that the genes that are specific to the first tissue in the x-axis (in this case, bladder) are shown first, then genes that are specific to the second tissue, and so on. The code to sort the genes can be found here. |
@apcamargo Thank you for your response. My pandas version is 1.5.3. Could it be due to different pandas version?. For X-axis, I reordered the tissues on purpose while extracting the expression data from gtex_link. Also, curious why the edges of heatmaps are blurred.? |
The blur effect is due to a change in the default parameters in Matplotlib. I'll update tspex to disable it. If you try to follow the tutorial step-by-step (without reordering anything) do you still get that plot? If so, try to update pandas to a newer release. |
I just pushed a new release to PyPI that disables the blur effect. If you want, you can also take a look at how the heatmap is constructed here. |
@apcamargo The blur effect is fixed now, thank you for pushing the updates., but curious why the reordering or sorted genes in the plot. |
I suspect it is because you manually reordered the tissues. Did you try to follow the tutorial without any modifications to check if if works as expected? If you are still having this issue, try to update pandas. |
I observe the same behaviour, though this is due to the fact that pandas is performing an alphabetical sort of the tissues. One solution would be to create a category variable with the desired order and adjust the sorting call by assigning the category before sorting to use instead of the alphabetic order
|
Hello,
Curious if its possible to reorder the tissue samples in the heatmap? For example, if I change the order of tissues in the sample input, the heat map doesn't generate logical order. Kindly suggest
tso.plot_heatmap(threshold=0.8, sort_genes=True, use_zscore=True, gene_names=False)
Eg.
@apcamargo
Regards,
B
The text was updated successfully, but these errors were encountered: