fix: keep FlyBase gene nan when reading 10x mtx - #4329
Draft
joncarse wants to merge 2 commits into
Draft
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4329 +/- ##
=======================================
Coverage 81.98% 81.98%
=======================================
Files 134 134
Lines 13235 13237 +2
=======================================
+ Hits 10851 10853 +2
Misses 2384 2384
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Contributor
Author
|
I doubt "nan" will ever appear as truly meaning a nullish value in any TSV file. If this is a concern we can technically filter out "nan" only for Drosophila analyses. But then again maybe someone will try to splice it into another organism :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FlyBase has a real gene named
nan.read_10x_mtxreadsgenes.tsv/features.tsvwithpd.read_csv, and pandas treatsnanas missing by default, so that symbol disappeared. That showed up ascalculate_qc_metricsblowing up aftervar_names.str.startswith(...)(#1259, also #1708), or as a silently wrong identifier.This keeps lowercase
nanas a gene name and still treats the rest of pandas’ NA tokens (NaN,NA, and so on) as missing. The default token list is copied in the reader so production code does not importpandas._libs; a test compares that copy to pandas so we notice if it drifts.barcodes.tsvis unchanged.