Rosetta
|
Classes | |
class | ErraserError |
Functions | |
def | error_exit (message="") |
def | rosetta_bin_path (exe_file, rosetta_folder="") |
def | initialize_rna_tools (rosetta_folder="") |
def | get_fasta (pdb_file, out_file, rosetta_folder="") |
def | rosetta_database_path (rosetta_folder="") |
def | subprocess_call (command, out=sys.stdout, err=sys.stderr, is_append_file=False) |
def | subprocess_out (command, err=sys.stderr) |
def | grep (pattern, input_file) |
def | remove (pattern, ignore_errors=True) |
def | copy (file1, dst) |
def | move (file1, dst) |
def | get_total_res (pdbname) |
def | find_nearby_res (input_pdb, input_res, dist_cutoff, reload=True) |
def | parse_options (argv, tag, default) |
def | parse_option_int_list (argv, tag) |
def | parse_option_string_list (argv, tag) |
def | parse_option_chain_res_list (argv, tag) |
def | rna_rosetta_ready_set (input_pdb, out_name, option, rosetta_bin="", rosetta_database="", rna_prot_erraser=False) |
def | extract_pdb (silent_file, output_folder_name, rosetta_bin="", rosetta_database="", extract_first_only=False, output_virtual=False, rna_prot_erraser=False) |
def | phenix_release_tag () |
def | phenix_rna_validate (input_pdb, outliers_only=True) |
def | find_error_res (input_pdb) |
def | pdb2fasta (input_pdb, fasta_out, using_protein=False) |
def | pdb_slice (input_pdb, out_name, segment) |
def | check_path_exist (path_name) |
def | load_pdb_coord_old (input_pdb) |
def | load_pdb_coord (input_pdb) |
def | regularize_pdb (input_pdb, out_name) |
def | regularize_OP1_OP2 (input_pdb, out_name) |
def | rosetta2phenix_merge_back (orig_pdb, rs_pdb, out_name) |
def | rosetta2std_pdb (input_pdb, out_name, cryst1_line="") |
def | pdb2rosetta (input_pdb, out_name, alter_conform='A', PO_dist_cutoff=2.0, use_rs_atom_res_name=False, using_protein=False, renumbering=True) |
def | res_num_convert (res_conversion_list, res_pdb) |
def | res_wise_rmsd (pdb1, pdb2) |
def | pdb_slice_into_chunks (input_pdb, n_chunk) |
def | pdb_slice_with_patching (input_pdb, out_name, slice_res_list) |
def | sliced2orig_merge_back (orig_pdb, new_pdb, out_name, res_list) |
def | find_chi_angle (input_pdb, res) |
Variables | |
file_path = os.path.split( os.path.abspath(__file__) ) [0] | |
def erraser_util.check_path_exist | ( | path_name | ) |
References error_exit().
Referenced by copy(), extract_pdb(), erraser_option.erraser_option.finalize(), find_nearby_res(), get_total_res(), grep(), load_pdb_coord(), load_pdb_coord_old(), move(), pdb2fasta(), pdb2rosetta(), pdb_slice(), pdb_slice_into_chunks(), pdb_slice_with_patching(), phenix_rna_validate(), regularize_OP1_OP2(), regularize_pdb(), res_wise_rmsd(), rna_rosetta_ready_set(), rosetta2phenix_merge_back(), rosetta2std_pdb(), rosetta_bin_path(), rosetta_database_path(), and sliced2orig_merge_back().
def erraser_util.copy | ( | file1, | |
dst | |||
) |
Copy files to new destination. Replace with new one if the two overlaped.
References check_path_exist().
Referenced by UBQ_E2Mover.analyze_and_filter(), UBQ_GTPase_disulfide_Mover.analyze_and_filter(), InterfaceStrandFinderMover.apply(), detail::bigint.assign(), utility::graph::RingDetection< Graph >.CombinePaths(), detail.copy_str(), detail.copy_unit(), erraser_wrapper.erraser(), erraser_wrapper.erraser_minimize(), basic_printf_context< OutputIt, Char >.format(), formatter< arg_join< It, Sentinel, Char >, Char >.format(), formatter< std::tm, Char >.format(), detail::fallback_formatter< T, Char, enable_if_t< is_streamable< T, Char >::value > >.format(), detail::chrono_formatter< FormatContext, OutputIt, Rep, Period >.format_localized(), pyrosetta.tests.protocols.indexed_structure_store.test_search.fragment_start_indicies_from_residue_array(), pyrosetta.tests.protocols.indexed_structure_store.test_search.TestStructureSearch.gen_test_set(), main(), numeric::MathMatrix< T >.MathMatrix(), numeric::MathNTensor< T, N >.MathNTensor(), numeric::MathTensor< T >.MathTensor(), numeric::MathVector< T >.MathVector(), detail::chrono_formatter< FormatContext, OutputIt, Rep, Period >.on_text(), numeric::MathMatrix< T >.operator=(), numeric::MathVector< T >.operator=(), numeric::MathNTensor< T, N >.operator=(), numeric::MathTensor< T >.operator=(), erraser_wrapper.outlier_rebuild_if_necessary(), erraser_wrapper.rmsd_rebuild_if_necessary(), ChallengeMover.sample(), erraser_wrapper.seq_rebuild(), erraser_wrapper.seq_rebuild_new(), zinc1_homodimer_design.setup_metalsite_constraints(), split_chains(), erraser_wrapper.SWA_rebuild_erraser(), erraser_wrapper.SWA_rebuild_erraser_async(), erraser_wrapper.SWA_rebuild_erraser_postproc(), pyrosetta.tests.protocols.indexed_structure_store.test_search.TestStructureSearch.test_rep_search(), tokenize_string(), trim_redundant_local_minima(), detail.write(), and detail::arg_formatter_base< OutputIt, Char, ErrorHandler >.write().
def erraser_util.error_exit | ( | message = "" | ) |
Referenced by check_path_exist(), measure_params.compute_torsion(), erraser_wrapper.erraser(), erraser_option.erraser_option.finalize(), find_chi_angle(), find_nearby_res(), initialize_rna_tools(), load_pdb_coord(), load_pdb_coord_old(), parse_option_chain_res_list(), parse_option_int_list(), parse_options(), pdb2rosetta(), pdb_slice(), remove(), res_num_convert(), res_wise_rmsd(), rosetta_bin_path(), and rosetta_database_path().
def erraser_util.extract_pdb | ( | silent_file, | |
output_folder_name, | |||
rosetta_bin = "" , |
|||
rosetta_database = "" , |
|||
extract_first_only = False , |
|||
output_virtual = False , |
|||
rna_prot_erraser = False |
|||
) |
Extract pdb's from Rosetta silent files.
References check_path_exist(), if(), ObjexxFCL.len(), test_terpenes.lower, move(), basic::database.open(), binder.replace(), rosetta_bin_path(), rosetta_database_path(), str(), and subprocess_call().
Referenced by erraser_wrapper.SWA_rebuild_erraser().
def erraser_util.find_chi_angle | ( | input_pdb, | |
res | |||
) |
Find the chi angle value for given residue of the input pdb.
References measure_params.compute_torsion(), error_exit(), run_backbone.float, ObjexxFCL.len(), basic::database.open(), and binder.replace().
Referenced by erraser_wrapper.SWA_rebuild_erraser().
def erraser_util.find_error_res | ( | input_pdb | ) |
Return a list of error resdiue in the given pdb file (RNA only). Use phenix.rna_validate.
References run_backbone.float, enumerate_junctions.int, basic::options::OptionKeys::in::file.list, phenix_rna_validate(), and set().
Referenced by erraser_wrapper.erraser().
def erraser_util.find_nearby_res | ( | input_pdb, | |
input_res, | |||
dist_cutoff, | |||
reload = True |
|||
) |
Find nearby residues to the input residues by a distance_cutoff. All the residues should be in the same chain with continous numbering starting from 1.
References check_path_exist(), measure_params.compute_dist(), error_exit(), ObjexxFCL.len(), load_pdb_coord(), load_pdb_coord_old(), and range.
Referenced by pdb_slice_into_chunks(), and pdb_slice_with_patching().
def erraser_util.get_fasta | ( | pdb_file, | |
out_file, | |||
rosetta_folder = "" |
|||
) |
Gets the FASTA contents using pdb2fasta.py Note that initialize_rna_tools has been called already
References pyrosetta.tests.distributed.test_dask.format, basic::database.open(), and binder.split().
Referenced by erraser_wrapper.erraser_minimize().
def erraser_util.get_total_res | ( | pdbname | ) |
Return the total number of residues ina pdb file.
References check_path_exist(), ObjexxFCL.len(), and basic::database.open().
Referenced by erraser_wrapper.erraser(), erraser_wrapper.erraser_single_res(), pdb_slice_into_chunks(), erraser_wrapper.seq_rebuild_new(), erraser_wrapper.SWA_rebuild_erraser(), and erraser_wrapper.SWA_rebuild_erraser_postproc().
def erraser_util.grep | ( | pattern, | |
input_file | |||
) |
Search for the given pattern in the input file. Return a list of lines containing the pattern.
References check_path_exist(), and basic::database.open().
Referenced by rosetta2std_pdb().
def erraser_util.initialize_rna_tools | ( | rosetta_folder = "" | ) |
References error_exit().
def erraser_util.load_pdb_coord | ( | input_pdb | ) |
Load in the pdb and return the coordinates for each heavy atom in each residue. Also return a list of C1' coordinates AMW: now returns a dict from name (i.e. A:1) to coords.
References check_path_exist(), error_exit(), run_backbone.float, ObjexxFCL.len(), and basic::database.open().
Referenced by find_nearby_res(), and res_wise_rmsd().
def erraser_util.load_pdb_coord_old | ( | input_pdb | ) |
Load in the pdb and return the coordinates for each heavy atom in each residue. Also return a list of C1' coordinates AMW: old version that supports SWA_rebuild better.
References check_path_exist(), error_exit(), run_backbone.float, enumerate_junctions.int, ObjexxFCL.len(), and basic::database.open().
Referenced by find_nearby_res().
def erraser_util.move | ( | file1, | |
dst | |||
) |
Move files to new destination.
References check_path_exist().
Referenced by extract_pdb(), and rna_rosetta_ready_set().
def erraser_util.parse_option_chain_res_list | ( | argv, | |
tag | |||
) |
Parse input cmdline option with the following format: ... -tag A10 B20-22... Return a list of strings with number expanded: ['A10', 'B20', 'B21', 'B22', ... ] AMW: we will have to expand this so that it takes seg ID at the end
References error_exit(), enumerate_junctions.int, ObjexxFCL.len(), and range.
def erraser_util.parse_option_int_list | ( | argv, | |
tag | |||
) |
Parse input cmdline option with the following format: ... -tag 1 5 7-20 40 45-60 ... Return a list of expanded numbers
References error_exit(), enumerate_junctions.int, ObjexxFCL.len(), and range.
def erraser_util.parse_option_string_list | ( | argv, | |
tag | |||
) |
Parse input cmdline option with the following format: ... -tag ss bbb fef ... Return a list of input strings
References ObjexxFCL.len(), and range.
def erraser_util.parse_options | ( | argv, | |
tag, | |||
default | |||
) |
Parse various input options.
References error_exit(), run_backbone.float, if(), enumerate_junctions.int, and ObjexxFCL.len().
Referenced by erraser_option.erraser_option.read_cmdline_erraser(), erraser_option.erraser_option.read_cmdline_erraser_single_res(), and erraser_option.erraser_option.read_cmdline_full().
def erraser_util.pdb2fasta | ( | input_pdb, | |
fasta_out, | |||
using_protein = False |
|||
) |
Extract fasta info from pdb.
References check_path_exist(), pyrosetta.tests.distributed.test_dask.format, ObjexxFCL.len(), and basic::database.open().
Referenced by erraser_wrapper.SWA_rebuild_erraser().
def erraser_util.pdb2rosetta | ( | input_pdb, | |
out_name, | |||
alter_conform = 'A' , |
|||
PO_dist_cutoff = 2.0 , |
|||
use_rs_atom_res_name = False , |
|||
using_protein = False , |
|||
renumbering = True |
|||
) |
Convert regular pdb file to rosetta format. Return a list for converting original residues # into new ones, a list of residue convalently bonded to removed HETATM so they can be fixed in further refinement, a list of cutpoints (terminal residues) in the structure, and the CRYST1 line in the model.
References check_path_exist(), measure_params.compute_dist(), error_exit(), run_backbone.float, pyrosetta.tests.distributed.test_dask.format, ObjexxFCL.len(), basic::options::OptionKeys::in::file.list, basic::database.open(), ObjexxFCL.rjust(), rosetta_database_path(), binder.split(), str(), and ObjexxFCL.strip().
Referenced by erraser_wrapper.erraser(), and erraser_wrapper.erraser_single_res().
def erraser_util.pdb_slice | ( | input_pdb, | |
out_name, | |||
segment | |||
) |
Slice the input pdb file with given segment. Segment format example: '1-3 8 10-30 45 46 40' Or input a python int list as the segment. Return list of cut residue
References check_path_exist(), error_exit(), enumerate_junctions.int, ObjexxFCL.len(), basic::database.open(), and range.
Referenced by pdb_slice_with_patching(), and erraser_wrapper.SWA_rebuild_erraser().
def erraser_util.pdb_slice_into_chunks | ( | input_pdb, | |
n_chunk | |||
) |
Slice the pdb into smaller chunks. Return a list of res_list for each chunk.
References check_path_exist(), find_nearby_res(), get_total_res(), enumerate_junctions.int, ObjexxFCL.len(), and range.
def erraser_util.pdb_slice_with_patching | ( | input_pdb, | |
out_name, | |||
slice_res_list | |||
) |
Slice the pdb file with given input residue list. Patch the nearby residues to the sliced pdb. Return a sorted new residue number list and a list of patched res (in new order).
References check_path_exist(), find_nearby_res(), and pdb_slice().
Referenced by erraser_wrapper.SWA_rebuild_erraser().
def erraser_util.phenix_release_tag | ( | ) |
References enumerate_junctions.int, and subprocess_out().
def erraser_util.phenix_rna_validate | ( | input_pdb, | |
outliers_only = True |
|||
) |
Parse output of phenix.rna_validate.
References check_path_exist(), basic::options::OptionKeys::stepwise.enumerate, filter, enumerate_junctions.int, auto-DRRAFTER_setup_next_round.is_number(), ObjexxFCL.len(), binder.replace(), binder.split(), and subprocess_out().
Referenced by erraser_single_res_analysis.extract_info(), and find_error_res().
def erraser_util.regularize_OP1_OP2 | ( | input_pdb, | |
out_name | |||
) |
Regularize the chirality for OP1/OP2 to match PDB standard.
References check_path_exist(), measure_params.cross(), measure_params.dot(), run_backbone.float, ObjexxFCL.len(), basic::database.open(), and measure_params.vec_diff().
Referenced by erraser_wrapper.erraser(), and erraser_wrapper.erraser_single_res().
def erraser_util.regularize_pdb | ( | input_pdb, | |
out_name | |||
) |
Regularize the residue and atom naming of input pdb file (for RNA part).
References check_path_exist(), ObjexxFCL.len(), and basic::database.open().
Referenced by erraser_wrapper.erraser(), and erraser_wrapper.erraser_single_res().
def erraser_util.remove | ( | pattern, | |
ignore_errors = True |
|||
) |
Remove files/folder that agree with the pattern.
References error_exit().
Referenced by add_shell(), concave_hull(), convex_hull(), ui::task::Task.delete_job(), ui::task::Project.erase(), erraser_wrapper.erraser(), erraser_wrapper.erraser_single_res(), utility::file.file_delete(), filter_combine_long_loop(), erraser_option.erraser_option.finalize(), binder::Config.is_buffer_protocol_requested(), binder::Config.is_class_binding_requested(), binder::Config.is_class_skipping_requested(), binder::Config.is_function_binding_requested(), binder::Config.is_function_skipping_requested(), main(), pyrosetta.toolbox.py_jobdistributor.PyJobDistributor.output_decoy(), job_manager.StatusWindow.pop(), utility::vectorL< L, T, A >.pop(), job_manager.AppWindow.pop_status(), binder::Config.read(), job_manager.StatusWindow.refresh(), utility.remove_from_string(), erraser_wrapper.seq_rebuild(), Spacegroup.set_spacegroup(), erraser_wrapper.SWA_rebuild_erraser(), erraser_wrapper.SWA_rebuild_erraser_multiproc(), erraser_wrapper.SWA_rebuild_erraser_postproc(), and swa_rna_cluster().
def erraser_util.res_num_convert | ( | res_conversion_list, | |
res_pdb | |||
) |
Convert pdb residue number (A15, chainID + resnum) to Rosetta pdb numbering.
References error_exit().
Referenced by erraser_wrapper.erraser(), and erraser_wrapper.erraser_single_res().
def erraser_util.res_wise_rmsd | ( | pdb1, | |
pdb2 | |||
) |
Compute the rmsd of each residue from two pdb file. No extra alignment is performed. Return a list of rmsd of each residue. Assuming the pdb files have the same ordering of res name / atom name.
References check_path_exist(), measure_params.compute_squared_dist(), error_exit(), ObjexxFCL.len(), load_pdb_coord(), print(), and range.
Referenced by erraser_wrapper.erraser().
def erraser_util.rna_rosetta_ready_set | ( | input_pdb, | |
out_name, | |||
option, | |||
rosetta_bin = "" , |
|||
rosetta_database = "" , |
|||
rna_prot_erraser = False |
|||
) |
Call Rosetta to read in a pdb and output the model right away. Can be used to ensure the file have the rosetta format for atom name, ordering and phosphate OP1/OP2.
References check_path_exist(), pyrosetta.tests.distributed.test_dask.format, test_terpenes.lower, move(), rosetta_bin_path(), rosetta_database_path(), str(), and subprocess_call().
def erraser_util.rosetta2phenix_merge_back | ( | orig_pdb, | |
rs_pdb, | |||
out_name | |||
) |
Merge the rosetta pdb back to the phenix refined pdb.
References check_path_exist(), pyrosetta.tests.distributed.test_dask.format, basic::database.open(), binder.replace(), ObjexxFCL.rjust(), rosetta_database_path(), binder.split(), and str().
Referenced by erraser_wrapper.erraser(), and erraser_wrapper.erraser_single_res().
def erraser_util.rosetta2std_pdb | ( | input_pdb, | |
out_name, | |||
cryst1_line = "" |
|||
) |
Convert the rosetta pdb file to standard pdb format. (RNA only) Prepend the CRYST1 line if found in the pdb file or given in input.
References check_path_exist(), grep(), ObjexxFCL.len(), and basic::database.open().
Referenced by erraser_wrapper.erraser().
def erraser_util.rosetta_bin_path | ( | exe_file, | |
rosetta_folder = "" |
|||
) |
Return the absolute path to the given executable file in Rosetta. If no input is given, return the Rosetta bin folder path. Only the prefix should be given. Rosetta will figure out the rest. User can provides either the Rosetta root path or the binary path as optional input, or the function will search for $ROSETTA environment variable.
References check_path_exist(), error_exit(), and ObjexxFCL.len().
Referenced by erraser_wrapper.erraser_minimize(), extract_pdb(), rna_rosetta_ready_set(), erraser_wrapper.seq_rebuild_new(), and erraser_wrapper.SWA_rebuild_erraser().
def erraser_util.rosetta_database_path | ( | rosetta_folder = "" | ) |
Return the absolute path to the Rosetta database. If no input is given, return the Rosetta bin folder path. User can provides either the Rosetta root path or the database path as optional input, or the function will search for $ROSETTA environment variable.
References check_path_exist(), and error_exit().
Referenced by erraser_wrapper.erraser_minimize(), extract_pdb(), pdb2rosetta(), rna_rosetta_ready_set(), rosetta2phenix_merge_back(), and erraser_wrapper.SWA_rebuild_erraser().
def erraser_util.sliced2orig_merge_back | ( | orig_pdb, | |
new_pdb, | |||
out_name, | |||
res_list | |||
) |
Merge processed sliced segment back to original pdb (Rosetta format).
References check_path_exist(), enumerate_junctions.int, ObjexxFCL.len(), and basic::database.open().
Referenced by erraser_wrapper.erraser_single_res(), erraser_wrapper.SWA_rebuild_erraser(), and erraser_wrapper.SWA_rebuild_erraser_postproc().
def erraser_util.subprocess_call | ( | command, | |
out = sys.stdout , |
|||
err = sys.stderr , |
|||
is_append_file = False |
|||
) |
Execute the given commands in /usr/bin/sh. Error exit if failed.
References basic::database.open().
Referenced by erraser_wrapper.erraser_minimize(), erraser_single_res_analysis.extract_info(), extract_pdb(), rna_rosetta_ready_set(), erraser_wrapper.seq_rebuild_new(), and erraser_wrapper.SWA_rebuild_erraser().
def erraser_util.subprocess_out | ( | command, | |
err = sys.stderr |
|||
) |
Execute the given commands in /usr/bin/sh. Error exit if failed. Return the output as a list of each lines.
References basic::database.open(), and binder.split().
Referenced by phenix_release_tag(), phenix_rna_validate(), and erraser_wrapper.SWA_rebuild_erraser().
erraser_util.file_path = os.path.split( os.path.abspath(__file__) ) [0] |