simbad.util.pyrvapi_results module

Module to interact with pyrvapi

class RvapiMetadata[source]

Bases: object

Storage container for metadata required by JsCoFe

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

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]

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'>)
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:

Page containing the results from the contaminant search

Return type:

object

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

Function to create/display graphs following MR

df : DataFrame
Input DataFrame containing data to be plotted
graph_sec : str
Section the output graph will be displayed in
graph_widget : str
Widget ID
Returns:Section containing the graphic representation of Z-score results from SIMBAD
Return type:object
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:

Page containing the results from the lattice parameter search

Return type:

object

create_log_tab(logfile)[source]

Function to create log tab

Parameters:logfile (str) – Path to the log file
Returns:Updating page containing log
Return type:str
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:

Page containing the results from the MoRDa db search

Return type:

object

create_table(df, table_id)[source]

Function to create/display tables

Parameters:
  • df (DataFrame) – Input DataFrame containing data to be plotted
  • table_id (str) – Table ID
Returns:

table containing the results from SIMBAD

Return type:

object

display_citation_tab()[source]

Function to display citations for programs used within SIMBAD

Returns:Section containing the relevant citations
Return type:object
display_results(summarize, results_to_display)[source]
display_summary_tab()[source]

Function to create the MoRDa Database results tab

Returns:Page containing a summary of the best results from SIMBAD
Return type:object
fix_path(path)[source]
static get_arguments_from_log(log)[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:

Section containing mr and refinement logs

Return type:

object

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:

Section containing the pdb and mtz for a result

Return type:

object

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