biotite.application#

A subpackage that provides interfaces for external software in case Biotite’s integrated functionality is not sufficient for your tasks. These interfaces range from locally installed software (e.g. MSA software) to web services (e.g. BLAST). The interfaces are seamless: Writing input files and reading output files is handled internally. The user only needs to provide objects like a Sequence and will receive objects like an Alignment.

Note that in order to use an interface in biotite.application the corresponding software must be installed or the web server must be reachable, respectively. These programs are not shipped with the Biotite package.

Each application is represented by its respective Application class. Each Application instance has a life cycle, starting with its creation and ending with the result extraction. Each state in this life cycle is described by the value of the enum AppState, that each Application contains: Directly after its instantiation the app is in the CREATED state. In this state further parameters can be set for the application run. After the user calls the Application.start() method, the app state is set to RUNNING and the app performs the calculations. When the application finishes the AppState changes to FINISHED. The user can now call the Application.join() method, concluding the application in the JOINED state and making the results of the application accessible. Furthermore, this may trigger cleanup actions in some applications. Application.join() can even be called in the RUNNING state: This will constantly check if the application has finished and will directly go into the JOINED state as soon as the application reaches the FINISHED state. Calling the Application.cancel() method while the application is RUNNING or FINISHED leaves the application in the CANCELLED state. This triggers cleanup, too, but there are no accessible results. If a method is called in an unsuitable app state, an AppStateError is called. At each state in the life cycle, Application type specific methods are called, as shown in the following diagram.

Application life cycle

Taken from Kunzmann & Hamacher 2018 licensed under CC BY 4.0.#

The execution of an Application can run in parallel: The time between starting the run and collecting the results can be used to run other code, similar to the Python Thread or Process classes.

Application classes#

Application

This class is a wrapper around an external piece of runnable software in any sense.

WebApp

The base class for all web based applications.

LocalApp

The base class for all locally installed applications, that are used via the command line.

MSAApp

This is an abstract base class for multiple sequence alignment software.

Miscellaneous#

AppState

This enum type represents the app states of an application.

AppStateError

Indicate that the application lifecycle was violated.

RuleViolationError

Indicates that the user guidelines of the web application would be violated, if the program continued.

TimeoutError

Indicate that the application's timeout expired.

VersionError

Indicate that the application's version is invalid.

requires_state

A decorator for methods of Application subclasses that raises an AppStateError in case the method is called, when the Application is not in the specified AppState app_state.

Subpackages#

biotite.application.mafft

A subpackage for multiple sequence alignments using MAFFT.

biotite.application.autodock

A subpackage for static ligand docking with Autodock.

biotite.application.clustalo

A subpackage for multiple sequence alignments using Clustal-Omega.

biotite.application.blast

A subpackage for heuristic local alignments against a large database using BLAST.

biotite.application.muscle

A subpackage for multiple sequence alignments using MUSCLE.

biotite.application.tantan

A subpackage for masking sequence regions using the tantan software.

biotite.application.sra

A subpackage for obtaining sequencing data from the NCBI sequence read archive (SRA).

biotite.application.viennarna

A subpackage that provides interfaces to the ViennaRNA software package.

biotite.application.dssp

A subpackage for protein secondary structure annotation using DSSP.