Skip to content

Error when smoothed_bincounts is not in the assay #97

@Puriney

Description

@Puriney

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.

if (!is.null(assay(scCNA, 'smoothed_bincounts')) && assay == 'bincounts'

You may consider checking the existence in this way:

'smoothed_bincounts' %in% assayNames(scCNA)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions