This repository was archived by the owner on Oct 14, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed
Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -275,6 +275,30 @@ metadata |>
275275knitr::include_graphics("man/figures/HLA_A_tissue_plot.png")
276276```
277277
278+ ## Obtain Unharmonised Metadata
279+
280+ Various metadata fields are * not* common between datasets, so it does not
281+ make sense for these to live in the main metadata table. However, we can
282+ obtain it using the ` get_unharmonised_metadata() ` function.
283+
284+ Note how this table has additional columns that are not in the normal metadata:
285+
286+ ``` {r}
287+ dataset = "838ea006-2369-4e2c-b426-b2a744a2b02b"
288+ unharmonised_meta = get_unharmonised_metadata(dataset)
289+ unharmonised_tbl = dplyr::collect(unharmonised_meta[[dataset]])
290+ unharmonised_tbl
291+ ```
292+
293+ If we have metadata from the normal metadata table that is from a single dataset,
294+ we can even join this additional metadata into one big data frame:
295+ ``` {r}
296+ harmonised_meta = get_metadata() |> dplyr::filter(file_id == dataset) |> dplyr::collect()
297+ dplyr::left_join(harmonised_meta, unharmonised_tbl, by=c("file_id", "cell_"))
298+ ```
299+
300+
301+
278302# Cell metadata
279303
280304Dataset-specific columns (definitions available at cellxgene.cziscience.com)
Original file line number Diff line number Diff line change @@ -293,6 +293,28 @@ metadata |>
293293knitr::include_graphics("../man/figures/HLA_A_tissue_plot.png")
294294```
295295
296+ ## Obtain Unharmonised Metadata
297+
298+ Various metadata fields are * not* common between datasets, so it does not
299+ make sense for these to live in the main metadata table. However, we can
300+ obtain it using the ` get_unharmonised_metadata() ` function.
301+
302+ Note how this table has additional columns that are not in the normal metadata:
303+
304+ ``` {r}
305+ dataset = "838ea006-2369-4e2c-b426-b2a744a2b02b"
306+ unharmonised_meta = get_unharmonised_metadata(dataset)
307+ unharmonised_tbl = dplyr::collect(unharmonised_meta[[dataset]])
308+ unharmonised_tbl
309+ ```
310+
311+ If we have metadata from the normal metadata table that is from a single dataset,
312+ we can even join this additional metadata into one big data frame:
313+ ``` {r}
314+ harmonised_meta = get_metadata() |> dplyr::filter(file_id == dataset) |> dplyr::collect()
315+ dplyr::left_join(harmonised_meta, unharmonised_tbl, by=c("file_id", "cell_"))
316+ ```
317+
296318# Cell metadata
297319
298320Dataset-specific columns (definitions available at cellxgene.cziscience.com)
You can’t perform that action at this time.
0 commit comments