Skip to content

Commit

Permalink
update refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeLippincott committed Mar 5, 2024
1 parent 00d7eaa commit c23cd9e
Show file tree
Hide file tree
Showing 16 changed files with 69 additions and 4,891 deletions.
737 changes: 0 additions & 737 deletions figures/S10/scripts/S11.r

This file was deleted.

28 changes: 13 additions & 15 deletions figures/S11/notebooks/S11.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
},
"outputs": [],
"source": [
"suppressWarnings(suppressPackageStartupMessages(library(ggplot2)))\n",
"suppressWarnings(suppressPackageStartupMessages(library(platetools)))\n",
"suppressWarnings(suppressPackageStartupMessages(library(gridExtra)))\n",
"suppressWarnings(suppressPackageStartupMessages(library(cowplot)))\n",
"suppressWarnings(suppressPackageStartupMessages(library(viridis)))\n",
"suppressWarnings(suppressPackageStartupMessages(library(argparse)))\n",
"suppressWarnings(suppressPackageStartupMessages(library(patchwork)))\n",
"suppressWarnings(suppressPackageStartupMessages(library(arrow)))\n",
"suppressWarnings(suppressPackageStartupMessages(library(dplyr)))"
"suppressWarnings(suppressPackageStartupMessages(library(ggplot2))) # plotting\n",
"suppressWarnings(suppressPackageStartupMessages(library(platetools))) # plotting\n",
"suppressWarnings(suppressPackageStartupMessages(library(gridExtra))) # plot assembly\n",
"suppressWarnings(suppressPackageStartupMessages(library(cowplot))) # plot assembly\n",
"suppressWarnings(suppressPackageStartupMessages(library(viridis))) # color palettes\n",
"suppressWarnings(suppressPackageStartupMessages(library(argparse))) # command line arguments\n",
"suppressWarnings(suppressPackageStartupMessages(library(patchwork))) # plot assembly\n",
"suppressWarnings(suppressPackageStartupMessages(library(arrow))) # reading parquet files\n",
"suppressWarnings(suppressPackageStartupMessages(library(dplyr))) # data manipulation"
]
},
{
Expand Down Expand Up @@ -338,15 +338,13 @@
],
"source": [
"# set path to the PBMC metadata file\n",
"metadata_file_path_PBMC <-file.path(\n",
"metadata_file_path_PBMC <- file.path(\n",
" \"..\",\n",
" \"..\",\n",
" \"..\",\n",
" \"data\",\n",
" \"PBMC_preprocessed_sc_norm.parquet\"\n",
")\n",
"# load the metadata file via arrow \n",
"# metadata_file <- arrow::read_parquet(metadata_file_path)\n",
"\n",
"# load via arrow with certain columns\n",
"metadata_file_PBMC <- arrow::read_parquet(\n",
Expand All @@ -361,7 +359,7 @@
"\n",
"# SHSY5Y\n",
"# set path to the SHSY5Y metadata file\n",
"metadata_file_path_SHSY5Y <-file.path(\n",
"metadata_file_path_SHSY5Y <- file.path(\n",
" \"..\",\n",
" \"..\",\n",
" \"..\",\n",
Expand Down Expand Up @@ -547,7 +545,7 @@
" replacement = \"pool\",\n",
" x = metadata_file_PBMC$label\n",
")\n",
"# aggreagate the metadata via Metadata_Well\n",
"# aggregate the metadata via Metadata_Well\n",
"metadata_file_PBMC <- metadata_file_PBMC %>%\n",
" group_by(Metadata_Well, Metadata_cell_type, label) %>%\n",
" summarize(\n",
Expand All @@ -574,7 +572,7 @@
" replacement = \"pool\",\n",
" x = metadata_file_SHSY5Y$label\n",
")\n",
"# aggreagate the metadata via Metadata_Well\n",
"# aggregate the metadata via Metadata_Well\n",
"metadata_file_SHSY5Y <- metadata_file_SHSY5Y %>%\n",
" group_by(Metadata_Well, Metadata_cell_type, label) %>%\n",
" summarize(\n",
Expand Down
28 changes: 13 additions & 15 deletions figures/S11/scripts/S11.r
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
suppressWarnings(suppressPackageStartupMessages(library(ggplot2)))
suppressWarnings(suppressPackageStartupMessages(library(platetools)))
suppressWarnings(suppressPackageStartupMessages(library(gridExtra)))
suppressWarnings(suppressPackageStartupMessages(library(cowplot)))
suppressWarnings(suppressPackageStartupMessages(library(viridis)))
suppressWarnings(suppressPackageStartupMessages(library(argparse)))
suppressWarnings(suppressPackageStartupMessages(library(patchwork)))
suppressWarnings(suppressPackageStartupMessages(library(arrow)))
suppressWarnings(suppressPackageStartupMessages(library(dplyr)))
suppressWarnings(suppressPackageStartupMessages(library(ggplot2))) # plotting
suppressWarnings(suppressPackageStartupMessages(library(platetools))) # plotting
suppressWarnings(suppressPackageStartupMessages(library(gridExtra))) # plot assembly
suppressWarnings(suppressPackageStartupMessages(library(cowplot))) # plot assembly
suppressWarnings(suppressPackageStartupMessages(library(viridis))) # color palettes
suppressWarnings(suppressPackageStartupMessages(library(argparse))) # command line arguments
suppressWarnings(suppressPackageStartupMessages(library(patchwork))) # plot assembly
suppressWarnings(suppressPackageStartupMessages(library(arrow))) # reading parquet files
suppressWarnings(suppressPackageStartupMessages(library(dplyr))) # data manipulation

# define the base directory
base_dir <- file.path(
Expand Down Expand Up @@ -56,15 +56,13 @@ head(index_file_SHSY5Y,2)


# set path to the PBMC metadata file
metadata_file_path_PBMC <-file.path(
metadata_file_path_PBMC <- file.path(
"..",
"..",
"..",
"data",
"PBMC_preprocessed_sc_norm.parquet"
)
# load the metadata file via arrow
# metadata_file <- arrow::read_parquet(metadata_file_path)

# load via arrow with certain columns
metadata_file_PBMC <- arrow::read_parquet(
Expand All @@ -79,7 +77,7 @@ head(metadata_file_PBMC)

# SHSY5Y
# set path to the SHSY5Y metadata file
metadata_file_path_SHSY5Y <-file.path(
metadata_file_path_SHSY5Y <- file.path(
"..",
"..",
"..",
Expand Down Expand Up @@ -117,7 +115,7 @@ metadata_file_PBMC$label <- gsub(
replacement = "pool",
x = metadata_file_PBMC$label
)
# aggreagate the metadata via Metadata_Well
# aggregate the metadata via Metadata_Well
metadata_file_PBMC <- metadata_file_PBMC %>%
group_by(Metadata_Well, Metadata_cell_type, label) %>%
summarize(
Expand All @@ -144,7 +142,7 @@ metadata_file_SHSY5Y$label <- gsub(
replacement = "pool",
x = metadata_file_SHSY5Y$label
)
# aggreagate the metadata via Metadata_Well
# aggregate the metadata via Metadata_Well
metadata_file_SHSY5Y <- metadata_file_SHSY5Y %>%
group_by(Metadata_Well, Metadata_cell_type, label) %>%
summarize(
Expand Down
Loading

0 comments on commit c23cd9e

Please sign in to comment.