Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
poseidonchan committed Sep 24, 2022
1 parent 3768956 commit e0392b9
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 95 deletions.
159 changes: 91 additions & 68 deletions Experiments/Figures/concordance_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -35,64 +35,18 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 4,
"id": "4f15725c",
"metadata": {},
"outputs": [],
"source": [
"data8k = pd.read_csv('~/Downloads/data8k_ref.txt',sep='\\t',index_col=0)\n",
"monaco = pd.read_csv('~/Downloads/monaco_groupmode1/monaco_group_GEP.txt',sep='\\t',index_col=0)"
"monaco = pd.read_csv(\"/Users/chan/Desktop/Chan's Research/2021Summer Intern/MajorReview/GEPbenchmarking/monaco_groupmode/monaco_group_GEP.txt\",sep='\\t',index_col=0)"
]
},
{
"cell_type": "code",
"execution_count": 55,
"id": "5f70e38f",
"metadata": {},
"outputs": [],
"source": [
"monaco = pd.read_csv('~/Downloads/monaco_pbmc.txt',sep='\\t',index_col=0)"
]
},
{
"cell_type": "code",
"execution_count": 58,
"id": "0b759f0e",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.9719791845370847\n",
"0.9552810659346943\n",
"0.9695774003545491\n",
"0.9655744267169898\n",
"0.9681477669125637\n",
"0.9707782924458169\n",
"0.9809572825527535\n",
"0.9774689769543089\n",
"0.9755246754732086\n",
"0.9767255675644765\n",
"0.972836964602276\n",
"0.9703779950820609\n"
]
}
],
"source": [
"for i in range(monaco.shape[1]):\n",
" print(np.sum(monaco.iloc[:,i]>0)/17487)"
]
},
{
"cell_type": "markdown",
"id": "93d9e16e",
"metadata": {},
"source": []
},
{
"cell_type": "code",
"execution_count": 32,
"execution_count": 5,
"id": "fe5dbc42",
"metadata": {},
"outputs": [],
Expand All @@ -102,7 +56,7 @@
},
{
"cell_type": "code",
"execution_count": 33,
"execution_count": 6,
"id": "eb8c1f4a",
"metadata": {},
"outputs": [],
Expand All @@ -113,7 +67,7 @@
},
{
"cell_type": "code",
"execution_count": 34,
"execution_count": 7,
"id": "b03ae3d0",
"metadata": {},
"outputs": [],
Expand All @@ -123,7 +77,7 @@
},
{
"cell_type": "code",
"execution_count": 35,
"execution_count": 8,
"id": "feff6471",
"metadata": {},
"outputs": [],
Expand All @@ -134,7 +88,7 @@
},
{
"cell_type": "code",
"execution_count": 36,
"execution_count": 9,
"id": "28a03c4a",
"metadata": {},
"outputs": [],
Expand All @@ -145,7 +99,7 @@
},
{
"cell_type": "code",
"execution_count": 37,
"execution_count": 10,
"id": "7cd3bd8e",
"metadata": {},
"outputs": [],
Expand All @@ -158,7 +112,7 @@
},
{
"cell_type": "code",
"execution_count": 38,
"execution_count": 11,
"id": "0dc8eaea",
"metadata": {},
"outputs": [],
Expand All @@ -169,7 +123,7 @@
},
{
"cell_type": "code",
"execution_count": 39,
"execution_count": 12,
"id": "a336c079",
"metadata": {},
"outputs": [
Expand All @@ -193,7 +147,7 @@
},
{
"cell_type": "code",
"execution_count": 40,
"execution_count": 13,
"id": "a2470b53",
"metadata": {},
"outputs": [],
Expand All @@ -208,18 +162,43 @@
},
{
"cell_type": "code",
"execution_count": 54,
"execution_count": 19,
"id": "c5bcdc41",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.06275639548765453"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"real_gene_ccc = np.array(real_gene_ccc)\n",
"np.median(real_gene_ccc[~np.isnan(real_gene_ccc)])"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "0ee93808",
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"The PostScript backend does not support transparency; partially transparent artists will be rendered opaque.\n"
]
"data": {
"text/plain": [
"Text(0.02, 0.5, 'adapt2real')"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
Expand Down Expand Up @@ -291,7 +270,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 20,
"id": "ef8e4960",
"metadata": {},
"outputs": [],
Expand All @@ -303,7 +282,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 21,
"id": "b175c6e5",
"metadata": {},
"outputs": [
Expand All @@ -328,7 +307,7 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 22,
"id": "737b925d",
"metadata": {},
"outputs": [],
Expand All @@ -341,6 +320,28 @@
" real_gene_ccc.append(CCCscore(testsigm[:,i],orisigm[:,i]))"
]
},
{
"cell_type": "code",
"execution_count": 23,
"id": "b7127d8a",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.21708191995376117"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"real_gene_ccc = np.array(real_gene_ccc)\n",
"np.median(real_gene_ccc[~np.isnan(real_gene_ccc)])"
]
},
{
"cell_type": "code",
"execution_count": 4,
Expand Down Expand Up @@ -382,7 +383,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 24,
"id": "d8d1012a",
"metadata": {},
"outputs": [
Expand All @@ -407,7 +408,7 @@
},
{
"cell_type": "code",
"execution_count": 31,
"execution_count": 25,
"id": "cdd1a040",
"metadata": {},
"outputs": [],
Expand All @@ -420,6 +421,28 @@
" simu_gene_ccc.append(CCCscore(trainsigm[:,i],orisigm[:,i]))"
]
},
{
"cell_type": "code",
"execution_count": 26,
"id": "3e19fcf0",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.22809295097698173"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"simu_gene_ccc = np.array(simu_gene_ccc)\n",
"np.median(simu_gene_ccc[~np.isnan(simu_gene_ccc)])"
]
},
{
"cell_type": "code",
"execution_count": 5,
Expand Down
39 changes: 15 additions & 24 deletions Experiments/Figures/heat_map/heat map.ipynb

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
related article ***Deep autoencoder for interpretable tissue-adaptive deconvolution and cell-type-specific gene analysis*** is available on [*bioRxiv*](https://doi.org/10.1101/2021.10.26.465846)

## Warning
The data I uploaded to the tsinghua cloud has been removed since I left Tsinghua University😭. If you need these files, please contact me (poseidonchan@icloud.com).

Currently, I am busy with moving to a new places. The version 1.0.3 is still not tested yet. If you want to reproduce the results in the manuscript, please find the notebooks in the Experiments folder and contact me (poseidonchan@icloud.com).
The data I uploaded to the tsinghua cloud has been removed since I left Tsinghua University. If you need these files, please contact me (poseidonchan@icloud.com).

## Setup

Expand Down

0 comments on commit e0392b9

Please sign in to comment.