@@ -181,7 +181,7 @@ Contents
diff --git a/docs/reference/write_count_within_sheet.html b/docs/reference/write_count_within_sheet.html
index 6ebf1d9..994abc7 100644
--- a/docs/reference/write_count_within_sheet.html
+++ b/docs/reference/write_count_within_sheet.html
@@ -73,7 +73,7 @@
phenoptrReports
- 0.2.8
+ 0.2.9
@@ -149,10 +149,10 @@ Write a "count within" summary to an Excel workbook
write_count_within_sheet(
- wb,
- stats,
- sheet_name = "Count Within",
- sheet_title = "Count of cells within the specified radius"
+ wb,
+ stats,
+ sheet_name = "Count Within",
+ sheet_title = "Count of cells within the specified radius"
)
Arguments
@@ -203,7 +203,7 @@ Contents
diff --git a/docs/reference/write_counts_sheet.html b/docs/reference/write_counts_sheet.html
index 68d9124..05c606d 100644
--- a/docs/reference/write_counts_sheet.html
+++ b/docs/reference/write_counts_sheet.html
@@ -72,7 +72,7 @@
phenoptrReports
- 0.2.8
+ 0.2.9
@@ -147,10 +147,10 @@ Write a cell counts table to an Excel workbook
write_counts_sheet(
- wb,
- counts,
- sheet_name = "Cell Counts",
- sheet_title = "Cell Counts per Phenotype"
+ wb,
+ counts,
+ sheet_name = "Cell Counts",
+ sheet_title = "Cell Counts per Phenotype"
)
Arguments
@@ -202,7 +202,7 @@ Contents
diff --git a/docs/reference/write_density_sheet.html b/docs/reference/write_density_sheet.html
index 06ddb04..0850c31 100644
--- a/docs/reference/write_density_sheet.html
+++ b/docs/reference/write_density_sheet.html
@@ -72,7 +72,7 @@
phenoptrReports
- 0.2.8
+ 0.2.9
@@ -147,10 +147,10 @@ Write a density table to an Excel workbook
write_density_sheet(
- wb,
- densities,
- sheet_name = "Cell Densities",
- sheet_title = "Cell Densities (cells/mm2)"
+ wb,
+ densities,
+ sheet_name = "Cell Densities",
+ sheet_title = "Cell Densities (cells/mm2)"
)
Arguments
@@ -203,7 +203,7 @@ Contents
diff --git a/docs/reference/write_expression_sheet.html b/docs/reference/write_expression_sheet.html
index 06eea12..ce30ee3 100644
--- a/docs/reference/write_expression_sheet.html
+++ b/docs/reference/write_expression_sheet.html
@@ -72,7 +72,7 @@
phenoptrReports
- 0.2.8
+ 0.2.9
@@ -147,10 +147,10 @@ Write an expression table to an Excel workbook
write_expression_sheet(
- wb,
- exprs,
- sheet_name = "Mean Expression",
- sheet_title = "Mean Expression"
+ wb,
+ exprs,
+ sheet_name = "Mean Expression",
+ sheet_title = "Mean Expression"
)
Arguments
@@ -203,7 +203,7 @@ Contents
diff --git a/docs/reference/write_h_score_sheet.html b/docs/reference/write_h_score_sheet.html
index f0833a5..555f6f1 100644
--- a/docs/reference/write_h_score_sheet.html
+++ b/docs/reference/write_h_score_sheet.html
@@ -72,7 +72,7 @@
phenoptrReports
- 0.2.8
+ 0.2.9
@@ -147,11 +147,11 @@ Write an H-Score table to an Excel workbook
write_h_score_sheet(
- wb,
- h_score,
- sheet_name = "H-Score",
- sheet_title = NULL,
- marker = NULL
+ wb,
+ h_score,
+ sheet_name = "H-Score",
+ sheet_title = NULL,
+ marker = NULL
)
Arguments
@@ -209,7 +209,7 @@ Contents
diff --git a/docs/reference/write_nearest_neighbor_summary_sheet.html b/docs/reference/write_nearest_neighbor_summary_sheet.html
index 38edf25..6eea7d4 100644
--- a/docs/reference/write_nearest_neighbor_summary_sheet.html
+++ b/docs/reference/write_nearest_neighbor_summary_sheet.html
@@ -73,7 +73,7 @@
phenoptrReports
- 0.2.8
+ 0.2.9
@@ -149,10 +149,10 @@ Write a nearest neighbor summary to an Excel workbook
write_nearest_neighbor_summary_sheet(
- wb,
- stats,
- sheet_name = "Nearest Neighbors",
- sheet_title = "Nearest Neighbor Distances for Phenotype Pairs (microns)"
+ wb,
+ stats,
+ sheet_name = "Nearest Neighbors",
+ sheet_title = "Nearest Neighbor Distances for Phenotype Pairs (microns)"
)
Arguments
@@ -203,7 +203,7 @@ Contents
diff --git a/docs/reference/write_percents_sheet.html b/docs/reference/write_percents_sheet.html
index 26535ff..5b5acb8 100644
--- a/docs/reference/write_percents_sheet.html
+++ b/docs/reference/write_percents_sheet.html
@@ -72,7 +72,7 @@
phenoptrReports
- 0.2.8
+ 0.2.9
@@ -147,10 +147,10 @@ Write a cell percent table to an Excel workbook
write_percents_sheet(
- wb,
- percents,
- sheet_name = "Cell Percents",
- sheet_title = "Percentage of Total Cells"
+ wb,
+ percents,
+ sheet_name = "Cell Percents",
+ sheet_title = "Percentage of Total Cells"
)
Arguments
@@ -202,7 +202,7 @@ Contents
diff --git a/docs/reference/write_plot_sheet.html b/docs/reference/write_plot_sheet.html
index 122a852..5bd1777 100644
--- a/docs/reference/write_plot_sheet.html
+++ b/docs/reference/write_plot_sheet.html
@@ -72,7 +72,7 @@
phenoptrReports
- 0.2.8
+ 0.2.9
@@ -147,10 +147,10 @@ Write a plot to an Excel workbook
write_plot_sheet(
- wb,
- plot,
- sheet_name = "Phenotypes",
- sheet_title = "All combinations of phenotypes in all slides"
+ wb,
+ plot,
+ sheet_name = "Phenotypes",
+ sheet_title = "All combinations of phenotypes in all slides"
)
Arguments
@@ -201,7 +201,7 @@ Contents
diff --git a/docs/reference/write_session_info.html b/docs/reference/write_session_info.html
index 878be83..8e93cdd 100644
--- a/docs/reference/write_session_info.html
+++ b/docs/reference/write_session_info.html
@@ -73,7 +73,7 @@
phenoptrReports
- 0.2.8
+ 0.2.9
@@ -148,7 +148,7 @@ Write session info to a file
if it is available, otherwise utils::sessionInfo()
is used.
- write_session_info(path)
+ write_session_info(path)
Arguments
@@ -178,7 +178,7 @@ Contents
diff --git a/docs/reference/write_sheet.html b/docs/reference/write_sheet.html
index 4dd54cc..f80b89e 100644
--- a/docs/reference/write_sheet.html
+++ b/docs/reference/write_sheet.html
@@ -80,7 +80,7 @@
phenoptrReports
- 0.2.8
+ 0.2.9
@@ -163,13 +163,13 @@ Write a single sheet with formatting common to all sheets.
write_sheet(
- wb,
- d,
- sheet_name,
- sheet_title,
- header_col,
- keepNA = TRUE,
- addGrid = TRUE
+ wb,
+ d,
+ sheet_name,
+ sheet_title,
+ header_col,
+ keepNA = TRUE,
+ addGrid = TRUE
)
Arguments
@@ -223,7 +223,7 @@ Contents
diff --git a/docs/reference/write_summary_charts.html b/docs/reference/write_summary_charts.html
index e66e3c7..0f3dd4e 100644
--- a/docs/reference/write_summary_charts.html
+++ b/docs/reference/write_summary_charts.html
@@ -74,7 +74,7 @@
phenoptrReports
- 0.2.8
+ 0.2.9
@@ -151,11 +151,11 @@ Create summary charts from the results of an analysis
write_summary_charts(
- workbook_path,
- output_path,
- .by = "Slide ID",
- max_slides_per_plot = 20,
- max_heatmaps_per_plot = 8
+ workbook_path,
+ output_path,
+ .by = "Slide ID",
+ max_slides_per_plot = 20,
+ max_heatmaps_per_plot = 8
)
Arguments
@@ -202,7 +202,7 @@ Contents
diff --git a/docs/reference/write_summary_report.html b/docs/reference/write_summary_report.html
index 57dc73c..3700bf3 100644
--- a/docs/reference/write_summary_report.html
+++ b/docs/reference/write_summary_report.html
@@ -73,7 +73,7 @@
phenoptrReports
- 0.2.8
+ 0.2.9
@@ -149,10 +149,10 @@ Create a summary report for a cell seg data file
write_summary_report(
- csd_path = NULL,
- csd = NULL,
- dataset_name = NULL,
- output_path
+ csd_path = NULL,
+ csd = NULL,
+ dataset_name = NULL,
+ output_path
)
Arguments
@@ -192,7 +192,7 @@ Contents
diff --git a/docs/reference/write_summary_sheet.html b/docs/reference/write_summary_sheet.html
index b3e0b0b..7e02cc8 100644
--- a/docs/reference/write_summary_sheet.html
+++ b/docs/reference/write_summary_sheet.html
@@ -73,7 +73,7 @@
phenoptrReports
- 0.2.8
+ 0.2.9
@@ -148,7 +148,7 @@ Write a summary table to an Excel workbook
a sheet in an Excel workbook.
- write_summary_sheet(wb, summary_table, sheet_name = "Slide Summary")
+ write_summary_sheet(wb, summary_table, sheet_name = "Slide Summary")
Arguments
@@ -194,7 +194,7 @@ Contents
diff --git a/man/count_within_summary.Rd b/man/count_within_summary.Rd
index f0982f2..c560a9c 100644
--- a/man/count_within_summary.Rd
+++ b/man/count_within_summary.Rd
@@ -24,10 +24,11 @@ count_within_summary(
will use \code{unique_phenotypes(csd)}. Counts are computed for all
pairs of phenotypes.}
-\item{categories}{Optional list of tissue categories to compute within.}
+\item{categories}{Optional list of tissue categories to compute within. If
+omitted or \code{NA}, all cells will be included.}
-\item{details_path}{If present, path to save a tab-separated table with
-nearest-neighbor data for each cell.}
+\item{details_path}{If present, path to save tab-separated tables with
+count within data for each cell.}
\item{.by}{Column to aggregate by}
@@ -47,8 +48,10 @@ summary calculation.
\details{
If \code{details_path} is provided, this will save a table with one
row per cell and columns for each phenotype and radius giving
-the count of cells of that type within that distance. The detail table
-is computed without regard to tissue category so it may not exactly
-match the summary table. Details are only saved if the \code{akoyabio/rtree}
-package is available.
+the count of cells of that type within that distance.
+
+Note: If \code{categories} is \code{NA} or includes \code{NA}, the "All" tissue category in
+the results will include all cells in \code{csd}. If \code{categories} does not include
+\code{NA}, the "All" tissue category will include only cells in the provided
+categories.
}
diff --git a/man/nearest_neighbor_summary.Rd b/man/nearest_neighbor_summary.Rd
index eccdc72..41b0136 100644
--- a/man/nearest_neighbor_summary.Rd
+++ b/man/nearest_neighbor_summary.Rd
@@ -7,6 +7,7 @@
nearest_neighbor_summary(
csd,
phenotypes = NULL,
+ categories = NA,
details_path = NULL,
.by = "Slide ID",
extra_cols = NULL
@@ -19,8 +20,12 @@ nearest_neighbor_summary(
\item{phenotypes}{Optional list of phenotypes to include. If omitted,
will use \code{unique_phenotypes(csd)}.}
-\item{details_path}{If present, path to save a tab-separated table with
-nearest-neighbor data for each cell.}
+\item{categories}{Optional list of tissue categories to compute within. If
+omitted or \code{NA}, all cells will be included.}
+
+\item{details_path}{If present, path to save a tab-separated table
+for each tissue category containing
+nearest-neighbor data for each cell in the tissue category.}
\item{.by}{Column to aggregate by}
@@ -29,9 +34,15 @@ results.}
}
\value{
A data frame with summary statistics for each phenotype pair
-in each Slide ID.
+in each Slide ID for each tissue category.
}
\description{
Computes summary nearest neighbor statistics (mean, median, etc)
for each \code{.by} in \code{csd} and each pair of phenotypes in \code{phenotypes}.
+Statistics are computed separately for each category in \code{categories}
+and, if multiple categories are provided, once for all included cells.
+Note: If \code{categories} is \code{NA} or includes \code{NA}, the "All" tissue category in
+the results will include all cells in \code{csd}. If \code{categories} does not include
+\code{NA}, the "All" tissue category will include only cells in the provided
+categories.
}