Skip to content

Bug in subsetting just the goodCellIDs #16

@llrs

Description

@llrs

In flow_auto_qc the call to

goodfcs <- flowFrame(exprs = sub_exprs[goodCellIDs, ], parameters = params, description = keyval)
might fail.

  1. If goodCellIDs is integer(0) because sub_exprs[goodCellIDs, ] is a matrix of 0 rows.
  2. If it is just an event (for example goodCellIDs == 1) because the matrix is converted to a numeric vector (is.null(dim(sub_exprs[1, ]))).

Both cases stop with errors "The actual number of cells in data section (1) is not consistent with keyword '$TOT' (0)" and "Argument 'exprs' must be numeric matrix with colnames attribute set".

These problems might bee in other functions and be behind #4: not a single event got through the QC checks (which I find very surprising and might require further look into the data).

This can be triggered using the default parameters with a bad file.

I can submit a patch if you wish (note that there have been changes in the git repository of Bioconductor with the branch rename).
My proposed solution is:

  1. Provide an informative error message or warning
  2. Add drop = FALSE in the call sub_expres[goodCellIDs, , drop = FALSE].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions