Skip to contents

Usage

ihcscoring(
  data,
  guided_biomarker = "manual",
  intensity_var,
  proportion_var,
  sample_id_var = NULL,
  group_var = NULL,
  scoring_method = "both",
  binary_cutpoint = 100,
  allred_cutpoint = 3,
  intensity_scale = "standard",
  biomarker_type = "other",
  show_plots = TRUE,
  show_agreement_plots = TRUE,
  include_statistics = TRUE,
  include_digital_validation = FALSE,
  agreement_analysis = TRUE,
  quality_control = TRUE,
  clinical_interpretation = TRUE,
  export_results = FALSE,
  multiple_cutoffs = FALSE,
  cutoff_values = "1, 5, 10, 25, 50",
  cps_analysis = FALSE,
  immune_cells_var = NULL,
  tumor_cells_var = NULL,
  cutoff_comparison = TRUE,
  confidence_level = 0.95,
  bootstrap_n = 1000,
  automated_analysis = FALSE,
  segmentation_method = "manual",
  color_deconvolution = TRUE,
  dab_thresholds = "0.1, 0.3, 0.6",
  minimum_nuclear_area = 50,
  maximum_nuclear_area = 2000,
  batch_processing = FALSE,
  image_format = "tiff",
  validation_metrics = TRUE,
  molecular_classification = FALSE,
  classification_system = "bladder_mibc",
  primary_marker1 = NULL,
  primary_marker2 = NULL,
  secondary_marker = NULL,
  classification_cutoffs = "20, 20, 70",
  pd1_marker = NULL,
  pdl1_marker = NULL,
  checkpoint_cutoffs = "1, 10",
  subtype_statistics = TRUE,
  subtype_visualization = TRUE,
  language = "english",
  colorblind_safe = TRUE,
  high_contrast = FALSE,
  font_size = "normal"
)

Arguments

data

the data as a data frame

guided_biomarker

guided configuration for common biomarkers with recommended settings

intensity_var

staining intensity scores (typically 0-3 scale)

proportion_var

percentage of positive cells (0-100\

sample_id_varunique identifier for each sample

group_vargrouping variable for comparative analysis

scoring_methodprimary scoring methodology to emphasize

binary_cutpointH-score cutpoint for positive/negative classification

allred_cutpointAllred score cutpoint for positive/negative classification

intensity_scaleintensity scoring scale used

biomarker_typespecific biomarker being analyzed

show_plotsdisplay scoring distribution and correlation plots

show_agreement_plotsdisplay method agreement analysis plots

include_statisticscalculate comprehensive descriptive statistics

include_digital_validationinclude digital pathology validation metrics

agreement_analysiscalculate inter-method agreement statistics

quality_controlperform quality control checks and outlier detection

clinical_interpretationprovide clinical context and interpretation

export_resultsformat results for external analysis or reporting

multiple_cutoffsanalyze biomarker positivity across multiple pre-specified cut-off values

cutoff_valuescomma-separated list of percentage cut-off values for positivity analysis

cps_analysiscalculate Combined Positive Score for PD-L1 assessment

immune_cells_varpercentage of PD-L1+ immune cells (required for CPS calculation)

tumor_cells_varpercentage of PD-L1+ tumor cells (required for CPS calculation)

cutoff_comparisonperform statistical comparisons across different cut-off values

confidence_levelconfidence level for statistical intervals

bootstrap_nnumber of bootstrap replicates for confidence intervals

automated_analysisenable automated quantification from histological images

segmentation_methodmethod for nuclear segmentation in automated analysis

color_deconvolutionseparate DAB and hematoxylin channels for better quantification

dab_thresholdsoptical density thresholds for weak, moderate, and strong DAB staining (comma-separated)

minimum_nuclear_areaminimum area threshold for nuclear detection

maximum_nuclear_areamaximum area threshold for nuclear detection

batch_processingprocess multiple image files in batch mode

image_formatformat of input histological images

validation_metricscompare automated results with manual scoring when available

molecular_classificationperform molecular subtype classification based on marker combinations

classification_systemmolecular classification system to apply

primary_marker1first primary marker for molecular classification

primary_marker2second primary marker for molecular classification

secondary_markersecondary marker for subtype refinement

classification_cutoffscomma-separated cut-off values for each marker in order (primary1, primary2, secondary)

pd1_markerPD-1 expression scores for immune checkpoint analysis

pdl1_markerPD-L1 expression scores for immune checkpoint analysis

checkpoint_cutoffscomma-separated cut-off values for PD-1/PD-L1 positivity analysis

subtype_statisticscalculate statistical comparisons between molecular subtypes

subtype_visualizationcreate plots showing molecular subtype distributions and associations

languagelanguage for interface elements and clinical interpretations

colorblind_safeuse colorblind-safe palette for all visualizations

high_contrastenable high contrast mode for better accessibility

font_sizebase font size for improved readability

A results object containing:

results$interpretationa html
results$clinicalSummarya html
results$aboutAnalysisa html
results$clinicalReporta preformatted
results$assumptionsa html
results$scorestableCalculated H-scores, Allred scores, and binary classifications
results$statisticstableComprehensive statistical summary for each scoring method
results$agreementtableCorrelation and agreement statistics between scoring methods
results$qualitycontroltableOutlier detection and data quality assessment
results$distributionplotVisual distribution of H-scores and Allred scores
results$correlationplotCorrelation between H-score and Allred score methods
results$agreementplotBland-Altman style agreement analysis between methods
results$cutpointplotROC analysis for optimal cutpoint determination
results$biomarkerspecific$biomarkerresultsAnalysis tailored to specific biomarker characteristics
results$biomarkerspecific$clinicalcutpointsEstablished clinical thresholds and their performance
results$digitalvalidation$algorithmcomparisonStatistical comparison of digital vs manual scoring
results$digitalvalidation$batcheffectsAnalysis of systematic differences across batches
results$digitalvalidation$validationplotan image
results$automatedanalysis$segmentationresultsSummary of automated nuclear segmentation
results$automatedanalysis$intensityanalysisDistribution of DAB intensity levels
results$automatedanalysis$validationcomparisonComparison between manual and automated scores
results$automatedanalysis$segmentationplotOverlay of detected nuclei on original image
results$automatedanalysis$intensityplotHistogram of DAB optical density values
results$automatedanalysis$validationplotScatter plot of manual vs automated scores
results$advancedmetrics$reliabilitymetricsComprehensive reliability and consistency metrics
results$advancedmetrics$distributionanalysisNormality testing and distribution characteristics
results$multiplecutoffs$cutoffresultsPositivity rates across different cut-off thresholds
results$multiplecutoffs$comparisonstatsStatistical tests comparing groups across different cut-off values
results$cutoffplotBiomarker positivity rates across different thresholds
results$cpsanalysis$cpsresultsCombined Positive Score analysis for PD-L1 assessment
results$cpsanalysis$cpsstatisticsSummary statistics for Combined Positive Score
results$cpsanalysis$cpscomparisonStatistical comparison of CPS between groups
results$cpsplotDistribution of CPS scores with clinical thresholds
results$molecularclassification$classificationtableMolecular subtype classification based on marker combinations
results$molecularclassification$subtypedistributionFrequency and percentage of each molecular subtype
results$molecularclassification$subtypestatisticsStatistical comparisons between molecular subtypes
results$molecularclassification$checkpointanalysisPD-1/PD-L1 expression patterns across molecular subtypes
results$subtypeplotVisual representation of molecular subtype frequencies
results$checkpointplotPD-1/PD-L1 expression patterns across molecular subtypes
results$exportdataFormatted results for external analysis or reporting
Tables can be converted to data frames with asDF or as.data.frame. For example:results$scorestable$asDFas.data.frame(results$scorestable) IHC Scoring Standardization