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.get_today()[source]
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.general.strip_left(s, pattern)[source]

Strips a string left (start) of string if found. Otherwise, returns the original string.

Parameters:
  • s – str
  • pattern – str
Return type:

str

jade.basic.general.strip_right(s, pattern)[source]

Strips a string right (end) of string if found. Otherwise, returns the original string.

Parameters:
  • s – str
  • pattern – str
Return type:

str