Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lzhus committed Dec 2, 2020
1 parent 8168bcb commit 0dbe8df
Showing 1 changed file with 13 additions and 71 deletions.
84 changes: 13 additions & 71 deletions latest_notebook/Case-study_Mouse-intestinal-epithelium_1906.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"name": "stdout",
"text": [
"scanpy==1.4.3+80.g740c557 anndata==0.6.22rc1 umap==0.3.9 numpy==1.16.2 scipy==1.3.0 pandas==0.24.1 scikit-learn==0.20.2 statsmodels==0.10.0rc2 python-igraph==0.7.1 louvain==0.6.1\n"
"scanpy==1.4.6 anndata==0.7.1 umap==0.4.0 numpy==1.18.2 scipy==1.4.1 pandas==1.0.3 scikit-learn==0.22.2.post1 statsmodels==0.11.1 python-igraph==0.8.0 louvain==0.6.1\n"
]
}
],
Expand Down Expand Up @@ -204,8 +204,8 @@
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"name": "stdout",
"text": [
"... reading from cache file cache/..-data-Haber-et-al_mouse-intestinal-epithelium-GSE92332_RAW-GSM2836573_Regional_Duo_M1_matrix.h5ad\n"
]
Expand Down Expand Up @@ -247,75 +247,16 @@
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"... reading from cache file cache/..-data-Haber-et-al_mouse-intestinal-epithelium-GSE92332_RAW-GSM2836574_Regional_Duo_M2_matrix.h5ad\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Making variable names unique for controlled concatenation.\n",
"Observation names are not unique. To make them unique, call `.obs_names_make_unique`.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"... reading from cache file cache/..-data-Haber-et-al_mouse-intestinal-epithelium-GSE92332_RAW-GSM2836575_Regional_Jej_M1_matrix.h5ad\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Observation names are not unique. To make them unique, call `.obs_names_make_unique`.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"... reading from cache file cache/..-data-Haber-et-al_mouse-intestinal-epithelium-GSE92332_RAW-GSM2836576_Regional_Jej_M2_matrix.h5ad\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Observation names are not unique. To make them unique, call `.obs_names_make_unique`.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"... reading from cache file cache/..-data-Haber-et-al_mouse-intestinal-epithelium-GSE92332_RAW-GSM2836577_Regional_Il_M1_matrix.h5ad\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Observation names are not unique. To make them unique, call `.obs_names_make_unique`.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"... reading from cache file cache/..-data-Haber-et-al_mouse-intestinal-epithelium-GSE92332_RAW-GSM2836574_Regional_Duo_M2_matrix.h5ad\n",
"Making variable names unique for controlled concatenation.\n",
"... reading from cache file cache/..-data-Haber-et-al_mouse-intestinal-epithelium-GSE92332_RAW-GSM2836575_Regional_Jej_M1_matrix.h5ad\n",
"... reading from cache file cache/..-data-Haber-et-al_mouse-intestinal-epithelium-GSE92332_RAW-GSM2836576_Regional_Jej_M2_matrix.h5ad\n",
"... reading from cache file cache/..-data-Haber-et-al_mouse-intestinal-epithelium-GSE92332_RAW-GSM2836577_Regional_Il_M1_matrix.h5ad\n",
"... reading from cache file cache/..-data-Haber-et-al_mouse-intestinal-epithelium-GSE92332_RAW-GSM2836578_Regional_Il_M2_matrix.h5ad\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"Observation names are not unique. To make them unique, call `.obs_names_make_unique`.\n"
]
}
],
"source": [
Expand Down Expand Up @@ -351,8 +292,9 @@
"\n",
" # Concatenate to main adata object\n",
" adata = adata.concatenate(adata_tmp, batch_key='sample_id')\n",
" adata.var['gene_id'] = adata.var['gene_id-1']\n",
" adata.var.drop(columns = ['gene_id-1', 'gene_id-0'], inplace=True)\n",
" if 'gene_id_1' in adata.var.columns:\n",
" adata.var['gene_id'] = adata.var['gene_id-1']\n",
" adata.var.drop(columns = ['gene_id-1', 'gene_id-0'], inplace=True)\n",
" adata.obs.drop(columns=['sample_id'], inplace=True)\n",
" adata.obs_names = [c.split(\"-\")[0] for c in adata.obs_names]\n",
" adata.obs_names_make_unique(join='_')"
Expand Down Expand Up @@ -6532,7 +6474,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.7"
"version": "3.7.7-final"
},
"toc": {
"base_numbering": "0",
Expand Down Expand Up @@ -6584,4 +6526,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}

0 comments on commit 0dbe8df

Please sign in to comment.