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

fix: donor id error logging #1153

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

fix: donor id error logging #1153

wants to merge 1 commit into from

Conversation

joyceyan
Copy link
Contributor

Reason for Change

  • the previous error logging was printing out all of the possible categorical values for donor_id, which would print out all possible donor id values. not just the donor id values for the invalid rows.

Changes

  • self.adata.obs.loc[invalid_rows, "donor_id"] will only fetch the donor_id fields when invalid_rows for that index is true. so this will only print out the donor ids that are actually invalid

Testing

i tested this by just printing out the error log in test_genetic_ancestry_same_donor_id. previously, this error message would say ERROR: obs rows with donor ids ['donor_1', 'donor_2']. however, this should be ERROR: obs rows with donor ids ['donor_1'] because the way that this test is set up, only donor_1 has invalid values

ERROR    cellxgene_schema.validate:validate.py:2138 ERROR: obs rows with donor ids ['donor_1'] have invalid genetic_ancestry_* values. All observations with the same donor_id must contain the same genetic_ancestry_* values. If organism_ontolology_term_id is NOT 'NCBITaxon:9606' for Homo sapiens, then all geneticancestry values MUST be float('nan'). If organism_ontolology_term_id is 'NCBITaxon:9606' for Homo sapiens, then the value MUST be a float('nan') if unavailable; otherwise, the sum of all genetic_ancestry_* fields must be equal to 1.0

Notes for Reviewer

@joyceyan joyceyan requested a review from ejmolinelli December 11, 2024 22: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.

1 participant