jade.basic package¶
Subpackages¶
jade.basic.RestypeDefinitions module¶
-
class
jade.basic.RestypeDefinitions.
ResTypeSergey
(ignore_groups=[])[source]¶ Bases:
object
Residue Types corresponding to Sergey Menis’ definition of groups.
jade.basic.general module¶
-
jade.basic.general.
extract_score_from_decoy
(pdb_path)[source]¶ Extract total score from a rosetta decoy (gzipped or otherwise)
If score is not found, it will return 0.
Parameters: pdb_path – Returns: float
-
jade.basic.general.
fix_input_args
()[source]¶ Enables options to be passed to ArgumentParser with dashes, but not single charactor ones. Example:
–rosetta_args “-out:prefix test -out:path:all my/dir/”- Normally, this would fail if you had declared an -o option to the ArgumentParser.
- This happens because although the quotes are being parsed correctly, the system is looking or options using the starting ‘-‘ charactor. If you give a quote and then a space, you will recieve no error.
- This code essentially checks for single dashes and puts a space in front of them. Note that this does not work with single
- charactor options you are hoping to pass with a quote. Because there is no way to grab the input string from the system and fix it myself, for these it will have to have a space after the quotes. This at least fixes the most common use cases (Mostly for use with Rosetta.).
-
jade.basic.general.
get_all_combos
(list_of_lists)[source]¶ Get all the position-specific combos of a list of lists.
- This is taken directly from Stack Overflow:
- http://stackoverflow.com/questions/798854/all-combinations-of-a-list-of-lists
Parameters: list_of_lists – A list of lists we would like combos of. Return type: list[list]
-
jade.basic.general.
get_platform
()[source]¶ Get OS of the particular platform the toolkit is being run on.
-
jade.basic.general.
get_rosetta_program
(program, mpi=True, compiler='gcc')[source]¶ Get the set program
-
jade.basic.general.
match_patterns
(search_string, patterns)[source]¶ Uses RE to match multiple patterns. Returns boolean of success
Parameters: - search_string – str
- patterns – [str]
Return type: boolean
-
jade.basic.general.
merge_dicts
(*dict_args)[source]¶ Given any number of dicts, shallow copy and merge into a new dict, precedence goes to key value pairs in latter dicts. (Pre-Python 3.5) (http://stackoverflow.com/questions/38987/how-to-merge-two-python-dictionaries-in-a-single-expression)
jade.basic.numeric module¶
-
jade.basic.numeric.
distance
(x1, y1, z1, x2, y2, z2)[source]¶ Get the distance between variables. :param x1: float :param y1: float :param z1: float :param x2: float :param y2: float :param z2: float :rtype: float
-
jade.basic.numeric.
distance_numpy
(array1, array2)[source]¶ Get the distance between two points :param array1: numpy.Array :param array2: numpy.Array :rtype: float
-
jade.basic.numeric.
geometric_mean
(data)[source]¶ Get the geometric mean of the data. Useful for numbers that go from 0 -> and are a type of enrichment of the data.
Parameters: data – numpy.Array Returns: float
jade.basic.path module¶
-
jade.basic.path.
get_database_testing_path
()[source]¶ Get the path to the database testing file. :return:
-
jade.basic.path.
get_decoy_extension
(decoy)[source]¶ Return the extension of the decoy. .pdb, .pdb.gz, .cif, .cif.gz, etc. :param decoy: str :rtype: str
-
jade.basic.path.
get_decoy_name
(decoy)[source]¶ Get the decoy name from path or name, whether .pdb, .pdb.gz or no extension. :param decoy: :rtype:str
-
jade.basic.path.
get_decoy_path
(decoy, alternate_paths=None)[source]¶ Search .pdb, .pdb.gz, .cif, .cif.gz, .xml, .xml.gz In addition, Search alternative search paths. Return found path or NONE.
Parameters: - decoy –
- alternate_paths –
:rtype:str
-
jade.basic.path.
get_directories_recursively
(inpath)[source]¶ Get a list of directories recursively in a path. Skips hidden directories. :param inpath: str :rtype: list
-
jade.basic.path.
get_file_paths
(pattern, dir, ext='.pdb')[source]¶ Get file paths matching the exact pattern and extension. :param pattern: :param dir: :param ext: :return:
-
jade.basic.path.
get_make_get_dirs
(root, dirs)[source]¶ Recursively make dirs and return the final path :param root: :param dirs: :rtype: str
-
jade.basic.path.
get_matching_pdbs
(directory, pattern, ext='.pdb')[source]¶ Get pdbs in a directory matching a pattern. :param directory: :param pattern: :param ext: :return:
-
jade.basic.path.
get_rosetta_features_root
()[source]¶ Get the path to Rosetta features directory through set ROSETTA3_DB env variable. :rtype: str
-
jade.basic.path.
get_rosetta_features_run_script
()[source]¶ Get the path to Rosetta features script dir through the set ROSETTA3_DB env variable. :rtype: str
-
jade.basic.path.
get_testing_inputs_path
()[source]¶ Get the path to testing inputs (PDBs,fasta,etc.) :rtype:str
-
jade.basic.path.
get_xml_scripts_path
()[source]¶ Get the path to the Rosetta xml script directory. Useful for variable substitutions. :rtype: str