Skip to content

Commit

Permalink
[Response to Reviewers] Update dimensionality reduction figures (#67)
Browse files Browse the repository at this point in the history
* fix argument and path

* move faceted UMAP to panel A

* update supplementary umap after updating umap in fig2

* add tsne figure notebooks

* add notebook for applying tsne

* fix typo and rerun notebook

* respond to reviewer comments

* remove unused variables and make tsv
  • Loading branch information
gwaybio authored Sep 16, 2024
1 parent 19bb764 commit 7aa47ba
Show file tree
Hide file tree
Showing 23 changed files with 1,288 additions and 229 deletions.
12 changes: 7 additions & 5 deletions 1.split_data/explore_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@
"# Set constants\n",
"feature_spaces = [\"CP\", \"DP\", \"CP_and_DP\"]\n",
"\n",
"output_dir = \"data\"\n",
"output_dir = pathlib.Path(\"data\")\n",
"output_dir.mkdir(exist_ok=True)\n",
"\n",
"output_basename = pathlib.Path(output_dir, \"pairwise_correlations\")"
]
},
Expand Down Expand Up @@ -270,7 +272,7 @@
"source": [
"for feature_space in feature_spaces:\n",
" # Get specific feature sets\n",
" cp_feature_df, cp_label_df = get_X_y_data(labeled_data, dataset=feature_space)\n",
" cp_feature_df, cp_label_df = get_X_y_data(labeled_data, feature_type=feature_space)\n",
"\n",
" # Calculate pairwise correlations between nuclei\n",
" cp_tidy_corr_df = create_tidy_corr_matrix(cp_feature_df, cp_label_df)\n",
Expand All @@ -283,9 +285,9 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python [conda env:phenotypic_profiling]",
"language": "python",
"name": "python3"
"name": "conda-env-phenotypic_profiling-py"
},
"language_info": {
"codemirror_mode": {
Expand All @@ -297,7 +299,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
"version": "3.9.19"
}
},
"nbformat": 4,
Expand Down
6 changes: 4 additions & 2 deletions 1.split_data/scripts/nbconverted/explore_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ def create_tidy_corr_matrix(data_array, labels):
# Set constants
feature_spaces = ["CP", "DP", "CP_and_DP"]

output_dir = "data"
output_dir = pathlib.Path("data")
output_dir.mkdir(exist_ok=True)

output_basename = pathlib.Path(output_dir, "pairwise_correlations")


Expand All @@ -72,7 +74,7 @@ def create_tidy_corr_matrix(data_array, labels):

for feature_space in feature_spaces:
# Get specific feature sets
cp_feature_df, cp_label_df = get_X_y_data(labeled_data, dataset=feature_space)
cp_feature_df, cp_label_df = get_X_y_data(labeled_data, feature_type=feature_space)

# Calculate pairwise correlations between nuclei
cp_tidy_corr_df = create_tidy_corr_matrix(cp_feature_df, cp_label_df)
Expand Down
Loading

0 comments on commit 7aa47ba

Please sign in to comment.