MCP HubMCP Hub
스킬 목록으로 돌아가기

pytdc

K-Dense-AI
업데이트됨 Today
26,534
2,743
26,534
GitHub에서 보기
기타aidata

정보

PyTDC는 ADME, 독성, 약물-표적 상호작용 예측을 포함한 신약 개발을 위한 AI 지원 데이터셋과 벤치마크를 제공합니다. 이를 통해 표준화된 분할 방식과 평가 지표가 포함된 정제된 제약 데이터셋에 접근하여 모델 학습 및 평가에 활용할 수 있습니다. 치료 분야 머신러닝에서 모델을 구축하거나 성능을 비교 평가하는 개발자에게 필수적인 도구입니다.

빠른 설치

Claude Code

추천
기본
npx skills add K-Dense-AI/claude-scientific-skills -a claude-code
플러그인 명령대체
/plugin add https://github.com/K-Dense-AI/claude-scientific-skills
Git 클론대체
git clone https://github.com/K-Dense-AI/claude-scientific-skills.git ~/.claude/skills/pytdc

Claude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요

문서

PyTDC (Therapeutics Data Commons)

Overview

PyTDC is an open-science platform providing AI-ready datasets and benchmarks for drug discovery and development. Access curated datasets spanning the entire therapeutics pipeline with standardized evaluation metrics and meaningful data splits, organized into three categories: single-instance prediction (molecular/protein properties), multi-instance prediction (drug-target interactions, DDI), and generation (molecule generation, retrosynthesis).

When to Use This Skill

This skill should be used when:

  • Working with drug discovery or therapeutic ML datasets
  • Benchmarking machine learning models on standardized pharmaceutical tasks
  • Predicting molecular properties (ADME, toxicity, bioactivity)
  • Predicting drug-target or drug-drug interactions
  • Generating novel molecules with desired properties
  • Accessing curated datasets with proper train/test splits (scaffold, cold-split)
  • Using molecular oracles for property optimization

Installation & Setup

Install PyTDC using pip:

uv pip install PyTDC

To upgrade to the latest version:

uv pip install PyTDC --upgrade

Core dependencies (automatically installed):

  • numpy, pandas, tqdm, seaborn, scikit_learn, fuzzywuzzy

Additional packages are installed automatically as needed for specific features.

Quick Start

The basic pattern for accessing any TDC dataset follows this structure:

from tdc.<problem> import <Task>
data = <Task>(name='<Dataset>')
split = data.get_split(method='scaffold', seed=1, frac=[0.7, 0.1, 0.2])
df = data.get_data(format='df')

Where:

  • <problem>: One of single_pred, multi_pred, or generation
  • <Task>: Specific task category (e.g., ADME, DTI, MolGen)
  • <Dataset>: Dataset name within that task

Example - Loading ADME data:

from tdc.single_pred import ADME
data = ADME(name='Caco2_Wang')
split = data.get_split(method='scaffold')
# Returns dict with 'train', 'valid', 'test' DataFrames

Single-Instance Prediction Tasks

Single-instance prediction involves forecasting properties of individual biomedical entities (molecules, proteins, etc.).

Available Task Categories

1. ADME (Absorption, Distribution, Metabolism, Excretion)

Predict pharmacokinetic properties of drug molecules.

from tdc.single_pred import ADME
data = ADME(name='Caco2_Wang')  # Intestinal permeability
# Other datasets: HIA_Hou, Bioavailability_Ma, Lipophilicity_AstraZeneca, etc.

Common ADME datasets:

  • Caco2 - Intestinal permeability
  • HIA - Human intestinal absorption
  • Bioavailability - Oral bioavailability
  • Lipophilicity - Octanol-water partition coefficient
  • Solubility - Aqueous solubility
  • BBB - Blood-brain barrier penetration
  • CYP - Cytochrome P450 metabolism

2. Toxicity (Tox)

Predict toxicity and adverse effects of compounds.

from tdc.single_pred import Tox
data = Tox(name='hERG')  # Cardiotoxicity
# Other datasets: AMES, DILI, Carcinogens_Lagunin, etc.

Common toxicity datasets:

  • hERG - Cardiac toxicity
  • AMES - Mutagenicity
  • DILI - Drug-induced liver injury
  • Carcinogens - Carcinogenicity
  • ClinTox - Clinical trial toxicity

3. HTS (High-Throughput Screening)

Bioactivity predictions from screening data.

from tdc.single_pred import HTS
data = HTS(name='SARSCoV2_Vitro_Touret')

4. QM (Quantum Mechanics)

Quantum mechanical properties of molecules.

from tdc.single_pred import QM
data = QM(name='QM7')

5. Other Single Prediction Tasks

  • Yields: Chemical reaction yield prediction
  • Epitope: Epitope prediction for biologics
  • Develop: Development-stage predictions
  • CRISPROutcome: Gene editing outcome prediction

Data Format

Single prediction datasets typically return DataFrames with columns:

  • Drug_ID or Compound_ID: Unique identifier
  • Drug or X: SMILES string or molecular representation
  • Y: Target label (continuous or binary)

Multi-Instance Prediction Tasks

Multi-instance prediction involves forecasting properties of interactions between multiple biomedical entities.

Available Task Categories

1. DTI (Drug-Target Interaction)

Predict binding affinity between drugs and protein targets.

from tdc.multi_pred import DTI
data = DTI(name='BindingDB_Kd')
split = data.get_split()

Available datasets:

  • BindingDB_Kd - Dissociation constant (52,284 pairs)
  • BindingDB_IC50 - Half-maximal inhibitory concentration (991,486 pairs)
  • BindingDB_Ki - Inhibition constant (375,032 pairs)
  • DAVIS, KIBA - Kinase binding datasets

Data format: Drug_ID, Target_ID, Drug (SMILES), Target (sequence), Y (binding affinity)

2. DDI (Drug-Drug Interaction)

Predict interactions between drug pairs.

from tdc.multi_pred import DDI
data = DDI(name='DrugBank')
split = data.get_split()

Multi-class classification task predicting interaction types. Dataset contains 191,808 DDI pairs with 1,706 drugs.

3. PPI (Protein-Protein Interaction)

Predict protein-protein interactions.

from tdc.multi_pred import PPI
data = PPI(name='HuRI')

4. Other Multi-Prediction Tasks

  • GDA: Gene-disease associations
  • DrugRes: Drug resistance prediction
  • DrugSyn: Drug synergy prediction
  • PeptideMHC: Peptide-MHC binding
  • AntibodyAff: Antibody affinity prediction
  • MTI: miRNA-target interactions
  • Catalyst: Catalyst prediction
  • TrialOutcome: Clinical trial outcome prediction

Generation Tasks

Generation tasks involve creating novel biomedical entities with desired properties.

1. Molecular Generation (MolGen)

Generate diverse, novel molecules with desirable chemical properties.

from tdc.generation import MolGen
data = MolGen(name='ChEMBL_V29')
split = data.get_split()

Use with oracles to optimize for specific properties:

from tdc import Oracle
oracle = Oracle(name='GSK3B')
score = oracle('CC(C)Cc1ccc(cc1)C(C)C(O)=O')  # Evaluate SMILES

See references/oracles.md for all available oracle functions.

2. Retrosynthesis (RetroSyn)

Predict reactants needed to synthesize a target molecule.

from tdc.generation import RetroSyn
data = RetroSyn(name='USPTO')
split = data.get_split()

Dataset contains 1,939,253 reactions from USPTO database.

3. Paired Molecule Generation

Generate molecule pairs (e.g., prodrug-drug pairs).

from tdc.generation import PairMolGen
data = PairMolGen(name='Prodrug')

For detailed oracle documentation and molecular generation workflows, refer to references/oracles.md and scripts/molecular_generation.py.

Benchmark Groups

Benchmark groups provide curated collections of related datasets for systematic model evaluation.

ADMET Benchmark Group

from tdc.benchmark_group import admet_group
group = admet_group(path='data/')

# Get benchmark datasets
benchmark = group.get('Caco2_Wang')
predictions = {}

for seed in [1, 2, 3, 4, 5]:
    train, valid = benchmark['train'], benchmark['valid']
    # Train model here
    predictions[seed] = model.predict(benchmark['test'])

# Evaluate with required 5 seeds
results = group.evaluate(predictions)

ADMET Group includes 22 datasets covering absorption, distribution, metabolism, excretion, and toxicity.

Other Benchmark Groups

Available benchmark groups include collections for:

  • ADMET properties
  • Drug-target interactions
  • Drug combination prediction
  • And more specialized therapeutic tasks

For benchmark evaluation workflows, see scripts/benchmark_evaluation.py.

Data Functions

TDC provides comprehensive data processing utilities organized into four categories.

1. Dataset Splits

Retrieve train/validation/test partitions with various strategies:

# Scaffold split (default for most tasks)
split = data.get_split(method='scaffold', seed=1, frac=[0.7, 0.1, 0.2])

# Random split
split = data.get_split(method='random', seed=42, frac=[0.8, 0.1, 0.1])

# Cold split (for DTI/DDI tasks)
split = data.get_split(method='cold_drug', seed=1)  # Unseen drugs in test
split = data.get_split(method='cold_target', seed=1)  # Unseen targets in test

Available split strategies:

  • random: Random shuffling
  • scaffold: Scaffold-based (for chemical diversity)
  • cold_drug, cold_target, cold_drug_target: For DTI tasks
  • temporal: Time-based splits for temporal datasets

2. Model Evaluation

Use standardized metrics for evaluation:

from tdc import Evaluator

# For binary classification
evaluator = Evaluator(name='ROC-AUC')
score = evaluator(y_true, y_pred)

# For regression
evaluator = Evaluator(name='RMSE')
score = evaluator(y_true, y_pred)

Available metrics: ROC-AUC, PR-AUC, F1, Accuracy, RMSE, MAE, R2, Spearman, Pearson, and more.

3. Data Processing

TDC provides 11 key processing utilities:

from tdc.chem_utils import MolConvert

# Molecule format conversion
converter = MolConvert(src='SMILES', dst='PyG')
pyg_graph = converter('CC(C)Cc1ccc(cc1)C(C)C(O)=O')

Processing utilities include:

  • Molecule format conversion (SMILES, SELFIES, PyG, DGL, ECFP, etc.)
  • Molecule filters (PAINS, drug-likeness)
  • Label binarization and unit conversion
  • Data balancing (over/under-sampling)
  • Negative sampling for pair data
  • Graph transformation
  • Entity retrieval (CID to SMILES, UniProt to sequence)

For comprehensive utilities documentation, see references/utilities.md.

4. Molecule Generation Oracles

TDC provides 17+ oracle functions for molecular optimization:

from tdc import Oracle

# Single oracle
oracle = Oracle(name='DRD2')
score = oracle('CC(C)Cc1ccc(cc1)C(C)C(O)=O')

# Multiple oracles
oracle = Oracle(name='JNK3')
scores = oracle(['SMILES1', 'SMILES2', 'SMILES3'])

For complete oracle documentation, see references/oracles.md.

Advanced Features

Retrieve Available Datasets

from tdc.utils import retrieve_dataset_names

# Get all ADME datasets
adme_datasets = retrieve_dataset_names('ADME')

# Get all DTI datasets
dti_datasets = retrieve_dataset_names('DTI')

Label Transformations

# Get label mapping
label_map = data.get_label_map(name='DrugBank')

# Convert labels
from tdc.chem_utils import label_transform
transformed = label_transform(y, from_unit='nM', to_unit='p')

Database Queries

from tdc.utils import cid2smiles, uniprot2seq

# Convert PubChem CID to SMILES
smiles = cid2smiles(2244)

# Convert UniProt ID to amino acid sequence
sequence = uniprot2seq('P12345')

Common Workflows

Workflow 1: Train a Single Prediction Model

See scripts/load_and_split_data.py for a complete example:

from tdc.single_pred import ADME
from tdc import Evaluator

# Load data
data = ADME(name='Caco2_Wang')
split = data.get_split(method='scaffold', seed=42)

train, valid, test = split['train'], split['valid'], split['test']

# Train model (user implements)
# model.fit(train['Drug'], train['Y'])

# Evaluate
evaluator = Evaluator(name='MAE')
# score = evaluator(test['Y'], predictions)

Workflow 2: Benchmark Evaluation

See scripts/benchmark_evaluation.py for a complete example with multiple seeds and proper evaluation protocol.

Workflow 3: Molecular Generation with Oracles

See scripts/molecular_generation.py for an example of goal-directed generation using oracle functions.

Resources

This skill includes bundled resources for common TDC workflows:

scripts/

  • load_and_split_data.py: Template for loading and splitting TDC datasets with various strategies
  • benchmark_evaluation.py: Template for running benchmark group evaluations with proper 5-seed protocol
  • molecular_generation.py: Template for molecular generation using oracle functions

references/

  • datasets.md: Comprehensive catalog of all available datasets organized by task type
  • oracles.md: Complete documentation of all 17+ molecule generation oracles
  • utilities.md: Detailed guide to data processing, splitting, and evaluation utilities

Additional Resources

GitHub 저장소

K-Dense-AI/claude-scientific-skills
경로: skills/pytdc
0
agent-skillsai-scientistbioinformaticschemoinformaticsclaudeclaude-skills

연관 스킬

llamaguard

기타

LlamaGuard는 폭력 및 혐오 발언 등 6가지 안전 범주에서 LLM 입력과 출력을 조정하기 위한 Meta의 70-80억 파라미터 모델입니다. 94-95% 정확도를 제공하며 vLLM, Hugging Face 또는 Amazon SageMaker를 사용해 배포할 수 있습니다. 이 기술을 사용하여 AI 애플리케이션에 콘텐츠 필터링 및 안전 가드레일을 손쉽게 통합하세요.

스킬 보기

cost-optimization

기타

이 Claude Skill은 리소스 적정화, 태깅 전략, 지출 분석을 통해 개발자들이 클라우드 비용을 최적화할 수 있도록 지원합니다. AWS, Azure, GCP에서 클라우드 비용을 절감하고 비용 거버넌스를 구현하기 위한 프레임워크를 제공합니다. 인프라 비용을 분석하거나, 리소스를 적정화하거나, 예산 제약을 충족해야 할 때 사용하세요.

스킬 보기

quantizing-models-bitsandbytes

기타

이 스킬은 bitsandbytes를 사용하여 LLM을 8비트 또는 4비트 정밀도로 양자화하며, 최소한의 정확도 손실로 50-75%의 메모리 감소를 달성합니다. 제한된 GPU 메모리에서 더 큰 모델을 실행하거나 추론을 가속화하는 데 이상적이며, INT8, NF4, FP4와 같은 형식을 지원합니다. 이 스킬은 HuggingFace Transformers와 통합되어 QLoRA 학습 및 8비트 옵티마이저를 가능하게 합니다.

스킬 보기

dispatching-parallel-agents

기타

이 Claude Skill은 3개 이상의 독립적인 문제를 동시에 조사하고 해결하기 위해 다중 에이전트를 배치합니다. 공유 상태나 의존성 없이 해결 가능한 무관련 장애 시나리오에 맞게 설계되었습니다. 핵심 기능은 병렬 문제 해결로, 각 독립 문제 영역마다 하나의 에이전트를 할당하여 효율성을 극대화합니다.

스킬 보기