jade.rosetta_jade package¶
jade.rosetta_jade.BenchmarkInfo module¶
-
class
jade.rosetta_jade.BenchmarkInfo.
BenchmarkInfo
(decoy_path, full_name, final_name, scorefunction='talaris2014')[source]¶ Simple Class for holding info for a particular benchmark. Parses the Run_Settings.txt file in the decoy directory. This file is output by RunRosettaBenchmarks.
The settings dictionary then holds key/value pairs. Here is an example of this file for RAbD:
CDR = ALL DATASET = bm2_ten DOCK = False INNER_CYCLE_ROUNDS = 1 INPUT_PDB_TYPE = pareto L_CHAIN = kappa MINTYPE = relax OUTER_CYCLE_ROUNDS = 100 PAPER_AB_DB = True PROTOCOL = even_cluster_mc RANDOM_START = True REMOVE_ANTIGEN = True SEPARATE_CDRS = False
-
jade.rosetta_jade.BenchmarkInfo.
get_run_settings
(dir, fname='RUN_SETTINGS.txt')[source]¶ Gets a dict of the settings used to run the benchmark in the directory.
The settings file looks like this, and is output by RunRosettaBenchmarks into the decoy directory:
CDR = ALL DATASET = bm2_ten DOCK = False INNER_CYCLE_ROUNDS = 1 INPUT_PDB_TYPE = pareto L_CHAIN = kappa MINTYPE = relax OUTER_CYCLE_ROUNDS = 100 PAPER_AB_DB = True PROTOCOL = even_cluster_mc RANDOM_START = True REMOVE_ANTIGEN = True SEPARATE_CDRS = FalseParameters: dir – str Return type: defaultdict
jade.rosetta_jade.FeaturesJsonCreator module¶
-
class
jade.rosetta_jade.FeaturesJsonCreator.
JsonCreator
(out_path, script_type)[source]¶ Basic implementation of a simple JsonCreator to create Jsons. Could be expanded to not load jsons with pre-set scripts. A nicer implementation would be a GUI for running the FeaturesReporter scripts.
-
jade.rosetta_jade.FeaturesJsonCreator.
run_features_json
(json_path, backround=False, outpath='')[source]¶ Convenience function Outputs an R script for running a JSON file, and runs it. Works with the new Library structure of the Features Reporter Framework.
jade.rosetta_jade.Region module¶
jade.rosetta_jade.RunRosetta module¶
-
class
jade.rosetta_jade.RunRosetta.
RunRosetta
(program=None, parser=None, db_mode=False, json_run=None)[source]¶ Bases:
object
-
jade.rosetta_jade.RunRosetta.
get_option_strings
(cmd)[source]¶ Get the options as a string to be printed or saved to a file. :param cmd: :rtype: str
-
jade.rosetta_jade.RunRosetta.
run_on_qsub
(cmd, queue_dir, name, print_only=False, extra_opts='')[source]¶
jade.rosetta_jade.RunRosettaBenchmarks module¶
-
class
jade.rosetta_jade.RunRosettaBenchmarks.
RunRosettaBenchmarks
(program=None, parser=None)[source]¶
jade.rosetta_jade.ScoreFiles module¶
-
class
jade.rosetta_jade.ScoreFiles.
ScoreFile
(filename)[source]¶ -
get_Dataframe
(scoreterms=None, order_by='total_score', top_n=-1, reverse=True)[source]¶ Get data as a pandas dataframe. Definitely preferred now. :param scoreterms: list :param order_by: str :param top_n: int :param reverse: bool :rtype: pandas.DataFrame
-
get_ordered_decoy_list
(scoreterm, decoy_names=None, top_n=-1, reverse=False)[source]¶ Get an ordered tuple of [[score, decoy_name], …] Will automatically order some known scoreterms (hbonds_int, dSASA_int)
Return type: list[list]
-
-
jade.rosetta_jade.ScoreFiles.
get_scorefiles
(indir='/home/docs/checkouts/readthedocs.org/user_builds/bio-jade/checkouts/latest/docs')[source]¶ Get Score files from a directory. Walk through all directories in directory. :param indir: str :rtype: list
-
jade.rosetta_jade.ScoreFiles.
plot_score_vs_rmsd
(df, title, outpath, score='total_score', rmsd='looprms', top_p=0.95, reverse=True)[source]¶ Plot a typical Score VS RMSD using matplotlib, save it somewhere. Return the axes. By default, plot the top 95% :param df: pandas.DataFrame :param outpath: str :param score: str :param rmsd: str :rtype: matplotlib.Axes
-
jade.rosetta_jade.ScoreFiles.
pymol_session_on_top_df
(df, outdir, decoy_dir=None, scoreterm='total_score', top_n=10, decoy_column='decoy', native_path=None, out_prefix_override=None, ab_structure=False, superimpose=False, run_pymol=True)[source]¶ Make a PyMol session (or setup a scripter) on top X using a dataframe. Return the scripter for extra control.
df should have an attribute of ‘name’ or out_prefix_override should be set.
Parameters: - df – pandas.DataFrame
- outdir – str
- decoy_dir – str
- scoreterm – str
- top_n – int
- decoy_column – str
- native_path – str
- out_prefix_override – str
- ab_structure – boolean
- superimpose – boolean
Return type:
jade.rosetta_jade.SetupRosettaOptionsBenchmark module¶
-
class
jade.rosetta_jade.SetupRosettaOptionsBenchmark.
SetupRosettaOptionsBenchmark
(json_file)[source]¶ Bases:
jade.rosetta_jade.SetupRosettaOptionsGeneral.SetupRosettaOptionsGeneral
Class for setting up Rosetta Benchmarks. See database/rosetta/benchmark_jsons_rabd/nstruct_test.json for an example.
Basically, a set of benchmarks and rosetta options are given in the JSON. Other keys can be specified for specific benchmarks (like the instructions file stuff in the above file.)
This can be used to use a single JSON file and run RosettaMPI on ALL combinations of benchmarks given.
-
get_benchmark_names
(only_rosetta=False)[source]¶ Get the names of all the benchmarks we will run.
Each benchmark must have a dictionary that defines ‘benchmarks’ as a list. You may optionally give the rosetta_option. Currently, your subclass of RunRosetta will need to code how all this is run. Hopefully, that will change.
If only_rosetta is true, will only give the benchmark names that are based on rosetta options.
For example:
- “outer_cycle_rounds”:{
- “rosetta_option”:”-outer_cycle_rounds”, “benchmarks”:[ 25, 50, 75, 100]
},
Return type: list
-
get_benchmarks_of_key
(benchmark_name)[source]¶ Get the list of benchmarks for a particular benchmark key. :param benchmark_name: str :rtype: list
-
get_non_rosetta_option_benchmark_names
()[source]¶ Similar to get_benchmark_names, but only for options which do not have the tag rosetta_option
Return type: list
-
get_rosetta_option_of_key
(benchmark_name)[source]¶ Get the Rosetta option :param benchmark_name: :rtype: str
-
jade.rosetta_jade.SetupRosettaOptionsGeneral module¶
-
class
jade.rosetta_jade.SetupRosettaOptionsGeneral.
SetupRosettaOptionsGeneral
(cluster_json_file)[source]¶ Bases:
object
Class for setting up more general Rosetta options for benchmarking and repeatable runs on different clusters. Useful for benchmarking. Subclass for adding more benchmarking settings for specific benchmarks.
jade.rosetta_jade.alignment module¶
-
jade.rosetta_jade.alignment.
align_to_second_pose_save_pdb
(pose_name, pose, second_pose, outdir, overhang=0, stem_align=False)[source]¶
jade.rosetta_jade.features module¶
-
jade.rosetta_jade.features.
create_features_db
(pdb_list, xml_name, compiler, score_weights, out_db_name, out_db_batch, outdir, use_present_dbs, indir='', mpi=True, np=5)[source]¶ old_db_name = outdir+’/’+out_db_name+’.’+score_weights+”.db3” new_db_name = outdir+’/’+out_db_name+’.’+xml_name+’.’+score_weights+”.db3” if os.path.exists(old_db_name):
os.system(‘mv ‘+old_db_name+’ ‘+new_db_name) print “Old db name already exists. Moving.” return