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

replace minDistToCells by distToCells #125

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

brunopalau
Copy link

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"

@nilseling
Copy link
Contributor

Awesome, would also be good to add this to NEWS and issue a version bump.

@lassedochreden
Copy link
Collaborator

@nilseling thats my job now ;)

Copy link
Collaborator

@lassedochreden lassedochreden left a 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)

R/distToCells.R Show resolved Hide resolved
R/distToCells.R Show resolved Hide resolved
R/distToCells.R Show resolved Hide resolved
R/distToCells.R Show resolved Hide resolved
@@ -0,0 +1,595 @@
test_that("distToCells works",{
Copy link
Collaborator

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
Copy link
Collaborator

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?

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

Successfully merging this pull request may close these issues.

3 participants