biotite.application.dssp.DsspApp

class biotite.application.dssp.DsspApp(atom_array, bin_path='mkdssp')[source]

Bases: biotite.application.localapp.LocalApp

Annotate the secondary structure of a protein structure using the DSSP software.

Internally this creates a Popen instance, which handles the execution.

DSSP differentiates between 8 different types of secondary structure elements:

  • C: loop, coil or irregular
  • H: \({\alpha}\)-helix
  • B: \({\beta}\)-bridge
  • E: extended strand, participation in \({\beta}\)-ladder
  • G: 3 10-helix
  • I: \({\pi}\)-helix
  • T: hydrogen bonded turn
  • S: bend
Parameters:
atom_array : AtomArray

The atom array to be annotated.

bin_path : str, optional

Path of the DDSP binary.

run()[source]

Commence the application run. Called in start().

PROTECTED: Override when inheriting.

evaluate()[source]

Evaluate application results. Called in join().

PROTECTED: Override when inheriting.

get_sse()[source]

Get the resulting secondary structure assignment.

Returns:
sse : ndarray, dtype=”U1”

An array containing DSSP secondary structure symbols corresponding to the residues in the input atom array.

static annotate_sse(atom_array, bin_path='mkdssp')[source]

Perform a secondary structure assignment to an atom array.

This is a convenience function, that wraps the DsspApp execution.

Parameters:
atom_array : AtomArray

The atom array to be annotated.

bin_path : str, optional

Path of the DDSP binary.

Returns:
sse : ndarray, dtype=”U1”

An array containing DSSP secondary structure symbols corresponding to the residues in the input atom array.

cancel()

Cancel the application when in RUNNING or FINISHED state.

clean_up()

Do clean up work after the application terminates.

PROTECTED: Optionally override when inheriting.

get_app_state()

Get the current app state.

Returns:
app_state : AppState

The current app state.

get_exit_code()

Get the exit code of the process.

PROTECTED: Do not call from outside.

Returns:
code : int

The exit code.

get_process()

Get the Popen instance.

PROTECTED: Do not call from outside.

Returns:
process : Popen

The Popen instance

get_stderr()
get_stdout()
is_finished()

Check if the application has finished.

PROTECTED: Override when inheriting.

Returns:
finished : bool

True of the application has finished, false otherwise

join(timeout=None)

Conclude the application run and set its state to JOINED. This can only be done from the RUNNING or FINISHED state.

If the application is FINISHED the joining process happens immediately, if otherwise the application is RUNNING, this method waits until the application is FINISHED.

Parameters:
timeout : float, optional

If this parameter is specified, the Application only waits for finishing until this value (in seconds) runs out. After this time is exceeded a TimeoutError is raised and the application is cancelled.

Raises:
TimeoutError

If the joining process exceeds the timeout value.

set_exec_dir(exec_dir)

Set the directory where the application should be executed. If not set, it will be executed in the working directory at the time the application was created.

PROTECTED: Do not call from outside.

Parameters:
exec_dir : str

The execution directory.

set_options(options)

Set command line options for the application run.

PROTECTED: Do not call from outside.

Parameters:
options : list

A list of strings representing the command line options.

start()

Start the application run and set its state to RUNNING. This can only be done from the CREATED state.

wait_interval()

The time interval of is_finished() calls in the joining process.

PROTECTED: Override when inheriting.

Returns:
interval : float

Time (in seconds) between calls of is_finished() in join()