This function runs the TMAtools pipeline for multiple TMA directories. It combines TMA datasets, deconvolutes the combined dataset, and translates numerical biomarker scores to nominal scores.
Usage
tmatools(
tma_dirs,
output_dir = "tmatools_output",
combined_tma_file = "combined_tma.xlsx",
deconvoluted_tma_file = "deconvoluted_tma.xlsx",
consolidated_tma_file = "consolidated_tma.xlsx",
biomarker_sheet_index = 2,
tma_map_sheet_index = 1,
required_biomarkers = c("ER", "TP53")
)
Arguments
- tma_dirs
A character vector of TMA directory paths.
- output_dir
The directory where the output files will be saved.
- combined_tma_file
The name of the combined TMA file.
- deconvoluted_tma_file
The name of the deconvoluted TMA file.
- consolidated_tma_file
The name of the consolidated TMA file.
- biomarker_sheet_index
The index of the biomarker sheet in the TMA file.
- tma_map_sheet_index
The index of the TMA map sheet in the TMA file.
- required_biomarkers
A character vector of required biomarkers.
Examples
library(TMAtools)
tma_dirs <- c(
system.file("extdata", "tma1", package = "TMAtools"),
system.file("extdata", "tma2", package = "TMAtools")
)
# Run the TMAtools pipeline
tmatools(
tma_dirs = tma_dirs,
output_dir = "tmatools_output"
)
#> Using TMA map from the file: /home/runner/work/_temp/Library/TMAtools/extdata/tma1/example_er.xlsx
#> Consolidating ER using columns: ER.c1, ER.c2
#> Consolidating TP53 using columns: TP53.c1, TP53.c2
#> Using TMA map from the file: /home/runner/work/_temp/Library/TMAtools/extdata/tma2/example_er.xlsx
#> Consolidating ER using columns: ER.c1, ER.c2
#> Consolidating TP53 using columns: TP53.c1, TP53.c2
#> # A tibble: 32 × 9
#> tma_id core_id accession_id ER.c1 ER.c2 er TP53.c1 TP53.c2 tp53
#> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
#> 1 tma1 1 pt1.tma1 Unk Unk Unk cytoplasmic complete absence mutated
#> 2 tma1 5 pt5.tma1 diffuse (>50%) diffuse (>50%) diffuse (>50%) Unk subclonal mutated
#> 3 tma1 9 pt9.tma1 Unk Unk Unk cytoplasmic subclonal mutated
#> 4 tma1 11 pt11.tma1 Unk Unk Unk subclonal wild type mutated
#> 5 tma1 2 pt2.tma1 Unk focal (1-50%) focal (1-50%) subclonal Unk mutated
#> 6 tma1 6 pt6.tma1 Unk focal (1-50%) focal (1-50%) Unk Unk Unk
#> 7 tma1 10 pt10.tma1 negative diffuse (>50%) diffuse (>50%) subclonal Unk mutated
#> 8 tma1 12 pt12.tma1 Unk Unk Unk overexpression abnormal mutated
#> 9 tma1 3 pt3.tma1 Unk diffuse (>50%) diffuse (>50%) subclonal cytoplasmic mutated
#> 10 tma1 7 pt7.tma1 negative negative negative cytoplasmic Unk mutated
#> # ℹ 22 more rows