prody / ProDy

A Python Package for Protein Dynamics Analysis
http://prody.csb.pitt.edu
Other
437 stars 158 forks source link

Exporting a cross-correlation map from Jupyter notebook #1387

Closed conor-mckay98 closed 3 years ago

conor-mckay98 commented 3 years ago

Hi,

I am trying to export a cross-correlations map for a protein which has 2000 residues. Due to the size of the protein i dont want to screenshot the cross- correlation graph as the resolution will not be high enough to distinguish the individual residues. Is it possible to export write out a file from jupyter notebook giving the cross-correlation map?

Thank you for your help.

jamesmkrieger commented 3 years ago

Yes, there is a writeArray function that you can use for that.

conor-mckay98 commented 3 years ago

Okay thanks. How would I write that? I am using a protein called NSP12, and to show the cross correlations I have written showCrossCorr(NSP12_anm)

jamesmkrieger commented 3 years ago

I think the follow should work

cross_corr_matrix = calcCrossCorr(NSP12_anm)
writeArray('NSP12_anm_cross_corr_matrix', cross_corr_matrix)
conor-mckay98 commented 3 years ago

It returned an error --------------------------------------------------------------------------- NameError Traceback (most recent call last)

in ----> 1 writeArray('NSP12_anm_cross_corr_matrix', cross_corr_matrix) NameError: name 'cross_corr_matrix' is not defined Sorry, I haven't defined cross_corr_matrix, how would I do this? Thank you for you patience.
jamesmkrieger commented 3 years ago

I just gave you two commands. The first should define it. Did that not work?

conor-mckay98 commented 3 years ago

My bad! it has worked. I only typed the second command

jamesmkrieger commented 3 years ago

Great!