Skip to content

Commit

Permalink
Merge pull request #42 from broadinstitute/add-new-batches
Browse files Browse the repository at this point in the history
Add new batches
  • Loading branch information
shntnu authored Oct 20, 2024
2 parents b0922ca + 04d29dd commit e07a625
Show file tree
Hide file tree
Showing 39 changed files with 50,351 additions and 1,839 deletions.
35 changes: 26 additions & 9 deletions 1.run-workflows/3.select_images_to_print.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ load_data <-
recursive = T
) %>%
map_df(function(filename) {
df <- read_csv(filename)
df <- read_csv(filename, show_col_types = FALSE)
df <- df %>% mutate(Metadata_Batch = str_split(filename, "/")[[1]][2])
})
Expand Down Expand Up @@ -59,9 +59,11 @@ datasets <-
tribble(
~batch, ~plate,
"NCP_STEM_1", "BR_NCP_STEM_1",
"NCP_PROGENITORS_1", "BR_NCP_PROGENITORS_1",
"NCP_PILOT_3", "BR_NCP_PILOT_3",
"NCP_PILOT_3B", "MAtt_ICC_test"
"NCP_PROGENITORS_1", "BR00127194",
"2022_03_03_NCP_NEURONS_2_20x", "BR00132672",
"2022_03_03_NCP_NEURONS_2_20x", "BR00132673",
"2022-08-07_batch", "Plate1_PE_PP96",
"2022-08-07_batch", "PE_PP_Plate2"
)
metadata <-
Expand All @@ -70,6 +72,7 @@ metadata <-
function(batch, plate) {
read_tsv(
file.path("metadata", glue("{batch}/platemap/{plate}.txt")),
show_col_types = FALSE
) %>%
mutate(Batch = batch) %>%
distinct()
Expand All @@ -96,7 +99,7 @@ set.seed(5)
metadata_sampled <-
metadata %>%
group_by(Metadata_Batch, Metadata_line_ID, Metadata_line_condition, Metadata_compound_ID, Metadata_plating_density) %>%
group_by(Metadata_Batch, Metadata_line_ID, Metadata_line_condition, Metadata_plating_density) %>%
sample_n(1) %>%
ungroup()
```
Expand All @@ -115,7 +118,7 @@ filenames_header <- paste0("FileName_Orig", channels)
images <-
load_data %>%
select(Metadata_Batch, Metadata_Plate, Metadata_Well, Metadata_Row, Metadata_FieldID, matches("^URL_"), one_of(filenames_header)) %>%
inner_join(metadata_sampled, by = c("Metadata_Plate", "Metadata_Well")) %>%
inner_join(metadata_sampled, by = c("Metadata_Batch", "Metadata_Plate", "Metadata_Well")) %>%
filter(Metadata_FieldID %in% fieldIDs) %>%
select(matches("^Metadata"), matches("^URL"), matches("^FileName_Orig"))
Expand All @@ -137,6 +140,20 @@ images %>%
write_csv("data/sample_images_metadata.csv")
```

```{r}
images %>%
distinct(Metadata_Batch, Metadata_Plate, Metadata_Well, Metadata_line_ID, Metadata_line_condition, Metadata_plating_density) %>%
group_by(Metadata_Batch, Metadata_Plate, Metadata_line_ID, Metadata_line_condition, Metadata_plating_density) %>%
tally() %>%
group_by(n) %>%
tally(name = "n_unique_conditions")
```

```{r}
metadata_sampled %>% count()
```


Run this on command line to download the images:

```{sh eval=FALSE}
Expand Down Expand Up @@ -176,11 +193,11 @@ E.g. if the pipeline was configured differently, we'd have different values in `

Only `NCP_PILOT_3B` and `NCP_PILOT_1` have 3 planes

```{r}
```{r eval=FALSE}
load_data %>% distinct(Metadata_Batch, Metadata_PlaneID) %>% filter(Metadata_PlaneID > 1)
```

```{r}
```{r eval=FALSE}
plane_batch <-
tribble(~Metadata_Batch, ~ Metadata_PlaneID_outline,
"NCP_PILOT_3B", 3,
Expand Down Expand Up @@ -224,7 +241,7 @@ outline_images %>%
write_csv("data/sample_images_outline.csv")
```

```{r results='asis'}
```{r eval=FALSE, results='asis'}
outline_images %>%
mutate(URL_Outline = str_c("[Outline](", URL_Outline, ")")) %>%
select(Metadata_Batch, Metadata_plating_density, Metadata_line_condition, Metadata_compound_ID, URL_Outline, everything()) %>%
Expand Down
3,000 changes: 1,600 additions & 1,400 deletions 1.run-workflows/data/sample_images.csv

Large diffs are not rendered by default.

634 changes: 337 additions & 297 deletions 1.run-workflows/data/sample_images_metadata.csv

Large diffs are not rendered by default.

188 changes: 55 additions & 133 deletions 1.run-workflows/knit_notebooks/3.select_images_to_print.md

Large diffs are not rendered by default.

Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

3,457 changes: 3,457 additions & 0 deletions 1.run-workflows/load_data_csv/NCP_PROGENITORS_1/BR00127194/load_data.csv

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Assay_Plate_Barcode,Plate_Map_Name
PE_PP_Plate2,2022-08-07_batch_METADATA
Plate1_PE_PP96,2022-08-07_batch_METADATA
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
plate_map_name well_position METADATA_SAMPLE_ID METADATA_DENSITY METADATA_CONDITION METADATA_SOURCE
2022-08-07_batch_METADATA A01 1 5000 CONTROL HUMAN
2022-08-07_batch_METADATA A02 30 5000 DELETION HUMAN
2022-08-07_batch_METADATA A03 9 5000 CONTROL HUMAN
2022-08-07_batch_METADATA A04 26 5000 DELETION ISOGENIC
2022-08-07_batch_METADATA A05 4 5000 CONTROL HUMAN
2022-08-07_batch_METADATA A06 34 5000 DELETION HUMAN
2022-08-07_batch_METADATA A07 15 5000 CONTROL HUMAN
2022-08-07_batch_METADATA A08 36 5000 DELETION HUMAN
2022-08-07_batch_METADATA A09 2 5000 CONTROL HUMAN
2022-08-07_batch_METADATA A10 16 5000 CONTROL HUMAN
2022-08-07_batch_METADATA A11 20 5000 CONTROL HUMAN
2022-08-07_batch_METADATA A12 12 5000 CONTROL HUMAN
2022-08-07_batch_METADATA B01 17 5000 CONTROL HUMAN
2022-08-07_batch_METADATA B02 39 5000 DELETION HUMAN
2022-08-07_batch_METADATA B03 37 5000 DELETION HUMAN
2022-08-07_batch_METADATA B04 42 5000 DELETION HUMAN
2022-08-07_batch_METADATA B05 7 5000 CONTROL HUMAN
2022-08-07_batch_METADATA B06 29 5000 DELETION HUMAN
2022-08-07_batch_METADATA B07 11 5000 CONTROL HUMAN
2022-08-07_batch_METADATA B08 38 5000 DELETION HUMAN
2022-08-07_batch_METADATA B09 43 5000 DELETION HUMAN
2022-08-07_batch_METADATA B10 18 5000 CONTROL HUMAN
2022-08-07_batch_METADATA B11 6 5000 CONTROL HUMAN
2022-08-07_batch_METADATA B12 29 5000 DELETION HUMAN
2022-08-07_batch_METADATA C01 27 5000 DELETION HUMAN
2022-08-07_batch_METADATA C02 41 5000 DELETION HUMAN
2022-08-07_batch_METADATA C03 32 5000 DELETION HUMAN
2022-08-07_batch_METADATA C04 46 5000 DELETION HUMAN
2022-08-07_batch_METADATA C05 1 5000 CONTROL HUMAN
2022-08-07_batch_METADATA C06 33 5000 DELETION HUMAN
2022-08-07_batch_METADATA C07 14 5000 CONTROL HUMAN
2022-08-07_batch_METADATA C08 9 5000 CONTROL HUMAN
2022-08-07_batch_METADATA C09 23 5000 CONTROL ISOGENIC
2022-08-07_batch_METADATA C10 22 5000 CONTROL HUMAN
2022-08-07_batch_METADATA C11 3 5000 CONTROL HUMAN
2022-08-07_batch_METADATA C12 28 5000 DELETION HUMAN
2022-08-07_batch_METADATA D01 5 5000 CONTROL HUMAN
2022-08-07_batch_METADATA D02 35 5000 DELETION HUMAN
2022-08-07_batch_METADATA D03 13 5000 CONTROL HUMAN
2022-08-07_batch_METADATA D04 19 5000 CONTROL HUMAN
2022-08-07_batch_METADATA D05 24 5000 CONTROL ISOGENIC
2022-08-07_batch_METADATA D06 17 5000 CONTROL HUMAN
2022-08-07_batch_METADATA D07 21 5000 CONTROL HUMAN
2022-08-07_batch_METADATA D08 28 5000 DELETION HUMAN
2022-08-07_batch_METADATA D09 31 5000 DELETION HUMAN
2022-08-07_batch_METADATA D10 10 5000 CONTROL HUMAN
2022-08-07_batch_METADATA D11 45 5000 DELETION HUMAN
2022-08-07_batch_METADATA D12 11 5000 CONTROL HUMAN
2022-08-07_batch_METADATA E01 24 5000 CONTROL ISOGENIC
2022-08-07_batch_METADATA E02 38 5000 DELETION HUMAN
2022-08-07_batch_METADATA E03 44 5000 DELETION HUMAN
2022-08-07_batch_METADATA E04 47 5000 DELETION HUMAN
2022-08-07_batch_METADATA E05 20 5000 CONTROL HUMAN
2022-08-07_batch_METADATA E06 12 5000 CONTROL HUMAN
2022-08-07_batch_METADATA E07 47 5000 DELETION HUMAN
2022-08-07_batch_METADATA E08 5 5000 CONTROL HUMAN
2022-08-07_batch_METADATA E09 40 5000 DELETION HUMAN
2022-08-07_batch_METADATA E10 27 5000 DELETION HUMAN
2022-08-07_batch_METADATA E11 42 5000 DELETION HUMAN
2022-08-07_batch_METADATA E12 19 5000 CONTROL HUMAN
2022-08-07_batch_METADATA F01 6 5000 CONTROL HUMAN
2022-08-07_batch_METADATA F02 40 5000 DELETION HUMAN
2022-08-07_batch_METADATA F03 41 5000 DELETION HUMAN
2022-08-07_batch_METADATA F04 2 5000 CONTROL HUMAN
2022-08-07_batch_METADATA F05 26 5000 DELETION ISOGENIC
2022-08-07_batch_METADATA F06 48 5000 DELETION HUMAN
2022-08-07_batch_METADATA F07 39 5000 DELETION HUMAN
2022-08-07_batch_METADATA F08 48 5000 DELETION HUMAN
2022-08-07_batch_METADATA F09 30 5000 DELETION HUMAN
2022-08-07_batch_METADATA F10 8 5000 CONTROL HUMAN
2022-08-07_batch_METADATA F11 46 5000 DELETION HUMAN
2022-08-07_batch_METADATA F12 32 5000 DELETION HUMAN
2022-08-07_batch_METADATA G01 14 5000 CONTROL HUMAN
2022-08-07_batch_METADATA G02 36 5000 DELETION HUMAN
2022-08-07_batch_METADATA G03 43 5000 DELETION HUMAN
2022-08-07_batch_METADATA G04 16 5000 CONTROL HUMAN
2022-08-07_batch_METADATA G05 45 5000 DELETION HUMAN
2022-08-07_batch_METADATA G06 4 5000 CONTROL HUMAN
2022-08-07_batch_METADATA G07 25 5000 DELETION ISOGENIC
2022-08-07_batch_METADATA G08 34 5000 DELETION HUMAN
2022-08-07_batch_METADATA G09 44 5000 DELETION HUMAN
2022-08-07_batch_METADATA G10 15 5000 CONTROL HUMAN
2022-08-07_batch_METADATA G11 37 5000 DELETION HUMAN
2022-08-07_batch_METADATA G12 7 5000 CONTROL HUMAN
2022-08-07_batch_METADATA H01 10 5000 CONTROL HUMAN
2022-08-07_batch_METADATA H02 25 5000 DELETION ISOGENIC
2022-08-07_batch_METADATA H03 8 5000 CONTROL HUMAN
2022-08-07_batch_METADATA H04 31 5000 DELETION HUMAN
2022-08-07_batch_METADATA H05 18 5000 CONTROL HUMAN
2022-08-07_batch_METADATA H06 21 5000 CONTROL HUMAN
2022-08-07_batch_METADATA H07 3 5000 CONTROL HUMAN
2022-08-07_batch_METADATA H08 23 5000 CONTROL ISOGENIC
2022-08-07_batch_METADATA H09 33 5000 DELETION HUMAN
2022-08-07_batch_METADATA H10 13 5000 CONTROL HUMAN
2022-08-07_batch_METADATA H11 35 5000 DELETION HUMAN
2022-08-07_batch_METADATA H12 22 5000 CONTROL HUMAN
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
plate_map_name well_position line_ID plating_density line_condition line_source
PE_PP_Plate2 A01 1 5000 control human
PE_PP_Plate2 A02 30 5000 deletion human
PE_PP_Plate2 A03 9 5000 control human
PE_PP_Plate2 A04 26 5000 deletion isogenic
PE_PP_Plate2 A05 4 5000 control human
PE_PP_Plate2 A06 34 5000 deletion human
PE_PP_Plate2 A07 15 5000 control human
PE_PP_Plate2 A08 36 5000 deletion human
PE_PP_Plate2 A09 2 5000 control human
PE_PP_Plate2 A10 16 5000 control human
PE_PP_Plate2 A11 20 5000 control human
PE_PP_Plate2 A12 12 5000 control human
PE_PP_Plate2 B01 17 5000 control human
PE_PP_Plate2 B02 39 5000 deletion human
PE_PP_Plate2 B03 37 5000 deletion human
PE_PP_Plate2 B04 42 5000 deletion human
PE_PP_Plate2 B05 7 5000 control human
PE_PP_Plate2 B06 29 5000 deletion human
PE_PP_Plate2 B07 11 5000 control human
PE_PP_Plate2 B08 38 5000 deletion human
PE_PP_Plate2 B09 43 5000 deletion human
PE_PP_Plate2 B10 18 5000 control human
PE_PP_Plate2 B11 6 5000 control human
PE_PP_Plate2 B12 29 5000 deletion human
PE_PP_Plate2 C01 27 5000 deletion human
PE_PP_Plate2 C02 41 5000 deletion human
PE_PP_Plate2 C03 32 5000 deletion human
PE_PP_Plate2 C04 46 5000 deletion human
PE_PP_Plate2 C05 1 5000 control human
PE_PP_Plate2 C06 33 5000 deletion human
PE_PP_Plate2 C07 14 5000 control human
PE_PP_Plate2 C08 9 5000 control human
PE_PP_Plate2 C09 23 5000 control isogenic
PE_PP_Plate2 C10 22 5000 control human
PE_PP_Plate2 C11 3 5000 control human
PE_PP_Plate2 C12 28 5000 deletion human
PE_PP_Plate2 D01 5 5000 control human
PE_PP_Plate2 D02 35 5000 deletion human
PE_PP_Plate2 D03 13 5000 control human
PE_PP_Plate2 D04 19 5000 control human
PE_PP_Plate2 D05 24 5000 control isogenic
PE_PP_Plate2 D06 17 5000 control human
PE_PP_Plate2 D07 21 5000 control human
PE_PP_Plate2 D08 28 5000 deletion human
PE_PP_Plate2 D09 31 5000 deletion human
PE_PP_Plate2 D10 10 5000 control human
PE_PP_Plate2 D11 45 5000 deletion human
PE_PP_Plate2 D12 11 5000 control human
PE_PP_Plate2 E01 24 5000 control isogenic
PE_PP_Plate2 E02 38 5000 deletion human
PE_PP_Plate2 E03 44 5000 deletion human
PE_PP_Plate2 E04 47 5000 deletion human
PE_PP_Plate2 E05 20 5000 control human
PE_PP_Plate2 E06 12 5000 control human
PE_PP_Plate2 E07 47 5000 deletion human
PE_PP_Plate2 E08 5 5000 control human
PE_PP_Plate2 E09 40 5000 deletion human
PE_PP_Plate2 E10 27 5000 deletion human
PE_PP_Plate2 E11 42 5000 deletion human
PE_PP_Plate2 E12 19 5000 control human
PE_PP_Plate2 F01 6 5000 control human
PE_PP_Plate2 F02 40 5000 deletion human
PE_PP_Plate2 F03 41 5000 deletion human
PE_PP_Plate2 F04 2 5000 control human
PE_PP_Plate2 F05 26 5000 deletion isogenic
PE_PP_Plate2 F06 48 5000 deletion human
PE_PP_Plate2 F07 39 5000 deletion human
PE_PP_Plate2 F08 48 5000 deletion human
PE_PP_Plate2 F09 30 5000 deletion human
PE_PP_Plate2 F10 8 5000 control human
PE_PP_Plate2 F11 46 5000 deletion human
PE_PP_Plate2 F12 32 5000 deletion human
PE_PP_Plate2 G01 14 5000 control human
PE_PP_Plate2 G02 36 5000 deletion human
PE_PP_Plate2 G03 43 5000 deletion human
PE_PP_Plate2 G04 16 5000 control human
PE_PP_Plate2 G05 45 5000 deletion human
PE_PP_Plate2 G06 4 5000 control human
PE_PP_Plate2 G07 25 5000 deletion isogenic
PE_PP_Plate2 G08 34 5000 deletion human
PE_PP_Plate2 G09 44 5000 deletion human
PE_PP_Plate2 G10 15 5000 control human
PE_PP_Plate2 G11 37 5000 deletion human
PE_PP_Plate2 G12 7 5000 control human
PE_PP_Plate2 H01 10 5000 control human
PE_PP_Plate2 H02 25 5000 deletion isogenic
PE_PP_Plate2 H03 8 5000 control human
PE_PP_Plate2 H04 31 5000 deletion human
PE_PP_Plate2 H05 18 5000 control human
PE_PP_Plate2 H06 21 5000 control human
PE_PP_Plate2 H07 3 5000 control human
PE_PP_Plate2 H08 23 5000 control isogenic
PE_PP_Plate2 H09 33 5000 deletion human
PE_PP_Plate2 H10 13 5000 control human
PE_PP_Plate2 H11 35 5000 deletion human
PE_PP_Plate2 H12 22 5000 control human
Loading

0 comments on commit e07a625

Please sign in to comment.