-
Notifications
You must be signed in to change notification settings - Fork 10
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
replace minDistToCells by distToCells #125
base: devel
Are you sure you want to change the base?
Conversation
Awesome, would also be good to add this to NEWS and issue a version bump. |
@nilseling thats my job now ;) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @brunopalau, great job! See my comments - Also as @nilseling suggested above, please update the NEWS
and perform a version bump (to 1.11.1 I think - will double-check)
@@ -0,0 +1,595 @@ | |||
test_that("distToCells works",{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here you just copied the tests four times depending on the metric, which is okay but not totally necessary. Would be good to have some tests that numerically test the differences between all the metrics for a given image.
expect_true(class(cur_sce$distToCells) == "numeric") | ||
expect_true(min(cur_sce$distToCells) < 0) | ||
expect_true(sum(cur_sce$distToCells < 0) == sum(pancreasSCE$CellType == "celltype_B")) | ||
# TODO: for all cases, enforces that a cells not of interest and a cell of interect do not have the same exact coordinates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a new TODO?
Replaced minDistToCells function by superior distToCells function, which contains minDistToCells but also allows the user to specify the "metric" parameter and therefore compute min, max, mean and median distances to cells of interest, while exactly mimicking the minDistToCells output when using metric="min"