pLOH score represents the genome that displayed LOH.

get_pLOH_score(data, rm_chrs = c("chrX", "chrY"), genome_build = "hg19")

Arguments

data

a CopyNumber object or a data.frame containing at least 'chromosome', 'start', 'end', 'segVal', "minor_cn", 'sample' these columns.

rm_chrs

chromosomes to be removed in calculation. Default is sex chromosomes (recommended).

genome_build

genome build version, should be 'hg19', 'hg38', 'mm9' or 'mm10'.

Value

A data.frame

References

Steele, Christopher D., et al. "Signatures of copy number alterations in human cancer." bioRxiv (2021).

Examples

# \donttest{
# Load toy dataset of absolute copynumber profile
load(system.file("extdata", "toy_segTab.RData",
  package = "sigminer", mustWork = TRUE
))

set.seed(1234)
segTabs$minor_cn <- sample(c(0, 1), size = nrow(segTabs), replace = TRUE)
cn <- read_copynumber(segTabs,
  seg_cols = c("chromosome", "start", "end", "segVal"),
  genome_measure = "wg", complement = TRUE, add_loh = TRUE
)
#> ℹ [2026-10-21 03:07:56.517501]: Started.
#> ℹ [2026-10-21 03:07:56.519289]: Genome build  : hg19.
#> ℹ [2026-10-21 03:07:56.520871]: Genome measure: wg.
#> ℹ [2026-10-21 03:07:56.522418]: When add_loh is TRUE, use_all is forced to TRUE.
#> Please drop columns you don't want to keep before reading.
#> ✔ [2026-10-21 03:07:56.526656]: Chromosome size database for build obtained.
#> ℹ [2026-10-21 03:07:56.528294]: Reading input.
#> ✔ [2026-10-21 03:07:56.529922]: A data frame as input detected.
#> ✔ [2026-10-21 03:07:56.53163]: Column names checked.
#> ✔ [2026-10-21 03:07:56.533349]: Column order set.
#> ✔ [2026-10-21 03:07:56.537153]: Chromosomes unified.
#> ✔ [2026-10-21 03:07:56.554893]: Value 2 (normal copy) filled to uncalled chromosomes.
#> ✔ [2026-10-21 03:07:56.55945]: Data imported.
#> ℹ [2026-10-21 03:07:56.561101]: Segments info:
#> ℹ [2026-10-21 03:07:56.567696]:     Keep - 477
#> ℹ [2026-10-21 03:07:56.569291]:     Drop - 0
#> ✔ [2026-10-21 03:07:56.571431]: Segments sorted.
#> ℹ [2026-10-21 03:07:56.573006]: Adding LOH labels...
#> ℹ [2026-10-21 03:07:56.575322]: Joining adjacent segments with same copy number value. Be patient...
#> ✔ [2026-10-21 03:07:56.748195]: 410 segments left after joining.
#> ✔ [2026-10-21 03:07:56.750534]: Segmental table cleaned.
#> ℹ [2026-10-21 03:07:56.752333]: Annotating.
#> ✔ [2026-10-21 03:07:56.767554]: Annotation done.
#> ℹ [2026-10-21 03:07:56.769271]: Summarizing per sample.
#> ✔ [2026-10-21 03:07:56.783265]: Summarized.
#> ℹ [2026-10-21 03:07:56.784884]: Generating CopyNumber object.
#> ✔ [2026-10-21 03:07:56.787071]: Generated.
#> ℹ [2026-10-21 03:07:56.788645]: Validating object.
#> ✔ [2026-10-21 03:07:56.790295]: Done.
#> ℹ [2026-10-21 03:07:56.791913]: 0.274 secs elapsed.

df <- get_pLOH_score(cn)
df
#>                           sample      pLOH
#>                           <char>     <num>
#>  1: TCGA-05-4417-01A-22D-1854-01 0.3909788
#>  2: TCGA-06-0644-01A-02D-0310-01 0.5511234
#>  3: TCGA-19-2621-01B-01D-0911-01 0.3154956
#>  4: TCGA-26-6174-01A-21D-1842-01 0.5771739
#>  5: TCGA-99-7458-01A-11D-2035-01 0.5248894
#>  6: TCGA-A5-A0G2-01A-11D-A042-01 0.6509913
#>  7: TCGA-A8-A07S-01A-11D-A036-01 0.4353611
#>  8: TCGA-B6-A0X5-01A-21D-A107-01 0.3938989
#>  9: TCGA-CV-7432-01A-11D-2128-01 0.3113043
#> 10: TCGA-DF-A2KN-01A-11D-A17U-01 0.4588324

df2 <- get_pLOH_score(cn@data)
df2
#>                           sample      pLOH
#>                           <char>     <num>
#>  1: TCGA-05-4417-01A-22D-1854-01 0.3909788
#>  2: TCGA-06-0644-01A-02D-0310-01 0.5511234
#>  3: TCGA-19-2621-01B-01D-0911-01 0.3154956
#>  4: TCGA-26-6174-01A-21D-1842-01 0.5771739
#>  5: TCGA-99-7458-01A-11D-2035-01 0.5248894
#>  6: TCGA-A5-A0G2-01A-11D-A042-01 0.6509913
#>  7: TCGA-A8-A07S-01A-11D-A036-01 0.4353611
#>  8: TCGA-B6-A0X5-01A-21D-A107-01 0.3938989
#>  9: TCGA-CV-7432-01A-11D-2128-01 0.3113043
#> 10: TCGA-DF-A2KN-01A-11D-A17U-01 0.4588324
# }