When I run objd <- calcInteger(objd, method = 'scquantum') , the this error shows up.
Error in assay(objd, "smoothed_bincounts") :
'assay(<CopyKit>, i="character", ...)' invalid subscript 'i'
'smoothed_bincounts' not in names(assays(<CopyKit>))
I find it is because the object did not contain the smoothed_bincounts assay, and the way the function examines the existence of this assay has a problem.
When I run
objd <- calcInteger(objd, method = 'scquantum')
, the this error shows up.I find it is because the object did not contain the smoothed_bincounts assay, and the way the function examines the existence of this assay has a problem.
https://github.com/navinlabcode/copykit/blob/690eb41b54d8bf331f7dd1475d24ad452c54f3a4/R/calcInteger.R#L62
You may consider checking the existence in this way: