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

11 automate spatial feature specification #14

Merged
merged 12 commits into from
Jul 30, 2024

Conversation

dimalvovs
Copy link
Contributor

refactor:

  • eliminate featureNames=NULL since checking with regex "." does the same and is shorter
  • simplify and deduplicate if else and messages
  • add tests to ensure most cases are covered (Seurat is not well defined so it's not covered)
  • introduce helper getters that each work with own input type
  • add test objects for cogaps and bayestme

ready to automate spatial feature specification now.

@dimalvovs dimalvovs linked an issue Jul 25, 2024 that may be closed by this pull request
@atuldeshpande atuldeshpande self-assigned this Jul 25, 2024
Copy link
Member

@atuldeshpande atuldeshpande left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this refactoring! It is much easier to follow the logic for each method option even if some method may just be two lines of code.

Please see some comments and suggestions.

R/preprocessing.R Outdated Show resolved Hide resolved
man/cogaps_result.Rd Outdated Show resolved Hide resolved
}
spFeatures <- spFeatures[,featureNames]

featureNames <- intersect(featureNames,colnames(spFeatures))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There could be a case where user lists 6 patterns but we find only 5 in the object. How should we handle that?

  1. Message which reports that we did not find all patterns, and are continuing with the rest.
  2. Error which reports the specific patterns we did not find, and ask user to check input.
    I note that this scenario may be more common in non-pipeline use cases.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed in cd2ab20

@atuldeshpande atuldeshpande merged commit 9e6b86f into main Jul 30, 2024
5 of 6 checks passed
@atuldeshpande atuldeshpande deleted the 11-automate-spatial-feature-specification branch July 30, 2024 13:58
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.

automate spatial feature specification
2 participants