Skip to main content

    DeepPurpose quickstart

    Pick one of five DeepPurpose task types, a workflow preset and a drug and protein encoder pair, then run a model-zoo inference and export predictions.csv.

    DeepPurpose is a comprehensive deep learning library for drug-target interaction (DTI) prediction, published in Bioinformatics. It implements 15+ compound encoders and 7+ protein encoders with over 50 combined neural architectures.

    Webapp analysis tasks

    The .bloom* webapp provides five analysis task types:

    Task TypeDescriptionRequired Inputs
    Drug-Target InteractionPredict binding affinity between compounds and proteinsDrug (SMILES), Target (protein sequence)
    Drug Property PredictionPredict ADMET and molecular propertiesDrug compounds (one per line), Properties to predict
    Protein-Protein InteractionPredict protein binding interactionsTwo protein sequences
    Drug-Drug InteractionPredict drug combination effectsTwo drug compounds (SMILES)
    Protein Function PredictionClassify protein functionProtein sequence, Function class

    Input source selection

    For DTI analysis, select input sources for each field:

    Input TypeDescription
    Manual EntryEnter SMILES or protein sequences directly
    From Previous JobImport compounds/sequences from completed workflows

    Compatible upstream sources: AiZynthFinder, REINVENT, ZINC, ESMFold outputs.

    Research workflow presets

    Click preset buttons to configure optimal settings for specific workflows:

    PresetTask TypeEncodingsUse Case
    Virtual ScreeningDTIMorgan + AACHigh-throughput library screening (~30s per 1000 compounds)
    Lead OptimizationDrug PropertyTransformer/CNNSAR analysis, multi-parameter optimization (~2-5 min/compound)
    Target DiscoveryDTICNN + CNNDrug repurposing, target deconvolution (~1-2 min/compound)
    ADMET ProfilingDrug PropertyMorganSafety screening, toxicity prediction (~15-30s/compound)

    Encoder options

    Drug encodings: CNN, CNN_RNN, Transformer, MPNN, Morgan, Pubchem, Daylight, rdkit_2d, ESPF, DGL_GCN, DGL_NeuralFP, DGL_GIN_AttrMasking, DGL_GIN_ContextPred, DGL_AttentiveFP

    Protein encodings: CNN, CNN_RNN, Transformer, AAC, PseudoAAC, Conjoint_triad, Quasi-seq-order, ConjointTriadVec, CTD

    DTI prediction modes

    ModeDescription
    Single PredictionAnalyze one drug-target pair
    Drug RepurposingFind new targets for existing drugs
    Virtual ScreeningLarge-scale compound evaluation

    Advanced options (expandable panel)

    ParameterRangeDefaultDescription
    Pretrained ModelModel zoo selectionNoneUse pretrained weights or train from scratch
    Job TitleText—Optional job description
    Batch Size1 - 51232Processing batch size
    Output Formatjson, csv, tsvjsonResults file format
    Use CUDAToggleEnabledGPU acceleration

    Available at https://github.com/kexinhuang12345/DeepPurpose

    Install

    Use CUDA-matched torch. Example for CUDA 12.1:

    pip install "torch==2.3.1" --index-url https://download.pytorch.org/whl/cu121
    pip install "deeppurpose>=0.2.9" pandas scikit-learn

    Check GPU access:

    python - <<'PY'
    import torch
    print("CUDA available:", torch.cuda.is_available())
    print("Device count:", torch.cuda.device_count())
    PY

    Run a model zoo inference

    from deeppurpose import dataset, encoder_model, models
    
    drug, target, y = dataset.load_process_DAVIS('./inputs', binary=False, device='cuda')
    
    model = models.model_zoo("Davis_BindingDB_KD_GNN", device='cuda')
    preds = model.predict(drug[:10], target[:10])
    print("Predictions shape:", preds.shape)
    print("First score:", preds[0])

    Minimal job layout

    deeppurpose-job/
    ├─ inputs/
    │  └─ davis/                # cached dataset
    ├─ outputs/
    │  └─ predictions.csv
    └─ scripts/
       └─ run_inference.py

    Export predictions

    import pandas as pd
    
    pd.DataFrame({"score": preds}).to_csv("outputs/predictions.csv", index=False)

    Was this page helpful?

    On this page

    On this page

    Loading...