Skip to content

Commit 184de63

Browse files
authored
Merge pull request #930 from MaayanLab/dgb2
Updates to DGB2 appyter
2 parents 5f789b1 + 521f956 commit 184de63

5 files changed

Lines changed: 124 additions & 6 deletions

File tree

appyters/Drug_Gene_Budger2/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Drug Gene Budger (DGB) 2
1+
# Dr. Gene Budger (DGB) 2
22

3-
This appyter takes a single gene as input and identifies up-regulating and down-regulating drugs from three connectivity mapping resources.
3+
The Dr. Gene Budger 2 (DGB2) Appyter takes a single human gene as input, and returns ranked up- and down-regulating drugs from three Connectivity Mapping resources that were shown to maximally increase or decrease the mRNA expression of the gene in human cell lines. The three Connectivity Mapping resources are:
44

55
- [Ginkgo GDPx1 and GDPx2 datasets](https://huggingface.co/ginkgo-datapoints)
66

appyters/Drug_Gene_Budger2/appyter.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/MaayanLab/appyter-catalog/main/schema/appyter-validator.json",
33
"name": "Drug_Gene_Budger2",
4-
"title": "Drug Gene Budger (DGB) 2",
5-
"version": "0.0.1",
4+
"title": "Dr. Gene Budger (DGB) 2",
5+
"version": "0.0.3",
66
"description": "An appyter that retrieves drugs that up-regulate and down-regulate a single input gene across Connectivity Mapping datasets",
77
"image": "dgb_logo.png",
88
"authors": [

appyters/Drug_Gene_Budger2/drug_gene_budger2_appyter.ipynb

Lines changed: 119 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"- Novartis DRUG-seq: Differential: Limma-Trend based differential expression results for 4,343 drugs. \n",
7878
"- LINCS L1000 Chemical Perturbations: Queries the [LINCS Reverse Search Dashboard](https://lincs-reverse-search-dashboard.dev.maayanlab.cloud/) for pre-computed characteristic direction-based differential gene expression signatures from RNA-seq-like LINCS L1000 Expression Profiles covering 33,571 drugs.\n",
7979
"\n",
80-
"The Ginkgo dataset includes 4 primary cell types (eithelial melanocytes, smooth aortic muscle cells, skeletal muscle myoblasts and dermal fibroblasts) and one cell line (A549 lung carcinoma cell line). Previous analysis showed distinct transcriptional responses by cell type, so the drug rankings for the Ginkgo dataset are separated by cell type."
80+
"The Ginkgo dataset includes 4 primary cell types (epithelial melanocytes, smooth aortic muscle cells, skeletal muscle myoblasts and dermal fibroblasts) and one cell line (A549 lung carcinoma cell line). Previous analysis showed distinct transcriptional responses by cell type, so the drug rankings for the Ginkgo dataset are separated by cell type."
8181
]
8282
},
8383
{
@@ -103,6 +103,9 @@
103103
"from upsetplot import from_contents, plot\n",
104104
"from matplotlib import pyplot\n",
105105
"\n",
106+
"## Venn Diagram\n",
107+
"from matplotlib_venn import venn3\n",
108+
"\n",
106109
"## Volcano Plot\n",
107110
"from bokeh.plotting import figure, show\n",
108111
"from bokeh.models import ColumnDataSource, HoverTool, LinearColorMapper\n",
@@ -279,7 +282,7 @@
279282
"id": "df830837",
280283
"metadata": {},
281284
"source": [
282-
"## Rank Drugs"
285+
"## Rank Tables"
283286
]
284287
},
285288
{
@@ -723,6 +726,100 @@
723726
"display(HTML(download_link(overlapping_down_logFC, 'overlapping_drugs_logfc_DnReg.tsv')))\n"
724727
]
725728
},
729+
{
730+
"cell_type": "markdown",
731+
"id": "2e7c13dd",
732+
"metadata": {},
733+
"source": [
734+
"## Venn Diagrams\n",
735+
"\n",
736+
"The venn diagrams show the overlap among either up-regulating or down-regulating drugs across the three datasets Novartis DRUG-seq, LINCS L1000, and Ginkgo (all cell types grouped). "
737+
]
738+
},
739+
{
740+
"cell_type": "code",
741+
"execution_count": null,
742+
"id": "a43d7c8d",
743+
"metadata": {},
744+
"outputs": [],
745+
"source": [
746+
"# combine top up and down drugs across Ginkgo cell types\n",
747+
"all_ginkgo_up = set()\n",
748+
"all_ginkgo_down = set()\n",
749+
"for k,v in top_up.items():\n",
750+
" if re.search('ginkgo',k):\n",
751+
" all_ginkgo_up = all_ginkgo_up.union(v)\n",
752+
" all_ginkgo_down = all_ginkgo_down.union(top_down[k])\n",
753+
"venn_up = {\n",
754+
" 'novartis': top_up['novartis'],\n",
755+
" 'lincs' : top_up['lincs_l1000'],\n",
756+
" 'ginkgo' : all_ginkgo_up\n",
757+
"}\n",
758+
"venn_down = {\n",
759+
" 'novartis': top_down['novartis'],\n",
760+
" 'lincs' : top_down['lincs_l1000'],\n",
761+
" 'ginkgo' : all_ginkgo_down\n",
762+
"}\n",
763+
"\n",
764+
"def print_overlap(venn_dict):\n",
765+
" gn = venn_dict['ginkgo'].intersection(venn_dict['novartis'])\n",
766+
" gl = venn_dict['ginkgo'].intersection(venn_dict['lincs'])\n",
767+
" nl = venn_dict['novartis'].intersection(venn_dict['lincs'])\n",
768+
" gnl = venn_dict['ginkgo'].intersection(venn_dict['novartis']).intersection(venn_dict['lincs'])\n",
769+
" if len(gn) > 0:\n",
770+
" display_markdown(f'Novartis and Ginkgo: {gn.difference(gnl)}', raw=True)\n",
771+
" if len(nl) > 0:\n",
772+
" display_markdown(f'Novartis and LINCS L1000: {nl.difference(gnl)}', raw=True)\n",
773+
" if len(gl) > 0:\n",
774+
" display_markdown(f'LINCS L1000 and Ginkgo: {gl.difference(gnl)}', raw=True)\n",
775+
" if len(gnl) > 0:\n",
776+
" display_markdown(f'LINCS L1000, Ginkgo and Novartis: {gnl}', raw=True)"
777+
]
778+
},
779+
{
780+
"cell_type": "code",
781+
"execution_count": null,
782+
"id": "e275310b",
783+
"metadata": {},
784+
"outputs": [],
785+
"source": [
786+
"display_markdown(f'Overlap of top {query_gene} up-regulating drugs across sources', raw=True)\n",
787+
"venn3(subsets=(venn_up['novartis'], venn_up['lincs'], venn_up['ginkgo']),\n",
788+
" set_labels=('Novartis', 'LINCS L1000', 'Ginkgo'));"
789+
]
790+
},
791+
{
792+
"cell_type": "code",
793+
"execution_count": null,
794+
"id": "951ac257",
795+
"metadata": {},
796+
"outputs": [],
797+
"source": [
798+
"print_overlap(venn_up)"
799+
]
800+
},
801+
{
802+
"cell_type": "code",
803+
"execution_count": null,
804+
"id": "1f1f3962",
805+
"metadata": {},
806+
"outputs": [],
807+
"source": [
808+
"display_markdown(f'Overlap of top {query_gene} down-regulating drugs across sources', raw=True)\n",
809+
"venn3(subsets=(venn_down['novartis'], venn_down['lincs'], venn_down['ginkgo']),\n",
810+
" set_labels=('Novartis', 'LINCS L1000', 'Ginkgo'));"
811+
]
812+
},
813+
{
814+
"cell_type": "code",
815+
"execution_count": null,
816+
"id": "c53651f3",
817+
"metadata": {},
818+
"outputs": [],
819+
"source": [
820+
"print_overlap(venn_down)"
821+
]
822+
},
726823
{
727824
"cell_type": "markdown",
728825
"id": "c088c17f",
@@ -862,6 +959,26 @@
862959
"source": [
863960
"create_bokeh_volcano_plot(novartis_de, query_gene, '', 'Novartis')"
864961
]
962+
},
963+
{
964+
"cell_type": "markdown",
965+
"id": "ba0c6439",
966+
"metadata": {},
967+
"source": [
968+
"## References\n",
969+
"\n",
970+
"[1] Baugh, Lauren, Sébastien Vigneau, Srijani Sridhar, Sarah Boswell, George Pilitsis, John Bradley, Olga Allen, et al. 2025. “Mapping the Transcriptional Landscape of Drug Responses in Primary Human Cells Using High-Throughput DRUG-Seq.” bioRxiv. https://doi.org/10.1101/2025.06.03.657593.\n",
971+
"\n",
972+
"[2] Datapoints, Ginkgo. n.d. “GDPx1.” Accessed September 5, 2025. https://huggingface.co/datasets/ginkgo-datapoints/GDPx1.\n",
973+
"\n",
974+
"[3] Hadjikyriacou, Andrea, Chian Yang, Martin Henault, Robin Ge, Leandra Mansur, Alicia Lindeman, Carsten Russ, et al. 2025. “Novartis/DRUG-Seq U2OS MoABox Dataset.” Zenodo. https://doi.org/10.5281/ZENODO.14291446.\n",
975+
"\n",
976+
"[4] Subramanian, Aravind, Rajiv Narayan, Steven M. Corsello, David D. Peck, Ted E. Natoli, Xiaodong Lu, Joshua Gould, et al. 2017. “A next Generation Connectivity Map: L1000 Platform and the First 1,000,000 Profiles.” Cell 171 (6): 1437-1452.e17.\n",
977+
"\n",
978+
"[5] “LINCS L1000 Reverse Search.” n.d. Accessed September 5, 2025. https://lincs-reverse-search-dashboard.dev.maayanlab.cloud/.\n",
979+
"\n",
980+
"[6] Wang, Zichen, Edward He, Kevin Sani, Kathleen M. Jagodnik, Moshe C. Silverstein, and Avi Ma’ayan. 2019. “Drug Gene Budger (DGB): An Application for Ranking Drugs to Modulate a Specific Gene Based on Transcriptomic Signatures.” Bioinformatics (Oxford, England) 35 (7): 1247–48."
981+
]
865982
}
866983
],
867984
"metadata": {

appyters/Drug_Gene_Budger2/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ requests
66
IPython
77
upsetplot
88
matplotlib
9+
matplotlib_venn
910
bokeh
-137 KB
Loading

0 commit comments

Comments
 (0)