simbad.util.pyrvapi_results module

Module to interact with pyrvapi

class RvapiMetadata[source]

Bases: object

Storage container for metadata required by JsCoFe

Attributes

n_results

Methods

add(e)
to_json()
add(e)[source]
n_results
to_json()[source]
class SimbadOutput(rvapi_document, webserver_uri, display_gui, logfile, work_dir, ccp4i2_xml=None, tab_prefix=”)[source]

Bases: object

Class to display the output of SIMBAD

Examples

>>> from simbad.util import pyrvapi_results
>>> gui = pyrvapi_results.SimbadOutput(<'rvapi_file'>, <'webserver_uri'>, <'display__gui'>,
...                                    <'logfile'>, <'work_dir'>)
>>> gui.display_results(<'show_summary'>)

Attributes

webserver_uri (str) The uri if run on a webserver
display_gui (bool) Option to prevent results being displayed
logfile (str) Path to the log file
work_dir (str) Path to the work directory [default: None]
summary (bool) Option to display summary tab [default: False]

Methods

adjust_paths_of_files(files)
create_contaminant_results_tab(…) Function to create the contaminant results tab
create_graphs(df, graph_sec, graph_widget) Function to create/display graphs following MR
create_lattice_results_tab(lattice_results, …) Function to create the lattice results tab
create_log_tab(logfile) Function to create log tab
create_morda_db_results_tab(…) Function to create the MoRDa Database results tab
create_table(df, table_id) Function to create/display tables
display_results(summarize, results_to_display)
display_summary_tab() Function to create the MoRDa Database results tab
fix_path(path)
init_from_ccp4i2_xml(ccp4i2_xml, …) This code is largely stolen from Andrew Lebedev
output_log_files(sec, mr_log, ref_log) Function to display the log files for the result
output_result_files(sec, diff_map, ref_map, …) Function to display the result files for the result
rel_path_for_jscofe(path)
save_document()
store_entry_in_rvapi_meta(rank, source, …)
adjust_paths_of_files(files)[source]
create_contaminant_results_tab(contaminant_results, contaminant_mr_results, results_to_display)[source]

Function to create the contaminant results tab

Parameters:

contaminant_results : str

Path to the file containing the contaminant results

contaminant_mr_results : str

Path to the file containing the contaminant MR results

results_to_display : int

Number of results to display

Returns:

object

Page containing the results from the contaminant search

static create_graphs(df, graph_sec, graph_widget)[source]

Function to create/display graphs following MR

df : :Pandas dataframe:
Input Pandas dataframe containing data to be plotted
graph_sec : str
Section the output graph will be displayed in
graph_widget : str
Widget ID
Returns:

object

Section containing the graphic representation of Z-score results from SIMBAD

create_lattice_results_tab(lattice_results, lattice_mr_results, results_to_display)[source]

Function to create the lattice results tab

Parameters:

lattice_results : str

Path to the file containing the lattice results

lattice_mr_results : str

Path to the file containing the lattice MR results

results_to_display : int

Number of results to display

Returns:

object

Page containing the results from the lattice parameter search

create_log_tab(logfile)[source]

Function to create log tab

Parameters:

logfile : str

Path to the log file

Returns:

str

self.log_tab_id

object

Updating page containing log

create_morda_db_results_tab(morda_db_results, morda_db_mr_results, results_to_display)[source]

Function to create the MoRDa Database results tab

Parameters:

morda_db_results : str

Path to the file containing the MoRDa db results

morda_db_mr_results : str

Path to the file containing the MoRDa db MR results

results_to_display : int

Number of results to display

Returns:

object

Page containing the results from the MoRDa db search

create_table(df, table_id)[source]

Function to create/display tables

Parameters:

df : :Pandas dataframe:

Input Pandas dataframe contaiing data to be plotted

table_id : str

Table ID

Returns:

object

table containing the results from SIMBAD

display_results(summarize, results_to_display)[source]
display_summary_tab()[source]

Function to create the MoRDa Database results tab

Returns:

object

Page containing a summary of the best results from SIMBAD

fix_path(path)[source]
init_from_ccp4i2_xml(ccp4i2_xml, pyrvapi_dir, share_jsrview, wintitle)[source]

This code is largely stolen from Andrew Lebedev

output_log_files(sec, mr_log, ref_log)[source]

Function to display the log files for the result

Parameters:

sec : str

Section the output logs will be added to

mr_log : str

Path to the output MR log

ref_log : str

Path to the output refinement log

Returns:

object

Section containing mr and refinement logs

output_result_files(sec, diff_map, ref_map, ref_mtz, ref_pdb)[source]

Function to display the result files for the result

Parameters:

sec : str

Section the output results files will be added to

diff_map : str

Path to the difference map

ref_map : str

Path to the refined map

ref_mtz : str

Path to the refined mtz

ref_pdb : str

Path to the refined pdb

Returns:

object

Section containing the pdb and mtz for a result

rel_path_for_jscofe(path)[source]
save_document()[source]
store_entry_in_rvapi_meta(rank, source, name, pdb, mtz, map_, dmap, best)[source]