With my dataset, I got an error while performing readData, which traced back to this bug.
> trainset = readData(trainData, exomef, covarf, mutContextf, ref)
Error in matrix(0, nrow = nrow(mutab.onp) * umaxchar[k], ncol = ncol(mutab.onp)) :
invalid 'nrow' value (too large or NA)
It appears that within the loop, the mutab.onp variable sometimes only contains one row, which means that it is treated as a vector and hence nrow(mutab.onp) returns NULL. It looks like the previous line, 252, was supposed to correct that, but it is formulated very strangely - length(mutab.onp) will depend on the number of accessory columns and will not necessarily be 8 when there is one row only. A fix along the lines of
if ( is.null(nrow(mutab.onp) ){mutab.onp = t(as.matrix(mutab.onp))}
Hi!
I found a bug in
procMaf.R
line 253 (maf_dnp_converter
function): https://github.com/bioinform/ecTMB/blob/cc5f9fd9c24802d4d0f0ee6b73c60b47ea681ba8/R/procMaf.R#L253With my dataset, I got an error while performing
readData
, which traced back to this bug.It appears that within the loop, the
mutab.onp
variable sometimes only contains one row, which means that it is treated as a vector and hencenrow(mutab.onp)
returnsNULL
. It looks like the previous line, 252, was supposed to correct that, but it is formulated very strangely -length(mutab.onp)
will depend on the number of accessory columns and will not necessarily be 8 when there is one row only. A fix along the lines ofis suggested.
Best regards, Aleksandra