Skip to content

[BUG] Error in the simulation outlier step #11

Description

@jgarces02

Minimal reproducible example

library(SelectSim)

> str(m_selectsim)
List of 4
 $ M               :List of 2
  ..$ Nonsense: num [1:15236, 1:884] 0 0 0 0 0 0 0 0 0 0 ...
  .. ..- attr(*, "dimnames")=List of 2
  .. .. ..$ : chr [1:15236] "A1BG" "A1CF" "A2M" "A2ML1" ...
  .. .. ..$ : chr [1:884] "0BM059818SC002" "0BM065793SC002" "0BM073778SC001" "10" ...
  ..$ Missense: num [1:15236, 1:884] 0 0 0 0 0 0 0 0 0 0 ...
  .. ..- attr(*, "dimnames")=List of 2
  .. .. ..$ : chr [1:15236] "A1BG" "A1CF" "A2M" "A2ML1" ...
  .. .. ..$ : chr [1:884] "0BM059818SC002" "0BM065793SC002" "0BM073778SC001" "10" ...
 $ tmb             :List of 2
  ..$ Nonsense:'data.frame':	775 obs. of  2 variables:
  .. ..$ sample  : Factor w/ 884 levels "0BM059818SC002",..: 1 2 3 6 8 9 11 13 14 15 ...
  .. ..$ mutation: int [1:775] 13 2 2 1 5 1 2 10 9 2 ...
  ..$ Missense:'data.frame':	75 obs. of  2 variables:
  .. ..$ sample  : Factor w/ 884 levels "0BM059818SC002",..: 10 14 63 64 66 70 74 81 82 90 ...
  .. ..$ mutation: int [1:75] 1 1 1 2 2 1 1 1 1 1 ...
 $ sample.class    : Factor w/ 2 levels "BM","PCT": 1 1 1 1 1 1 1 1 1 1 ...
  ..- attr(*, "names")= chr [1:884] "0BM059818SC002" "0BM065793SC002" "0BM073778SC001" "10" ...
 $ alteration.class: Named chr [1:15236] "mut" "mut" "mut" "mut" ...
  ..- attr(*, "names")= chr [1:15236] "PALMD" "FRRS1" "AGL" "HIAT1" ...

> aux <- SelectSim::selectX(
+   M = m_selectsim, min.freq = 2,
+   sample.class = m_selectsim$sample.class, 
+   alteration.class = m_selectsim$alteration.class)
[1] "#### Creating SelectSim object ####"
[1] "Step1-> Parsing and Filtering GAM..."
[1] "Number of features: 15236"
[1] "Number of features after filtering: 190"
[1] "-> Alteration Landscape object created"
[1] "Step2-> Generating Template object..."
[1] "-> Template object created"
[1] "Step3-> Generating sample weight matrix..."
[1] "-> Weight Matrix created"
[1] "Step4-> Generating null model..."
[1] "-> Removing the outliers matrix from null model..."
Error in snMut[, i] <- colSums(obj$null[[i]]) : 
  replacement has length zero
In addition: 
Warning messages:
1: In al$tmb[["total"]] + am$tmb[[i]][, c("mutation")] :
  longer object length is not a multiple of shorter object length
2: In al$tmb[["total"]] + am$tmb[[i]][, c("mutation")] :
  longer object length is not a multiple of shorter object length

Environment

  • SelectSim version: 0.1.6
  • R version: 4.5.3 (2026-03-11)
  • OS: macOS Tahoe 26.6.2
  • Installation method: devtools::install_github("CSOgroup/SelectSim")

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions