This repository contains the analysis code and processed data for the study:
Samart K, Thang L, Buskirk L, Tonielli A, Krishnan A*, Ravi J*. Integrative transcriptome-based drug repurposing in tuberculosis. bioRxiv (2025). https://doi.org/10.1101/2025.06.02.657296
* co-corresponding authors
We integrate transcriptomic signatures from multiple TB microarray and RNAseq datasets with various disease-drug connectivity scores to identify and prioritize HDT candidates for tuberculosis.
integrative-drugrep-tb/
├── scripts/ # R and Python analysis scripts (numbered by step)
├── vignette/ # Quarto documents with worked examples for each step
├── evaluation/ # Pubmed scraper and outputs
├── figures/ # Code and outputs for manuscript figures (figure1–6, figureS1-S16)
├── data/ # Input data: DE results, signatures, and metadata
├── DataCuration/ # Notebooks for preprocessing, cleaning, and harmonizing disease data and metadata
├── results/ # Pipeline outputs: connectivity scores and drug rankings
└── renv.lock # R package lockfile for reproducibility
The analysis follows a five-step pipeline:
| Step | Scripts | Description |
|---|---|---|
| 00 | 00_multids_microarray_DEwithlimma.R, 00_multids_RNAseq_DEwithDESeq2.R |
Differential expression analysis across TB datasets |
| 01 | 01_signature_aggregation_functions.R, 01_signature_landmark_prep_functions.R |
Aggregate DE signatures; filter to L1000 landmark genes |
| 02 | 02_drugrep_get_prediction_indiv.R, 02_drugrep_get_prediction_aggr.R, 02_signatureSearch_connectivity_scores_functions.R |
Score drug candidates via CMAP 1.0, CMAP 2.0 (LINCS), and correlation methods |
| 03 | 03_summarize_drugs_methodswise_functions.R |
Summarize and compare predictions across scoring methods |
| 04 | 04_*_RankAggregation_*.R |
Aggregate drug rankings across methods and datasets |
| 05 | 05_high_confidence_drug_prediction.R, 05_build_drugtarget_network_functions.R |
Identify high-confidence candidates and build drug–target networks |
See scripts/README.md for a full table of scripts and their purposes, and vignette/ for step-by-step worked examples.
- R 4.6.1 with Bioconductor 3.23
- Python 3 (for HDT literature evidence retreival and baseline analysis
# Install renv if needed
install.packages("renv")
# Restore the R package library
renv::restore()Rscript scripts/00_multids_microarray_DEwithlimma.R \
data/microarray_data_forDE/clean_TB_sample_metadata_classification.tsv \
0.05
Arguments:
-
meta_class_file.tsv: Tab‑separated file listing all datasets (defaultdata/microarray_data_forDE/clean_TB_sample_metadata_classification.tsv).Mandatory columns:
series_id(GEO study identifier)geo_accession(GEO sample identifier )signature_full_name(name of signature containing unique sample conditions)exprmat_path(path to raw‑count matrix TSV)classification(labels:disease_without_treatmentorhealthy_control_without_treatment)
-
padj_cutoff: Adjusted‑p significance threshold (default 0.05)
Rscript scripts/00_multids_RNAseq_DESeq2.R \
data/RNAseq_data_forDE/clean_TB_sample_metadata_classification.tsv \
0.05
Arguments:
-
meta_class_file.tsv: Tab‑separated file listing all datasets (defaultdata/RNAseq_data_forDE/clean_TB_sample_metadata_classification.tsv).Mandatory columns:
series_id(GEO study identifier)geo_accession(GEO sample identifier )signature_full_name(name of signature containing unique sample conditions)exprmat_path(path to raw‑count matrix TSV)classification(labels:disease_without_treatmentorhealthy_control_without_treatment)
-
padj_cutoff: Adjusted‑p significance threshold (default 0.05)
Aggregated signatures can be computed by running the Quarto (.qmd) notebook below.
vignette/01_compute_aggregated_signatures.qmd
Drug candidates are prioritized by computing connectivity scores between disease signatures and drug perturbation signatures.
An example command to quantify candidate drugs predicted to reverse RNAseq individual TB signatures using the CMAP 2.0 methods (i.e., LINCS).
Rscript scripts/02_drugrep_get_prediction_indiv.R \
data/signatures/RNASeq_TB_signature_run_info.tsv \
data/signatures/RNAseq \
LINCS LINCS \
results/RNAseq/LINCS
Arguments:
sig_metadata_pathPath to the RNAseq signature metadata file (default:data/signatures/RNASeq_TB_signature_run_info.tsv).sig_data_pathDirectory containing RNAseq signature data files (default:data/signatures/RNAseq).drugdb_nameDrug perturbation database to use. Options: LINCS, CMAP (default:LINCS).score_methodMethod used to compute signature similarity scores. Options:LINCS,CMAP,Cor_spearman,Cor_pearson(default:LINCS).output_dirDirectory where output results will be saved (default:results/RNAseq/LINCS).
An example command to quantify candidate drugs predicted to reverse RNAseq aggregated TB signatures using the CMAP 2.0 methods (i.e., LINCS).
Rscript scripts/02_drugrep_get_prediction_aggr.R RNAseq LINCS LINCS
Arguments:
technologyType of transcriptomic data used to generate aggregated signatures. Options:microarrayorRNAseq(default:RNASeq)score_methodMethod used to compute disease-drug connectivity scores. Options:LINCS,CMAP,Cor_spearman,Cor_pearson(default:LINCS).drugdb_nameDrug perturbation database to use for querying signatures. Options:LINCS,CMAP(default:LINCS).
Note: Drug prioritization examples by method for both individual and aggregated signatures can be reproduced by running the following notebook.
vignette/02_signatureSearch_connectivity_score_functions.qmd
Drug predictions from different connectivity scoring methods are aggregated and summarized using the following analysis notebooks:
vignette/03_summarize_drugs_methodswise_functions.qmd
vignette/04_partial_rank_aggregation.qmd
vignette/05_high_confidence_drug_prediction.qmd
NOTES:
- Additional downstream analyses (e.g., pathway and baseline analyses) can be reproduced using the .qmd notebooks provided in the
vignettes/directory. - All figures can be reproduced using the .qmd notebooks provided in the
figures/directory.
If you use this code or data, please cite:
Samart K, Thang L, Buskirk L, Tonielli A, Krishnan A*, Ravi J*.
Integrative transcriptome-based drug repurposing in tuberculosis.
bioRxiv (2025). https://doi.org/10.1101/2025.06.02.657296
(* co-corresponding authors)
A CITATION.cff file is also provided for automated citation tools.
MIT © 2026 JRaviLab & KrishnanLab. See LICENSE.
Claude Code (model: Sonnet) was used to check for filename and other minor inconsistencies across the repository; any other use of LLMs for generating code skeletons is cited within each script.