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

Issue with count touching cells #4

Closed
Athanasios72 opened this issue Apr 2, 2019 · 4 comments
Closed

Issue with count touching cells #4

Athanasios72 opened this issue Apr 2, 2019 · 4 comments

Comments

@Athanasios72
Copy link

Hi Kent,

I have been having an issue with count_touching_cells. I have used the following code in RStudio on a Windows PC:
**base_path <- '~/OPAL R ANALYSIS/T panel/SPATIAL ANALYSIS/TOUCH PAIRS/IMminGC/SEGNO/'
paths <- list_cell_seg_files(base_path)
files <- list_cell_seg_files(base_path)

pairs <- list(
c('CD3DN', 'AE1AE3'),
c('CD3DN', 'CD3CD4'),
c('CD3DN', 'CD3CD4FOXP3'),
c('CD3DN', 'CD3CD8')
)
write_images <- FALSE
touch_counts <- purrr::map_df(files, function(path) {
count_touching_cells(path, pairs, write_images=write_images)
})**

I get the following error message:
Error in touch_pairs[, 1] : incorrect number of dimensions
Called from: unique(touch_pairs[, 1])

Is there anything wrong with the script?

Many thanks.

Kind regards,

Athanasios

@AB-Kent
Copy link
Contributor

AB-Kent commented Apr 2, 2019

Your code looks fine. Are you using the latest version of phenoptr? If so, can you send me the cell seg data and segmentation map files that are failing? (Add cat(path, '\n') before count_touching_cells to see which one is failing; see my profile for email.)

@Athanasios72
Copy link
Author

Thank you for your suggestion. I found the error causing file pair and removed it. The script run fine after that.

@AB-Kent
Copy link
Contributor

AB-Kent commented Apr 12, 2019

This problem occurred when there was a single touching cell pair. Fixed with the above commit.

@AB-Kent
Copy link
Contributor

AB-Kent commented Apr 12, 2019 via email

AB-Kent added a commit that referenced this issue Apr 12, 2019
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