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

Add cellassign organs to report #609

Merged
merged 9 commits into from
Dec 7, 2023
17 changes: 9 additions & 8 deletions templates/qc_report/celltypes_supplemental_report.rmd
Original file line number Diff line number Diff line change
Expand Up @@ -339,18 +339,19 @@ if (has_singler) {
}

if (has_cellassign) {
tissue_type <- stringr::word(
# eg, "blood-compartment"
metadata(processed_sce)$cellassign_reference,
1,
sep = "-"
)

organs <- metadata(processed_sce)$cellassign_reference_organs |>
stringr::str_to_lower()
# split up and add an `and` before the final organ
organs_string <- stringr::str_split_1(organs, pattern = ", ") |>
stringr::str_flatten_comma(last = ", and ")

ref_name <- metadata(processed_sce)$cellassign_reference

methods_text <- glue::glue(
"{methods_text}
* Annotations from [`CellAssign`](https://github.com/Irrationone/cellassign), a marker-gene-based approach ([Zhang _et al._ 2019](https://doi.org/10.1038/s41592-019-0529-1)).
Marker genes associated with `{tissue_type}` tissue were obtained from [PanglaoDB](https://panglaodb.se/).\n
"
Marker genes for cell types were obtained from [PanglaoDB](https://panglaodb.se/) and compiled into a reference named `{ref_name}`. This reference includes the following organs and tissue compartments: {organs_string}.\n"
sjspielman marked this conversation as resolved.
Show resolved Hide resolved
)
}

Expand Down