ample.util.tm_util module

class ModelData(model_name, structure_name, model_fname, structure_fname, log_fname, tmscore, rmsd, nr_residues_common)[source]

Bases: object

Class to store model data

Attributes:
gdtha
gdtts
log_fname
maxsub
model_fname
model_name
nr_residues_common
rmsd
seq_id
structure_fname
structure_name
tmscore
gdtha
gdtts
log_fname
maxsub
model_fname
model_name
nr_residues_common
rmsd
seq_id
structure_fname
structure_name
tmscore
class TMalign(executable, wdir=None, **kwargs)[source]

Bases: ample.util.tm_util.TMapps

Wrapper to handle TMalign scoring for one or more structures

Examples

>>> models = ["<MODEL_1>", "<MODEL_2>", "<MODEL_3>"]
>>> references = ["<REFERENCE_1>", "<REFERENCE>", "<REFERENCE>"]
>>> tm = TMalign("<PATH_TO_EXE>")
>>> entries = tm.compare_structures(models, references)

Methods

binary_avail(binary) Check if TM binary is available
compare_structures(models, structures[, …]) Compare a list of model structures to a second list of reference structures
comparison(models, structures) Compare a list of model structures to a second list of reference structures
compare_structures(models, structures, all_vs_all=False)[source]

Compare a list of model structures to a second list of reference structures

Parameters:
models : list

List containing the paths to the model structure files

structures : list

List containing the paths to the reference structure files

all_vs_all : bool

Flag to compare all models against all structures

Returns:
entries : list
class TMapps(executable, method, wdir=None, **kwargs)[source]

Bases: object

Superclass of TMscore and TMalign

Attributes:
entries : list

List containing the TMscore entries on a per-model basis

structure : str

Path to the reference structure

method : str

One of [TMscore|TMalign]

executable : str

Path to the TMscore executable

work_dir : str

Path to the working directory

Methods

binary_avail(binary) Check if TM binary is available
comparison(models, structures) Compare a list of model structures to a second list of reference structures
static binary_avail(binary)[source]

Check if TM binary is available

Returns:
bool
Raises:
ValueError

The binary is not TMalign or TMscore

comparison(models, structures)[source]

Compare a list of model structures to a second list of reference structures

Parameters:
models : list

List containing the paths to the model structure files

structures : list

List containing the paths to the reference structure files

Returns:
entries : list

List of TMscore data entries on a per-model basis

class TMscore(executable, wdir=None, **kwargs)[source]

Bases: ample.util.tm_util.TMapps

Wrapper to handle TMscoring for one or more structures

Examples

>>> models = ["<MODEL_1>", "<MODEL_2>", "<MODEL_3>"]
>>> references = ["<REFERENCE_1>", "<REFERENCE>", "<REFERENCE>"]
>>> tm = TMscore("<PATH_TO_EXE>")
>>> entries = tm.compare_structures(models, references)

Methods

binary_avail(binary) Check if TM binary is available
compare_structures(models, structures[, …]) Compare a list of model structures to a second list of reference structures
comparison(models, structures) Compare a list of model structures to a second list of reference structures
compare_structures(models, structures, fastas=None, all_vs_all=False)[source]

Compare a list of model structures to a second list of reference structures

Parameters:
models : list

List containing the paths to the model structure files

structures : list

List containing the paths to the reference structure files

fastas : list

List containing the paths to the FASTA files

all_vs_all : bool

Flag to compare all models against all structures

Returns:
entries : list

List of TMscore data entries on a per-model basis

Notes

If a FASTA sequence is provided, a much more accurate comparison can be carried out. However, to by-pass this there is also an option to run the comparison without it. This might work just fine for larger models.

main()[source]