Utility Functions¶
Structure¶
-
build_pdb_object(log, sses, loops, concat=True, outfile=None)¶ Make the parametrically build atoms in a
Caseinto a PDB file.Parameters: - log (
Logger) – Job logger. - sses (
List[Dict[~KT, ~VT]]) – List of the secondary structures to build. Each SSE dictionary must contain themetadata.atomskeys, already in the final expected position. - loops (
Union[List[int],int]) – Number of residues between SSE. It can be one less than the number of structures, which assumes no N- or C-terminal, or one more, which assumes N- and C-terminal residues. - concat (
Optional[bool]) – WhenTrue, return the full stucture as a single object, otherwise return a list of the individual parts. - outfile (
Union[str,Path,None]) – If provided, write the structure to file.
Return type: Tuple[Frame3D,List[int]]- log (
-
get_loop_length(log, sse1, sse2, loop_step, loop_range)¶ Calculate the expected number of residues to join two SSE.
Parameters: Return type:
Plot¶
-
plot_fragment_templates(log, dfsmall, dflarge, prefix, write=True)¶ Plots the fragment sources across the sequence.
Parameters: Return type: Tuple[Figure,Path]
-
plot_loop_length_distribution(log, dfloop, pick, prefix, title, write=True)¶ Plots the loop length count distribution for a jump.
Parameters: Return type: Tuple[Figure,Path]
-
plot_match_bin(log, master_match, prefix, expected, groupby=None, write=True)¶ Plots the number of matches per defined bin of the MASTER search.
Parameters: - log (
Logger) – Job Logger. - master_match (
DataFrame) – Collected MASTER matches. - prefix (
Union[Path,str]) – Prefix for plot name. - expected (
Union[int,float]) – Limitation of y-axis height. - groupby (
Optional[List[~T]]) – Groups to order by (e.g. close, mid, far, extreme). - write (
bool) – Shall the plot by saved (default: True).
Return type: Tuple[Figure,Path]- log (
-
plot_geometric_distributions(log, df, prefix, write=True)¶ Plots the per SSE geometrical distributions from the MASTER search.
Parameters: Return type: Tuple[Figure,Path]
-
plot_angle_network(log, network, node_positions, sse_list, prefix, write=True)¶ Plots the per SSE geometrical distributions from the MASTER search.
Parameters: - log (
Logger) – Job Logger. - network (
DiGraph) – Network Graph to use for angle network. - node_positions (
Dict[~KT, ~VT]) – Positions of the nodes (SSEs). - sse_list (
List[str]) – The SSEs to be considered. - prefix (
Union[Path,str]) – Prefix for plot name. - write (
bool) – Shall the plot by saved (default: True).
Return type: Tuple[Figure,Path]- log (
MASTER¶
-
pds_database(log, filter=None)¶ Provide the list of target PDS as a file and a list.
Note
Depends on the
master.pdsconfiguration option.Parameters: - log (
Logger) – Job logger. - filter (
Union[str,Path,None]) – File containting the target subset, otherwise all PDS database is considered.
Return type: Tuple[Path,List[~T]]- log (
-
createPDS(infile, outfile=None)¶ Make the createPDS command call.
Note
Depends on the
master.createconfiguration option.Parameters: Return type: List[str]
-
master_best_each(log, infile, outdir, rmsd=5.0)¶ Create one MASTER call for each PDS file with the –topN 1 flag.
Note
Depends on the
master.masterconfiguration option Depends on themaster.pdsconfiguration optionReturn type: List[List[str]]
-
master_fixedgap(query, pds_list, master_out, mdis, Mdis, rmsd_cut)¶ Create the MASTER executable for a fixed residue distance between matches.
Parameters: Return type: List[List[str]]
-
master_groupedgap(query, pds_list, master_out, gaps, rmsd_cut)¶ Create the MASTER executable for a fixed residue distance between matches.
Parameters: Return type: List[List[str]]
-
master_nogap(query, pds_list, master_out, rmsd_cut)¶ Create the MASTER executable for a fixed residue distance between matches.
Parameters: - query (
Path) – Query PDS file. - pds_list (
Path) – File with the database list of PDS targets. - master_out (
Path) – Output file with the MASTER results. - mdis – Minimum distance.
- Mdis – Maximum distance.
- rmsd_cut (
float) – RMSD search cutoff.
Return type: List[List[str]]- query (
Plugins¶
-
plugin_title(plugin_path, cases)¶ Print on-screen the plugin’s name.
Parameters:
-
plugin_case_count(cases, io='o')¶ Print on-screen the current number of cases.
Parameters:
-
plugin_warning(text)¶ Format a warning and manage follow up behaviour.
Parameters: text (str) – Warning text.
-
plugin_filemaker(text)¶ Highlight the creation of new files.
Parameters: text (str) – File creation text.
-
plugin_imagemaker(text)¶ Highlight the creation of new plot files.
Parameters: text (str) – File creation text.
Rosetta¶
-
constraint_design(case, natbias, layer_design=True, motif=None, binder=None, hotspots=None, profile=False)¶ Creates the design script upon a
Casewith constraints.Parameters: - case (
Case) – The case to use for constraints. - motif (
Optional[List[~T]]) – The motif to be inserted and kept fixed. - binder (
Optional[List[~T]]) – The context structure to be added during design. - hotspots (
Optional[List[~T]]) – Motif hotspot residue to keep completely fixed. - profile (
Optional[bool]) – Sequence profile from fragments to guide design (default: False). - natbias (
float) – The bias weight to favour correct SSE formation.
Return type: ScriptPieces- case (
-
funfoldes(case, motif=None, binder=None, hotspots=None)¶ The general FunFoldDesMover script where input pose is the template, where the motif will be grafted into. Thus, if a binder is present, one needs to remove that one before running the NubInitioMover. The binder will be parsed together with the motif. Note, that after the NubInitioMover, the binder will be in the pose. We remove the binder as it is easier to work with files containing only the design afterwards.
Parameters: - case (
Case) – The case to use for constraints. - motif (
Optional[List[~T]]) – The motif to be inserted and kept fixed. - binder (
Optional[List[~T]]) – The context structure to be added during design. - hotspots (
Optional[List[~T]]) – Motif hotspot residue to keep completely fixed.
Return type: - case (
-
hybridize(case, template, natbias)¶ Creates the hybridize script upon a
Casewith constraints.Caution
Please be careful with the energy function setup.
To Developers
This implementation has not been fully tested and optimized.
Parameters: Return type: