rstoolbox.plot.
plot_ramachandran
(df, seqID, fig, grid=None, positions=None, **kwargs)¶Generates a ramachandran plot in RAMPAGE style.
For more details and sources please refert to ramachandran plot for python
Background distribution data taken from git repository
The phi - psi dihedrals should be present in the DesignSerie. If this is not the case,
consider computing them using for example the get_sequence_and_structure()
.
Note that this function will only plot the ramachandran for a single decoy. If one
would like to compute it for mutiple decoys, please see the example below.
Parameters for scatter()
can be provided with prefix scatter_
.
Parameters for plot()
can be provided with prefix line_
.
Parameters: |
|
||||
---|---|---|---|---|---|
Returns: |
|
||||
Raises: |
|
See also
plot_ramachandran_single()
get_sequence_and_structure()
get_dihedrals()
get_phi()
get_psi()
Example
In [1]: import rstoolbox as rb
...: import pandas as pd
...: plt.style.use('ggplot')
...: definitions = {
...: "scores": ["score"],
...: "sequence" : "A",
...: "psipred" : "*",
...: "structure" : "*",
...: "dihedrals": "*"
...: }
...: dsf = rb.io.parse_rosetta_file(
...: "../rstoolbox/tests/data/input_3ssepred.minisilent.gz",
...: definitions )
...: figure = plt.figure(figsize=(15,10))
...: rb.plot.plot_ramachandran(dsf.iloc[0], "A", figure)
...: plt.tight_layout()
...: fig.subplots_adjust(top=1.2)
...:
In [2]: plt.show()
In [3]: plt.close()