Skip to article frontmatterSkip to article content

Prediction

Overview

You need to decompress the example_data.zip file in your preferred folder, e.g., deeptminter/.

Deep learning for interaction site prediction

Python

We define several parameters required for running .

params = {
    'prot_name': '3jcu',
    'prot_chain': 'H',
    'fasta_fp': '../../data/deeptminter/example_data/',
    'msa_fp': '../../data/deeptminter/example_data/',
    'phobius_fp': '../../data/deeptminter/example_data/',
    'mi_fp': '../../data/deeptminter/example_data/',
    'fc_fp': '../../data/deeptminter/example_data/',
    'gdca_fp': '../../data/deeptminter/example_data/',
    'sv_fp_feature': '../../data/deeptminter/example_data/',
    'sv_suffix_feature': '.f',

    'model_frozen_fpn': '../../data/deeptminter/model/tf2/frozen_graph/m1.pb',
    'batch_size': 100,
    'sv_fp_pred': '../../data/deeptminter/',
    'sv_suffix_pred': '.m1',
}
Code
Output
import deeptminter

deeptminter.predict.isite(
    prot_name=params['prot_name'],
    prot_chain=params['prot_chain'],
    fasta_fp=params['fasta_fp'],
    msa_fp=params['msa_fp'],
    phobius_fp=params['phobius_fp'],
    mi_fp=params['mi_fp'],
    fc_fp=params['fc_fp'],
    gdca_fp=params['gdca_fp'],
    sv_fp_feature=params['sv_fp_feature'],
    sv_suffix_feature=params['sv_suffix_feature'],
    model_frozen_fpn=params['model_frozen_fpn'],
    sv_fp_pred=params['sv_fp_pred'],
    sv_suffix_pred=params['sv_suffix_pred'],
    batch_size=100,
    verbose=True,
)

CLI

DeepTMInter can also be used in shell. To know how to use, please type

deeptminter -h

It shows the usage of different parameters.

-pn, --prot_name, Name of the protein to be processed.
-pc, --prot_chain, Chain ID of the protein (e.g., A, B, etc.).
-fa, --fasta_fp, File path to the input FASTA sequence.
-msafp, --msa_fp, File path to the multiple sequence alignment (MSA).
-phobfp, --phobius_fp, File path to the Phobius output file.
-mifp, --mi_fp, File path to the mutual information (MI) data.
-fcfp, --fc_fp, File path to the FreeContact (FC) data.
-gdcafp, --gdca_fp, File path to the direct coupling analysis (DCA) output.
-m, --model_frozen_fpn, Path to the frozen model (.pb) file for prediction.
-sv_fp_f, --sv_fp_feature, Path to the feature vector for interaction site prediction.
-sv_suf_f, --sv_suffix_feature, Suffix for feature files used in interaction site input.
-sv_fp_p, --sv_fp_pred, Output file path for predicted results.
-sv_suf_p, --sv_suffix_pred, Suffix for predicted output files.
-bs, --batch_size, Batch size used during prediction (default: 100).
-vb, --verbose, Whether to print detailed logs during processing (default: True).

You can run it using the following code.

Command
Output
deeptminter -pn 3jcu -pc H -fa ./data/deeptminter/example_data/ -msafp ./data/deeptminter/example_data/ -phobfp ./data/deeptminter/example_data/ -mifp ./data/deeptminter/example_data/ -fcfp ./data/deeptminter/example_data/ -gdcafp ./data/deeptminter/example_data/ -m ./data/deeptminter/model/tf2/frozen_graph/m1.pb -sv_fp_f ./data/deeptminter/example_data/ -sv_suf_f .f -sv_fp_p ./data/deeptminter/ -sv_suf_p .m1 -bs 100

Assembled prediction

If you’d like to explore if better predictions can be gained from assembled methods, you can generate models by choosing to run the running code.

Python

First, we define parameters for input and output.

params_stacking = {
    'prot_name': '3jcu',
    'prot_chain': 'H',
    'region': 'combined',
    'fasta_fp': '../../data/deeptminter/example_data/',
    'phobius_fp': '../../data/deeptminter/example_data/',
    'isite_fp': '../../data/deeptminter/',

    'model_fpn': '../../data/deeptminter/model/stacking.model',
    'sv_fp_stacking_input': '../../data/deeptminter/',
    'sv_fp': '../../data/deeptminter/',
    'sv_suffix': '.deeptminter'
}

Then, we performed predictions.

Command
Output
import deeptminter

deeptminter.predict.stacking(
    prot_name=params_stacking['prot_name'],
    prot_chain=params_stacking['prot_chain'],
    region=params_stacking['region'],
    fasta_fp=params_stacking['fasta_fp'],
    phobius_fp=params_stacking['phobius_fp'],
    isite_fp=params_stacking['isite_fp'],
    sv_fp_stacking_input=params_stacking['sv_fp_stacking_input'],
    model_fpn=params_stacking['model_fpn'],
    sv_fp=params_stacking['sv_fp'],
    sv_suffix=params_stacking['sv_suffix'],
)

CLI

DeepTMInter can also be used in shell. To know how to use, please type

Command
Output
deeptminter_assemble -pn 3jcu -pc H -fa ./data/deeptminter/example_data/ -phobfp ./data/deeptminter/example_data/ -m ./data/deeptminter/model/stacking.model -ifp ./data/deeptminter/ -r combined -sv_fp_s ./data/deeptminter/ -sv_fp ./data/deeptminter/ -sv_suf .deeptminter