Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

inaccurate error message of 'ReadMtx' function #5158

Closed
mingwhy opened this issue Oct 1, 2021 · 1 comment
Closed

inaccurate error message of 'ReadMtx' function #5158

mingwhy opened this issue Oct 1, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@mingwhy
Copy link

mingwhy commented Oct 1, 2021

The error message of 'ReadMtx' function is not accurate.

The current code is:

  if (length(x = feature.names) != nrow(x = data)) {
    stop(
      "Matrix has ",
      ncol(data),
      " rows but found ", length(feature.names),
      " features. ",
      ifelse(
        test = length(x = feature.names) > nrow(x = data),
        yes = "Try increasing `skip.feature`. ",
        no = ""
      ),
      call. = FALSE
      )
  }

This codes was checking the number of genes and the number of rows in the matrix.
For the error message, instead of ncol(data), it's actually nrow(data).

@mingwhy mingwhy added the bug Something isn't working label Oct 1, 2021
@saketkc
Copy link
Collaborator

saketkc commented Oct 22, 2021

Thanks for reporting this, it should be fixed in the develop branch.

@saketkc saketkc closed this as completed Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants