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

Add warning for cf_cosine_plot when initial ids dropped #24

Closed
mmc46 opened this issue Sep 19, 2024 · 1 comment
Closed

Add warning for cf_cosine_plot when initial ids dropped #24

mmc46 opened this issue Sep 19, 2024 · 1 comment

Comments

@mmc46
Copy link

mmc46 commented Sep 19, 2024

When the ids provided to cf_cosine_plot don't have enough connectivity they're silently dropped. The function output notes how many connecting partners are dropped.
It would be useful if there was a warning listing which initial ids were dropped, if any.

library(coconatfly)

test_hc=cf_cosine_plot(cf_ids("type:DNpe008", datasets = c("flywire", "malecns")), heatmap = F)
Updating 6669 ids
Updating 5487 ids
Matching types across datasets. Dropping 489/533 output partner types with total weight 9305/9704
Matching types across datasets. Dropping 274/503 input partner types with total weight 3155/5972
Warning message:
In Matrix::cov2cor(cpx) :
  diag(V) has non-positive or non-finite entries; finite result is doubtful

test_meta = cf_meta(test_hc)

length(mcns_ids("type:DNpe008"))
[1] 18
length(flywire_ids("type:DNpe008"))
[1] 18

test_meta %>% count(dataset)
  dataset  n
1 flywire 17
2 malecns 18
@jefferis
Copy link
Contributor

Closed by #26

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

2 participants