Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update LM and UMAPs #37

Merged
merged 2 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 81 additions & 60 deletions 4.analyze_data/notebooks/UMAP/0.UMAP_coordinates.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@
{
"data": {
"text/plain": [
"['../../../3.processing_features/data/single_cell_profiles/Plate_4_sc_feature_selected.parquet',\n",
" '../../../3.processing_features/data/single_cell_profiles/Plate_1_sc_feature_selected.parquet',\n",
" '../../../3.processing_features/data/single_cell_profiles/Plate_2_sc_feature_selected.parquet',\n",
"['../../../3.processing_features/data/single_cell_profiles/Plate_1_sc_feature_selected.parquet',\n",
" '../../../3.processing_features/data/single_cell_profiles/Plate_3_prime_sc_feature_selected.parquet',\n",
" '../../../3.processing_features/data/single_cell_profiles/Plate_4_sc_feature_selected.parquet',\n",
" '../../../3.processing_features/data/single_cell_profiles/Plate_5_sc_feature_selected.parquet',\n",
" '../../../3.processing_features/data/single_cell_profiles/Plate_2_sc_feature_selected.parquet',\n",
" '../../../3.processing_features/data/single_cell_profiles/Plate_3_sc_feature_selected.parquet']"
]
},
Expand Down Expand Up @@ -98,13 +99,18 @@
"name": "stdout",
"output_type": "stream",
"text": [
"dict_keys(['Plate_4_sc_feature_selected.parquet', 'Plate_1_sc_feature_selected.parquet', 'Plate_2_sc_feature_selected.parquet', 'Plate_3_prime_sc_feature_selected.parquet', 'Plate_3_sc_feature_selected.parquet'])\n"
"dict_keys(['Plate_1_sc_feature_selected.parquet', 'Plate_3_prime_sc_feature_selected.parquet', 'Plate_4_sc_feature_selected.parquet', 'Plate_5_sc_feature_selected.parquet', 'Plate_2_sc_feature_selected.parquet', 'Plate_3_sc_feature_selected.parquet'])\n"
]
},
{
"data": {
"text/plain": [
"[(7502, 1170), (241, 849), (1714, 856), (14495, 1137), (18503, 1166)]"
"[(241, 849),\n",
" (7300, 1140),\n",
" (7308, 1163),\n",
" (7759, 1153),\n",
" (1714, 856),\n",
" (18038, 1168)]"
]
},
"execution_count": 4,
Expand Down Expand Up @@ -139,75 +145,90 @@
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/tomkinsj/miniconda3/envs/python_analysis_nf1/lib/python3.9/site-packages/umap/umap_.py:1943: UserWarning: n_jobs value -1 overridden to 1 by setting random_state. Use no seed for parallelism.\n",
"/home/jenna/mambaforge/envs/python_analysis_nf1/lib/python3.9/site-packages/umap/umap_.py:1943: UserWarning: n_jobs value -1 overridden to 1 by setting random_state. Use no seed for parallelism.\n",
" warn(f\"n_jobs value {self.n_jobs} overridden to 1 by setting random_state. Use no seed for parallelism.\")\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"(7502, 2)\n"
"(241, 2)\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/tomkinsj/miniconda3/envs/python_analysis_nf1/lib/python3.9/site-packages/umap/umap_.py:1943: UserWarning: n_jobs value -1 overridden to 1 by setting random_state. Use no seed for parallelism.\n",
"/home/jenna/mambaforge/envs/python_analysis_nf1/lib/python3.9/site-packages/umap/umap_.py:1943: UserWarning: n_jobs value -1 overridden to 1 by setting random_state. Use no seed for parallelism.\n",
" warn(f\"n_jobs value {self.n_jobs} overridden to 1 by setting random_state. Use no seed for parallelism.\")\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"(241, 2)\n"
"(7300, 2)\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/tomkinsj/miniconda3/envs/python_analysis_nf1/lib/python3.9/site-packages/umap/umap_.py:1943: UserWarning: n_jobs value -1 overridden to 1 by setting random_state. Use no seed for parallelism.\n",
"/home/jenna/mambaforge/envs/python_analysis_nf1/lib/python3.9/site-packages/umap/umap_.py:1943: UserWarning: n_jobs value -1 overridden to 1 by setting random_state. Use no seed for parallelism.\n",
" warn(f\"n_jobs value {self.n_jobs} overridden to 1 by setting random_state. Use no seed for parallelism.\")\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"(1714, 2)\n"
"(7308, 2)\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/tomkinsj/miniconda3/envs/python_analysis_nf1/lib/python3.9/site-packages/umap/umap_.py:1943: UserWarning: n_jobs value -1 overridden to 1 by setting random_state. Use no seed for parallelism.\n",
"/home/jenna/mambaforge/envs/python_analysis_nf1/lib/python3.9/site-packages/umap/umap_.py:1943: UserWarning: n_jobs value -1 overridden to 1 by setting random_state. Use no seed for parallelism.\n",
" warn(f\"n_jobs value {self.n_jobs} overridden to 1 by setting random_state. Use no seed for parallelism.\")\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"(14495, 2)\n"
"(7759, 2)\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/Users/tomkinsj/miniconda3/envs/python_analysis_nf1/lib/python3.9/site-packages/umap/umap_.py:1943: UserWarning: n_jobs value -1 overridden to 1 by setting random_state. Use no seed for parallelism.\n",
"/home/jenna/mambaforge/envs/python_analysis_nf1/lib/python3.9/site-packages/umap/umap_.py:1943: UserWarning: n_jobs value -1 overridden to 1 by setting random_state. Use no seed for parallelism.\n",
" warn(f\"n_jobs value {self.n_jobs} overridden to 1 by setting random_state. Use no seed for parallelism.\")\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"(18503, 2)\n"
"(1714, 2)\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/home/jenna/mambaforge/envs/python_analysis_nf1/lib/python3.9/site-packages/umap/umap_.py:1943: UserWarning: n_jobs value -1 overridden to 1 by setting random_state. Use no seed for parallelism.\n",
" warn(f\"n_jobs value {self.n_jobs} overridden to 1 by setting random_state. Use no seed for parallelism.\")\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"(18038, 2)\n"
]
}
],
Expand Down Expand Up @@ -293,68 +314,68 @@
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>9684</th>\n",
" <td>C8</td>\n",
" <td>2</td>\n",
" <td>640</td>\n",
" <td>HET</td>\n",
" <td>0.044605</td>\n",
" <td>1.602842</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4861</th>\n",
" <td>F4</td>\n",
" <td>3</td>\n",
" <td>361</td>\n",
" <th>980</th>\n",
" <td>B3</td>\n",
" <td>23</td>\n",
" <td>297</td>\n",
" <td>WT</td>\n",
" <td>0.316304</td>\n",
" <td>3.236223</td>\n",
" <td>1.599025</td>\n",
" <td>5.475614</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7331</th>\n",
" <td>C7</td>\n",
" <td>13</td>\n",
" <td>331</td>\n",
" <td>HET</td>\n",
" <td>1.450350</td>\n",
" <td>2.152666</td>\n",
" <th>15023</th>\n",
" <td>B12</td>\n",
" <td>6</td>\n",
" <td>531</td>\n",
" <td>Null</td>\n",
" <td>-1.793289</td>\n",
" <td>0.987861</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6033</th>\n",
" <td>B6</td>\n",
" <td>6</td>\n",
" <td>141</td>\n",
" <td>HET</td>\n",
" <td>2.589996</td>\n",
" <td>2.678065</td>\n",
" <th>4946</th>\n",
" <td>G4</td>\n",
" <td>23</td>\n",
" <td>386</td>\n",
" <td>WT</td>\n",
" <td>0.444975</td>\n",
" <td>-2.371571</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13543</th>\n",
" <td>G10</td>\n",
" <td>17</td>\n",
" <td>115</td>\n",
" <th>17693</th>\n",
" <td>G12</td>\n",
" <td>1</td>\n",
" <td>481</td>\n",
" <td>Null</td>\n",
" <td>1.953981</td>\n",
" <td>0.519260</td>\n",
" <td>0.670747</td>\n",
" <td>2.854921</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7156</th>\n",
" <td>D7</td>\n",
" <td>16</td>\n",
" <td>235</td>\n",
" <td>HET</td>\n",
" <td>0.737558</td>\n",
" <td>5.601034</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Metadata_Well Metadata_Site Metadata_number_of_singlecells \\\n",
"9684 C8 2 640 \n",
"4861 F4 3 361 \n",
"7331 C7 13 331 \n",
"6033 B6 6 141 \n",
"13543 G10 17 115 \n",
"980 B3 23 297 \n",
"15023 B12 6 531 \n",
"4946 G4 23 386 \n",
"17693 G12 1 481 \n",
"7156 D7 16 235 \n",
"\n",
" Metadata_genotype UMAP0 UMAP1 \n",
"9684 HET 0.044605 1.602842 \n",
"4861 WT 0.316304 3.236223 \n",
"7331 HET 1.450350 2.152666 \n",
"6033 HET 2.589996 2.678065 \n",
"13543 Null 1.953981 0.519260 "
"980 WT 1.599025 5.475614 \n",
"15023 Null -1.793289 0.987861 \n",
"4946 WT 0.444975 -2.371571 \n",
"17693 Null 0.670747 2.854921 \n",
"7156 HET 0.737558 5.601034 "
]
},
"execution_count": 6,
Expand Down
10 changes: 7 additions & 3 deletions 4.analyze_data/notebooks/UMAP/1.vis_UMAP.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@
"output_type": "stream",
"text": [
"Warning message:\n",
"\"package 'ggplot2' was built under R version 4.2.3\"\n"
"package ggplot2 was built under R version 4.2.3\n"
]
}
],
"source": [
"suppressPackageStartupMessages(library(ggplot2)) #plotting\n",
"suppressPackageStartupMessages(library(dplyr)) #work with data frames\n"
"suppressPackageStartupMessages(library(dplyr)) #work with data frames"
]
},
{
Expand Down Expand Up @@ -62,6 +62,7 @@
"[3] \"results/UMAP_Plate_3_prime_sc_feature_selected.tsv\"\n",
"[4] \"results/UMAP_Plate_3_sc_feature_selected.tsv\" \n",
"[5] \"results/UMAP_Plate_4_sc_feature_selected.tsv\" \n",
"[6] \"results/UMAP_Plate_5_sc_feature_selected.tsv\" \n",
"$Plate_1\n",
"[1] \"figures/UMAP_Plate_1\"\n",
"\n",
Expand All @@ -76,6 +77,9 @@
"\n",
"$Plate_4\n",
"[1] \"figures/UMAP_Plate_4\"\n",
"\n",
"$Plate_5\n",
"[1] \"figures/UMAP_Plate_5\"\n",
"\n"
]
}
Expand Down Expand Up @@ -212,7 +216,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "r"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 4.analyze_data/notebooks/UMAP/figures/UMAP_Plate_1_genotype.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 4.analyze_data/notebooks/UMAP/figures/UMAP_Plate_2_genotype.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified 4.analyze_data/notebooks/UMAP/figures/UMAP_Plate_3_genotype.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading