Skip to content
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

How to save results from jupyter? #3

Open
River366 opened this issue Jan 25, 2024 · 5 comments
Open

How to save results from jupyter? #3

River366 opened this issue Jan 25, 2024 · 5 comments

Comments

@River366
Copy link

Dear author, thanks for your work!
However, I meet some questions during use. Would you mind provide some help?

  1. How to save result's fig as PDF or SVG file? Such as these example figs in jupyter notebook?
    Screenshot from 2024-01-25 13-53-39

  2. 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

@Roger-GOAT
Copy link

@WPZgithub same question!

@WPZgithub
Copy link
Owner

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.

@River366
Copy link
Author

River366 commented Mar 4, 2024

Dear author, thanks a lot!

@LiuCanidk
Copy link

@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.

@Roger-GOAT
Copy link

@LiuCanidk same question! how to save the result???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants