schrodinger.protein.predictors module

This module contains classes that wrap prime backends that predict sequence structures. Many of the parameters and class constants are from a time when documentation was sparse. In the future, it’s possible we’ll tweak these numbers as needed.

class schrodinger.protein.predictors.AbstractPredictor(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.tasks.tasks.SubprocessCmdTask

Base class for all predictors. Derived classes are expected to implement class constants for:

  • EXE - A string that should match to the predictors executable. Most of the time this is the same as PREDICTOR_NAME

  • PREDICTOR_NAME - A string with the name of the predictor. This is used to find the Prime data directory that holds the model parameters used by the predictor.

  • CLASS_NUM - A parameter specific to the predictor. Usually found by looking through the Prime predictors source code.

  • NU - Another model parameter.

  • NY - Another model parameter.

In addition, derived classes should implement the following methods:

generateInputFile - Should generate the required input file at

the file described by input_fname

prediction - Should read self.getLogAsString() and parse out the

actual prediction from the backend

makeCmd - This only needs to be implemented if the backend
takes a command different from the form:

executable model_fname input_fname

EXE = NotImplemented
PREDICTOR_NAME = NotImplemented
CLASS_NUM = NotImplemented
NU = NotImplemented
NY = NotImplemented
class Input(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

seq: schrodinger.protein.sequence.ProteinSequence

A parameter of the class.

aln: schrodinger.protein.alignment.ProteinAlignment

A parameter of the class.

alnChanged

A pyqtSignal emitted by instances of the class.

alnReplaced

A pyqtSignal emitted by instances of the class.

seqChanged

A pyqtSignal emitted by instances of the class.

seqReplaced

A pyqtSignal emitted by instances of the class.

input: parameters.CompoundParam

A parameter of the class.

input_fname: str

A parameter of the class.

model_fname: str

A parameter of the class.

generateInputFile()

Generate the input file for the predictor. Typically includes a header (see _getInputHeader), the file name of the blast alignment, and the sequence to predict properties for.

The input file should be written with the name self.input_fname.

prediction()

Return the actual prediction. This can take various forms depending on the predictor.

generateAlignmentFile()

Write the alignment file to be used as an input for the predictor. The file will be a temporary file and will be removed in postprocess.

Gaps in the alignment file are represented as ‘.’.

generateModelFile()

Generate the model definition file with the name self.model_fname. This is done by finding the Prime data directory for the predictor and getting the names of all the files in it.

The model file includes a header describing the number of model files and the predictors class number (self.CLASS_NUM), and a list of the model files.

makeCmd()

Return the command to run the predictor backend. The default implementation returns the predictor executable, the model file name, and the input file name.

Return type

list[str]

postprocess()
calling_contextChanged

A pyqtSignal emitted by instances of the class.

calling_contextReplaced

A pyqtSignal emitted by instances of the class.

failure_infoChanged

A pyqtSignal emitted by instances of the class.

failure_infoReplaced

A pyqtSignal emitted by instances of the class.

inputChanged

A pyqtSignal emitted by instances of the class.

inputReplaced

A pyqtSignal emitted by instances of the class.

input_fnameChanged

A pyqtSignal emitted by instances of the class.

input_fnameReplaced

A pyqtSignal emitted by instances of the class.

max_progressChanged

A pyqtSignal emitted by instances of the class.

max_progressReplaced

A pyqtSignal emitted by instances of the class.

model_fnameChanged

A pyqtSignal emitted by instances of the class.

model_fnameReplaced

A pyqtSignal emitted by instances of the class.

nameChanged

A pyqtSignal emitted by instances of the class.

nameReplaced

A pyqtSignal emitted by instances of the class.

outputChanged

A pyqtSignal emitted by instances of the class.

outputReplaced

A pyqtSignal emitted by instances of the class.

progressChanged

A pyqtSignal emitted by instances of the class.

progressReplaced

A pyqtSignal emitted by instances of the class.

progress_stringChanged

A pyqtSignal emitted by instances of the class.

progress_stringReplaced

A pyqtSignal emitted by instances of the class.

statusChanged

A pyqtSignal emitted by instances of the class.

statusReplaced

A pyqtSignal emitted by instances of the class.

class schrodinger.protein.predictors.SsproPredictor(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.protein.predictors.AbstractPredictor

Secondary structure predictor.

EXE = 'sspro4'
PREDICTOR_NAME = 'sspro'
CLASS_NUM = 3
NU = 20
NY = 3
input_fname: str

A parameter of the class.

model_fname: str

A parameter of the class.

generateInputFile()

Generate the input file for the predictor. Typically includes a header (see _getInputHeader), the file name of the blast alignment, and the sequence to predict properties for.

The input file should be written with the name self.input_fname.

makeCmd()

Usage: $PSP_PATH/sspro4 model_definition dataset_file alignment_directory dataset_format

rawPrediction()
Returns

The raw prediction string containing one character per residue in the input sequence.

Return type

str

prediction()
Returns

A list of ssa types from structure, one for each element in self.input.sequence

Return type

list

calling_contextChanged

A pyqtSignal emitted by instances of the class.

calling_contextReplaced

A pyqtSignal emitted by instances of the class.

failure_infoChanged

A pyqtSignal emitted by instances of the class.

failure_infoReplaced

A pyqtSignal emitted by instances of the class.

input: parameters.CompoundParam

A parameter of the class.

inputChanged

A pyqtSignal emitted by instances of the class.

inputReplaced

A pyqtSignal emitted by instances of the class.

input_fnameChanged

A pyqtSignal emitted by instances of the class.

input_fnameReplaced

A pyqtSignal emitted by instances of the class.

max_progressChanged

A pyqtSignal emitted by instances of the class.

max_progressReplaced

A pyqtSignal emitted by instances of the class.

model_fnameChanged

A pyqtSignal emitted by instances of the class.

model_fnameReplaced

A pyqtSignal emitted by instances of the class.

nameChanged

A pyqtSignal emitted by instances of the class.

nameReplaced

A pyqtSignal emitted by instances of the class.

outputChanged

A pyqtSignal emitted by instances of the class.

outputReplaced

A pyqtSignal emitted by instances of the class.

progressChanged

A pyqtSignal emitted by instances of the class.

progressReplaced

A pyqtSignal emitted by instances of the class.

progress_stringChanged

A pyqtSignal emitted by instances of the class.

progress_stringReplaced

A pyqtSignal emitted by instances of the class.

statusChanged

A pyqtSignal emitted by instances of the class.

statusReplaced

A pyqtSignal emitted by instances of the class.

class schrodinger.protein.predictors.SolventAccessibility

Bases: schrodinger.models.jsonable.JsonableEnum

BURIED = 1
EXPOSED = 2
class schrodinger.protein.predictors.AccproPredictor(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.protein.predictors.AbstractPredictor

Solvent accessibility predictor.

EXE = 'accpro'
PREDICTOR_NAME = 'accpro'
CLASS_NUM = 20
NU = 20
NY = 3
input_fname: str

A parameter of the class.

model_fname: str

A parameter of the class.

CHAR_TO_ACC_MAP = {'b': SolventAccessibility.BURIED, 'e': SolventAccessibility.EXPOSED}
generateInputFile()

Generate the input file for the predictor. Typically includes a header (see _getInputHeader), the file name of the blast alignment, and the sequence to predict properties for.

The input file should be written with the name self.input_fname.

makeCmd()

Usage: $PSP_PATH/accpro model_definition dataset_file alignment_directory dataset_format threshold_index

rawPrediction()
Example:

eeebbbebebebebbebbebebeebbbbbbbeeeee

e = exposed b = buried

prediction()

Return the actual prediction. This can take various forms depending on the predictor.

calling_contextChanged

A pyqtSignal emitted by instances of the class.

calling_contextReplaced

A pyqtSignal emitted by instances of the class.

failure_infoChanged

A pyqtSignal emitted by instances of the class.

failure_infoReplaced

A pyqtSignal emitted by instances of the class.

input: parameters.CompoundParam

A parameter of the class.

inputChanged

A pyqtSignal emitted by instances of the class.

inputReplaced

A pyqtSignal emitted by instances of the class.

input_fnameChanged

A pyqtSignal emitted by instances of the class.

input_fnameReplaced

A pyqtSignal emitted by instances of the class.

max_progressChanged

A pyqtSignal emitted by instances of the class.

max_progressReplaced

A pyqtSignal emitted by instances of the class.

model_fnameChanged

A pyqtSignal emitted by instances of the class.

model_fnameReplaced

A pyqtSignal emitted by instances of the class.

nameChanged

A pyqtSignal emitted by instances of the class.

nameReplaced

A pyqtSignal emitted by instances of the class.

outputChanged

A pyqtSignal emitted by instances of the class.

outputReplaced

A pyqtSignal emitted by instances of the class.

progressChanged

A pyqtSignal emitted by instances of the class.

progressReplaced

A pyqtSignal emitted by instances of the class.

progress_stringChanged

A pyqtSignal emitted by instances of the class.

progress_stringReplaced

A pyqtSignal emitted by instances of the class.

statusChanged

A pyqtSignal emitted by instances of the class.

statusReplaced

A pyqtSignal emitted by instances of the class.

schrodinger.protein.predictors.encode_acc(acc)
class schrodinger.protein.predictors.Disordered

Bases: schrodinger.models.jsonable.JsonableEnum

HIGHSCORE = 1
MEDIUMSCORE = 2
LOWSCORE = 3
class schrodinger.protein.predictors.SsAccDependentPredictors(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.protein.predictors.AbstractPredictor

Base class for predictors that use secondary structure and solvent accessibility predictions as inputs.

class Input(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

seq: schrodinger.protein.sequence.ProteinSequence

A parameter of the class.

aln: schrodinger.protein.alignment.ProteinAlignment

A parameter of the class.

ss_prediction: str

A parameter of the class.

acc_prediction: str

A parameter of the class.

acc_predictionChanged

A pyqtSignal emitted by instances of the class.

acc_predictionReplaced

A pyqtSignal emitted by instances of the class.

alnChanged

A pyqtSignal emitted by instances of the class.

alnReplaced

A pyqtSignal emitted by instances of the class.

seqChanged

A pyqtSignal emitted by instances of the class.

seqReplaced

A pyqtSignal emitted by instances of the class.

ss_predictionChanged

A pyqtSignal emitted by instances of the class.

ss_predictionReplaced

A pyqtSignal emitted by instances of the class.

input: parameters.CompoundParam

A parameter of the class.

calling_contextChanged

A pyqtSignal emitted by instances of the class.

calling_contextReplaced

A pyqtSignal emitted by instances of the class.

failure_infoChanged

A pyqtSignal emitted by instances of the class.

failure_infoReplaced

A pyqtSignal emitted by instances of the class.

inputChanged

A pyqtSignal emitted by instances of the class.

inputReplaced

A pyqtSignal emitted by instances of the class.

input_fnameChanged

A pyqtSignal emitted by instances of the class.

input_fnameReplaced

A pyqtSignal emitted by instances of the class.

max_progressChanged

A pyqtSignal emitted by instances of the class.

max_progressReplaced

A pyqtSignal emitted by instances of the class.

model_fnameChanged

A pyqtSignal emitted by instances of the class.

model_fnameReplaced

A pyqtSignal emitted by instances of the class.

nameChanged

A pyqtSignal emitted by instances of the class.

nameReplaced

A pyqtSignal emitted by instances of the class.

outputChanged

A pyqtSignal emitted by instances of the class.

outputReplaced

A pyqtSignal emitted by instances of the class.

progressChanged

A pyqtSignal emitted by instances of the class.

progressReplaced

A pyqtSignal emitted by instances of the class.

progress_stringChanged

A pyqtSignal emitted by instances of the class.

progress_stringReplaced

A pyqtSignal emitted by instances of the class.

statusChanged

A pyqtSignal emitted by instances of the class.

statusReplaced

A pyqtSignal emitted by instances of the class.

class schrodinger.protein.predictors.DisproPredictor(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.protein.predictors.SsAccDependentPredictors

Disordered regions predictor.

EXE = 'dispro'
PREDICTOR_NAME = 'dispro'
CLASS_NUM = 2
NU = 25
NY = 2
input_fname: str

A parameter of the class.

model_fname: str

A parameter of the class.

makeCmd()

Return the command to run the predictor backend. The default implementation returns the predictor executable, the model file name, and the input file name.

Return type

list[str]

generateInputFile()

Generate the input file for the predictor. Typically includes a header (see _getInputHeader), the file name of the blast alignment, and the sequence to predict properties for.

The input file should be written with the name self.input_fname.

rawPrediction()
prediction()

Return the actual prediction. This can take various forms depending on the predictor.

calling_contextChanged

A pyqtSignal emitted by instances of the class.

calling_contextReplaced

A pyqtSignal emitted by instances of the class.

failure_infoChanged

A pyqtSignal emitted by instances of the class.

failure_infoReplaced

A pyqtSignal emitted by instances of the class.

input: parameters.CompoundParam

A parameter of the class.

inputChanged

A pyqtSignal emitted by instances of the class.

inputReplaced

A pyqtSignal emitted by instances of the class.

input_fnameChanged

A pyqtSignal emitted by instances of the class.

input_fnameReplaced

A pyqtSignal emitted by instances of the class.

max_progressChanged

A pyqtSignal emitted by instances of the class.

max_progressReplaced

A pyqtSignal emitted by instances of the class.

model_fnameChanged

A pyqtSignal emitted by instances of the class.

model_fnameReplaced

A pyqtSignal emitted by instances of the class.

nameChanged

A pyqtSignal emitted by instances of the class.

nameReplaced

A pyqtSignal emitted by instances of the class.

outputChanged

A pyqtSignal emitted by instances of the class.

outputReplaced

A pyqtSignal emitted by instances of the class.

progressChanged

A pyqtSignal emitted by instances of the class.

progressReplaced

A pyqtSignal emitted by instances of the class.

progress_stringChanged

A pyqtSignal emitted by instances of the class.

progress_stringReplaced

A pyqtSignal emitted by instances of the class.

statusChanged

A pyqtSignal emitted by instances of the class.

statusReplaced

A pyqtSignal emitted by instances of the class.

class schrodinger.protein.predictors.DomainArrangement

Bases: schrodinger.models.jsonable.JsonableEnum

Interdomain = 1
DomainForming = 2
class schrodinger.protein.predictors.DomproPredictor(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.protein.predictors.SsAccDependentPredictors

Domain arrangement predictor.

EXE = 'dompro'
PREDICTOR_NAME = 'dompro'
CLASS_NUM = 2
NU = 25
NY = 3
input_fname: str

A parameter of the class.

model_fname: str

A parameter of the class.

makeCmd()

Return the command to run the predictor backend. The default implementation returns the predictor executable, the model file name, and the input file name.

Return type

list[str]

generateInputFile()

Generate the input file for the predictor. Typically includes a header (see _getInputHeader), the file name of the blast alignment, and the sequence to predict properties for.

The input file should be written with the name self.input_fname.

rawPrediction()
prediction()

Return the actual prediction. This can take various forms depending on the predictor.

calling_contextChanged

A pyqtSignal emitted by instances of the class.

calling_contextReplaced

A pyqtSignal emitted by instances of the class.

failure_infoChanged

A pyqtSignal emitted by instances of the class.

failure_infoReplaced

A pyqtSignal emitted by instances of the class.

input: parameters.CompoundParam

A parameter of the class.

inputChanged

A pyqtSignal emitted by instances of the class.

inputReplaced

A pyqtSignal emitted by instances of the class.

input_fnameChanged

A pyqtSignal emitted by instances of the class.

input_fnameReplaced

A pyqtSignal emitted by instances of the class.

max_progressChanged

A pyqtSignal emitted by instances of the class.

max_progressReplaced

A pyqtSignal emitted by instances of the class.

model_fnameChanged

A pyqtSignal emitted by instances of the class.

model_fnameReplaced

A pyqtSignal emitted by instances of the class.

nameChanged

A pyqtSignal emitted by instances of the class.

nameReplaced

A pyqtSignal emitted by instances of the class.

outputChanged

A pyqtSignal emitted by instances of the class.

outputReplaced

A pyqtSignal emitted by instances of the class.

progressChanged

A pyqtSignal emitted by instances of the class.

progressReplaced

A pyqtSignal emitted by instances of the class.

progress_stringChanged

A pyqtSignal emitted by instances of the class.

progress_stringReplaced

A pyqtSignal emitted by instances of the class.

statusChanged

A pyqtSignal emitted by instances of the class.

statusReplaced

A pyqtSignal emitted by instances of the class.

class schrodinger.protein.predictors.DiproPredictor(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.protein.predictors.SsAccDependentPredictors

Disulfide bonds predictor.

EXE = 'dipro'
PREDICTOR_NAME = 'dipro'
CLASS_NUM = 0.5
input_fname: str

A parameter of the class.

model_fname: str

A parameter of the class.

class DiproFormat

Bases: enum.IntEnum

For use with command line invocation.

Alessandro = 1
NewDipro = 2
makeCmd()

Usage: $PSP_PATH/dipro model_file sequence_file alignment_file format

generateInputFile()

Generate the input file for the predictor. Typically includes a header (see _getInputHeader), the file name of the blast alignment, and the sequence to predict properties for.

The input file should be written with the name self.input_fname.

prediction()
Returns

A list of disulfide bonds represented by 2-tuples with two residue indexes

Return type

list[tuple[int]]

calling_contextChanged

A pyqtSignal emitted by instances of the class.

calling_contextReplaced

A pyqtSignal emitted by instances of the class.

failure_infoChanged

A pyqtSignal emitted by instances of the class.

failure_infoReplaced

A pyqtSignal emitted by instances of the class.

input: parameters.CompoundParam

A parameter of the class.

inputChanged

A pyqtSignal emitted by instances of the class.

inputReplaced

A pyqtSignal emitted by instances of the class.

input_fnameChanged

A pyqtSignal emitted by instances of the class.

input_fnameReplaced

A pyqtSignal emitted by instances of the class.

max_progressChanged

A pyqtSignal emitted by instances of the class.

max_progressReplaced

A pyqtSignal emitted by instances of the class.

model_fnameChanged

A pyqtSignal emitted by instances of the class.

model_fnameReplaced

A pyqtSignal emitted by instances of the class.

nameChanged

A pyqtSignal emitted by instances of the class.

nameReplaced

A pyqtSignal emitted by instances of the class.

outputChanged

A pyqtSignal emitted by instances of the class.

outputReplaced

A pyqtSignal emitted by instances of the class.

progressChanged

A pyqtSignal emitted by instances of the class.

progressReplaced

A pyqtSignal emitted by instances of the class.

progress_stringChanged

A pyqtSignal emitted by instances of the class.

progress_stringReplaced

A pyqtSignal emitted by instances of the class.

statusChanged

A pyqtSignal emitted by instances of the class.

statusReplaced

A pyqtSignal emitted by instances of the class.

class schrodinger.protein.predictors.BetaproPredictor(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.protein.predictors.AbstractPredictor

Beta strand contacts predictor

EXE = 'betapro'
PREDICTOR_NAME = 'betapro'
CLASS_NUM = ''
NU = 20
NY = 3
input_fname: str

A parameter of the class.

model_fname: str

A parameter of the class.

class Input(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.models.parameters.CompoundParam

seq: schrodinger.protein.sequence.ProteinSequence

A parameter of the class.

aln: schrodinger.protein.alignment.ProteinAlignment

A parameter of the class.

ss_prediction: str

A parameter of the class.

alnChanged

A pyqtSignal emitted by instances of the class.

alnReplaced

A pyqtSignal emitted by instances of the class.

seqChanged

A pyqtSignal emitted by instances of the class.

seqReplaced

A pyqtSignal emitted by instances of the class.

ss_predictionChanged

A pyqtSignal emitted by instances of the class.

ss_predictionReplaced

A pyqtSignal emitted by instances of the class.

input: parameters.CompoundParam

A parameter of the class.

generateInputFile()

Generate the input file for the predictor. Typically includes a header (see _getInputHeader), the file name of the blast alignment, and the sequence to predict properties for.

The input file should be written with the name self.input_fname.

makeCmd()

Usage: $PSP_PATH/betapro model_file, protein_file, alignment_file

prediction()

Return the actual prediction. This can take various forms depending on the predictor.

calling_contextChanged

A pyqtSignal emitted by instances of the class.

calling_contextReplaced

A pyqtSignal emitted by instances of the class.

failure_infoChanged

A pyqtSignal emitted by instances of the class.

failure_infoReplaced

A pyqtSignal emitted by instances of the class.

inputChanged

A pyqtSignal emitted by instances of the class.

inputReplaced

A pyqtSignal emitted by instances of the class.

input_fnameChanged

A pyqtSignal emitted by instances of the class.

input_fnameReplaced

A pyqtSignal emitted by instances of the class.

max_progressChanged

A pyqtSignal emitted by instances of the class.

max_progressReplaced

A pyqtSignal emitted by instances of the class.

model_fnameChanged

A pyqtSignal emitted by instances of the class.

model_fnameReplaced

A pyqtSignal emitted by instances of the class.

nameChanged

A pyqtSignal emitted by instances of the class.

nameReplaced

A pyqtSignal emitted by instances of the class.

outputChanged

A pyqtSignal emitted by instances of the class.

outputReplaced

A pyqtSignal emitted by instances of the class.

progressChanged

A pyqtSignal emitted by instances of the class.

progressReplaced

A pyqtSignal emitted by instances of the class.

progress_stringChanged

A pyqtSignal emitted by instances of the class.

progress_stringReplaced

A pyqtSignal emitted by instances of the class.

statusChanged

A pyqtSignal emitted by instances of the class.

statusReplaced

A pyqtSignal emitted by instances of the class.

class schrodinger.protein.predictors.PredictorWrapperTask(*args, _param_type=<object object>, **kwargs)

Bases: schrodinger.tasks.tasks.BlockingFunctionTask

Task to run a specific predictor.

__init__(anno=None, seq=None, blast_aln=None)
validateInput()
mainFunction()
calling_contextChanged

A pyqtSignal emitted by instances of the class.

calling_contextReplaced

A pyqtSignal emitted by instances of the class.

failure_infoChanged

A pyqtSignal emitted by instances of the class.

failure_infoReplaced

A pyqtSignal emitted by instances of the class.

inputChanged

A pyqtSignal emitted by instances of the class.

inputReplaced

A pyqtSignal emitted by instances of the class.

max_progressChanged

A pyqtSignal emitted by instances of the class.

max_progressReplaced

A pyqtSignal emitted by instances of the class.

nameChanged

A pyqtSignal emitted by instances of the class.

nameReplaced

A pyqtSignal emitted by instances of the class.

outputChanged

A pyqtSignal emitted by instances of the class.

outputReplaced

A pyqtSignal emitted by instances of the class.

progressChanged

A pyqtSignal emitted by instances of the class.

progressReplaced

A pyqtSignal emitted by instances of the class.

progress_stringChanged

A pyqtSignal emitted by instances of the class.

progress_stringReplaced

A pyqtSignal emitted by instances of the class.

statusChanged

A pyqtSignal emitted by instances of the class.

statusReplaced

A pyqtSignal emitted by instances of the class.

schrodinger.protein.predictors.predict_secondary_structure(seq, aln, mutate_in_place=True)
schrodinger.protein.predictors.predict_solvent_accessibility(seq, aln, mutate_in_place=True)
schrodinger.protein.predictors.predict_disordered_regions(seq, aln, mutate_in_place=True)
schrodinger.protein.predictors.predict_domain_arrangement(seq, aln, mutate_in_place=True)
schrodinger.protein.predictors.predict_disulfide_bond(seq, aln, mutate_in_place=True)
schrodinger.protein.predictors.encode_ssa(ssa)