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

Better error message for cf_cosine_plot when not enough neurons to cluster #20

Open
mmc46 opened this issue Aug 15, 2024 · 0 comments
Open

Comments

@mmc46
Copy link

mmc46 commented Aug 15, 2024

Co-clustering a type in 2 datasets, 2 neurons per dataset. One of neurons has hardly any connectivity, so using the default threshold of 5 generates an error that references the datasets. It would be helpful if the error message could make the issue clearer.

cf_cosine_plot(cf_ids(malecns = "type:DNge014",
                      flywire = "type:DNge014"),
               labRow = "{type}_{coconatfly::abbreviate_datasets(dataset)}{group}_{side}", 
               interactive = FALSE
, margins = c(5,5),
threshold = 5
)

Updating 6641 ids
Updating 5480 ids
Error in match.arg(ds, choices = cf_datasets("all"), several.ok = TRUE) : 
  'arg' must be of length >= 1

This works

cf_cosine_plot(cf_ids(malecns = "type:DNge014",
                      flywire = "type:DNge014"),
               labRow = "{type}_{coconatfly::abbreviate_datasets(dataset)}{group}_{side}", 
               interactive = FALSE
, margins = c(5,5),
threshold = 1
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant