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
The library you made is really awesome and ready to use. But I really wonder is it possible to add a parameter for controlling the number of genes on plot_genes or other plotting functions, which I am manually doing now.
Best regards
The text was updated successfully, but these errors were encountered:
I'm glad to hear that you find pypgx helpful. As for your question, most of the methods of pymaf.MafFrame, including pymaf.MafFrame.plot_genes, have an argument to control the number of the displayed genes (e.g., count). See this documentation as an example.
Thank you for replying to my issue! I may not have explained my question very well. Actually, I meant the number annotation on barplot circle by red now. Because I previously tried the classic ax.container method for the returned ax object
for i, bar in enumerate(ax.containers[0]): # Get the x position of the bar x = bar.get_x() + bar.get_width() / 2 # Calculate the total height (sum) of the stacked bars at this position total = sum([c[i].get_height() for c in ax.containers]) # Place the annotation ax.text(x, total + 0.25, f'{total}', fontsize=12)
But this looks pretty weird, so I had to annotate them manually using for loop as the bar width is 1 according to my observation, which is OK for me but not that great. So I would like to ask, is it possible to add this parameter for controlling the number annotation of barplots?
Thank you for your clarification, and my apologies for the delayed response. I now understand what you're asking. However, to be honest, I currently don't have the capacity to work on this feature. That said, I hope this doesn't stop you from adding it!
I encourage you to check out the source code for the pymaf.MafFrame.plot_genesmethod and see if you can modify it to display the number of genes. I'd be more than happy to review your code if you submit a pull request.
Hello guys,
The library you made is really awesome and ready to use. But I really wonder is it possible to add a parameter for controlling the number of genes on plot_genes or other plotting functions, which I am manually doing now.
Best regards
The text was updated successfully, but these errors were encountered: