Skip to content

Commit da4dc18

Browse files
committed
Enrichr links; References; Clustergrammer
1 parent e93fc88 commit da4dc18

3 files changed

Lines changed: 20 additions & 10 deletions

File tree

appyters/Bulk_RNA_seq/RNA_seq_Analysis_Pipeline.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,7 @@
815815
" enrichr_link_dict[title_down] = dict()\n",
816816
" enrichr_link_dict[title_down][\"link\"] = \"<a href=https://maayanlab.cloud/Enrichr/enrich?dataset={} target=\\\"_blank\\\">link to Enrichr</a>\".format(results['enrichr'][label][\"downregulated\"][\"shortId\"])\n",
817817
"\n",
818+
"notebook_metadata['enrichr_links'] = enrichr_link_dict\n",
818819
"enrichr_link_df = pd.DataFrame.from_dict(enrichr_link_dict).T\n",
819820
"table_counter, notebook_metadata = display_object(table_counter, \"The table displays links to Enrichr containing the results of enrichment analyses generated by analyzing the up-regulated and down-regulated genes from a differential expression analysis. By clicking on these links, users can interactively explore and download the enrichment results from the Enrichr website.\", notebook_metadata=notebook_metadata, saved_filename=\"enrichr_links.csv\", df=enrichr_link_df, ishtml=True)"
820821
]

appyters/Bulk_RNA_seq/appyter.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22
"$schema": "https://raw.githubusercontent.com/MaayanLab/appyter-catalog/main/schema/appyter-validator.json",
33
"name": "Bulk_RNA_seq",
44
"title": "Bulk RNA-seq analysis pipeline",
5-
"version": "0.1.4",
5+
"version": "0.1.5",
66
"description": "Bulk RNA-seq analysis pipeline enables you to analyze and visualize datasets with state-of-the-art algorithms and visualization methods.",
77
"image": "screenshot.png",
88
"authors": [
99
{
1010
"name": "Minji Jeon",
1111
"email": "minji.jeon1@gmail.com"
12-
}
12+
},
13+
{
14+
"name": "Maxim Kuleshov",
15+
"email": "maxim.kuleshov@mssm.edu"
16+
}
1317
],
1418
"url": "https://github.com/MaayanLab/appyter-catalog",
1519
"tags": [

appyters/Bulk_RNA_seq/utils.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ def plot_l1000cds2(l1000cds2_results, counter, notebook_metadata, nr_drugs=7, he
924924

925925
else:
926926
# Bar charts
927-
fig = tools.make_subplots(rows=1, cols=2, print_grid=False)
927+
fig = tools.make_subplots(rows=1, cols=2, print_grid=False);
928928
for i, direction in enumerate(['mimic', 'reverse']):
929929
drug_counts = l1000cds2_results[direction]['table'].groupby('pert_desc').size().sort_values(
930930
ascending=False).iloc[:nr_drugs].iloc[::-1]
@@ -969,17 +969,22 @@ def plot_l1000cds2(l1000cds2_results, counter, notebook_metadata, nr_drugs=7, he
969969
fig.show()
970970
else:
971971
fig.show(renderer="png")
972-
973-
counter, notebook_metadata = display_object(counter, "Top {} Mimic/Reverse Small Molecule from L1000CDS2 for {}.".format(nr_drugs, l1000cds2_results['signature_label']), notebook_metadata, saved_filename=plot_name, istable=False)
974-
notebook_metadata["figures"][str(counter-1)]["file_desc"] = [{"name": "Mimic Signature Query Results", "link":l1000cds2_results['mimic']['url']},
975-
{"name": "Reverse Signature Query Results", "link":l1000cds2_results['reverse']['url']},]
976-
977-
# Links
972+
973+
974+
counter, notebook_metadata = display_object(counter,
975+
"Top {} Mimic/Reverse Small Molecule from L1000CDS2 for {}.".format(
976+
nr_drugs, l1000cds2_results['signature_label']),
977+
notebook_metadata, saved_filename=plot_name, istable=False)
978+
notebook_metadata["figures"][str(counter - 1)]["file_desc"] = [
979+
{"name": "Mimic Signature Query Results", "link": l1000cds2_results['mimic']['url']},
980+
{"name": "Reverse Signature Query Results", "link": l1000cds2_results['reverse']['url']}, ]
981+
982+
# Links
978983
display(Markdown(' *Mimic Signature Query Results*:'))
979984
display_link(l1000cds2_results['mimic']['url'])
980985
display(Markdown(' *Reverse Signature Query Results*:'))
981986
display_link(l1000cds2_results['reverse']['url'])
982-
987+
983988
return counter, notebook_metadata
984989

985990
def run_l1000fwd(signature, nr_genes=500, signature_label=''):

0 commit comments

Comments
 (0)