-
Notifications
You must be signed in to change notification settings - Fork 24
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
feat: update validation for obs['in_tissue'] to include descendants of Visiium #1124
Conversation
from scipy import sparse | ||
from xxhash import xxh3_64_intdigest | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
SPARSE_MATRIX_TYPES = {"csc", "csr", "coo"} | ||
|
||
ONTOLOGY_PARSER = OntologyParser(schema_version="v5.3.0") |
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 would prefer passing in the ONTOLOGY_PARSER
that we create an instance of in validate.py
into is_ontological_descendant_of
, that way we only have one place to update when we bump the schema version
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.
yes, I see your point. I definitely agree we should minimize (to 1) the number of places a bump needs to be reflected. I'll do that.
One question I have is, why is the version in the code at all and not as a configuration option?
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.
this was previously set to something like get_current_schema_version()
. however, the current schema version is 5.2.0, because we bump the version number as part of the automated release process. and in the past, we would usually bump the ontology versions in COG completing all the feature changes to the validator. there's some more context in this slack thread but basically i decided hard-coding this was easier than needing to change some of our automated release process to make sure we're not double-bumping the version number before creating the new 5.3.0 release.
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've followed your suggestion. Good looking out @joyceyan
…ARSER as a singleton
5515ff6
to
f049b42
Compare
Reason for Change
Changes
_validate_spatial_tissue_position
to support descendants of Visium_is_visium_including_descendants
to work around non-idempotent dependence on ONTOLOGY_PARSER COG#246Testing
test_schema_compliance.test_column_presence_in_tissue
tests descendants and non descendantsNotes for Reviewer
apply()
function and be cached to avoid unnecessary graph traversals in ontology