CEFCON
CEFCON copied to clipboard
How to save results from jupyter?
Dear author, thanks for your work! However, I meet some questions during use. Would you mind provide some help?
-
How to save result's fig as PDF or SVG file? Such as these example figs in jupyter notebook?
-
How to save detail result from jupyter notebook? Such as, If I hope to check the detail info of every regulon-like gene module. What should I do?
Thanks a lot for your help!
Best regards, HE
@WPZgithub same question!
Hi! Sorry for the delayed response.
For the first question:
You can save the result image with this function plt.savefig( ) . For example:
current_figure = plt.gcf()
current_figure .savefig("filename.pdf", dpi=150)
Additionally, I'm considering updating the code soon to allow for image output to a file by setting the parameter accordingly.
For the second question: You can access detailed information about each regulon-like gene module as follows:
RGMs = result.RGMs_AUCell_dict['RGMs'] # A list of all the regulon-like gene modules
regulator_info = RGMs[0].name # The name of the first regulon-like gene module
gene_members = RGMs[0].gene2weight.keys() # The first regulon-like gene module
By the way, the command-line usage can directly output all the result files.
Dear author, thanks a lot!
@WPZgithub sorry to interrupt But if I want to save the constructed regulatory network and the driver regulators, how should I do? That is, after time-consuming running of the construction and identification of GRN, I want to save the result and load them locally for the downstream analysis and visualization.
@LiuCanidk same question! how to save the result???