Repository navigation
Conversation
read_gtf returns a Polars DataFrame by default, so the pandas-style boolean-mask indexing in the first example raises ValueError. The StringTie example keyed its dict by seqname and filtered on "gene" features, which StringTie GTFs don't contain, so it always produced an empty dict. Use DataFrame.filter, key transcript FPKMs by transcript_id, note result_type="pandas", and show a gene_id lookup. Closes #13 Claude-Session: https://claude.ai/code/session_01DctgBZ5rJiuNzpWXqrNguT
This was referenced Sep 14, 2026
Coverage Report for CI Build 34867758590Coverage remained the same at 95.618%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
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.
Superseded by #93 and #95, which document the current pandas-default API and retain working gene and transcript examples. Both refreshed branches pass all 213 tests and their documentation builds.
The Polars-default change below describes the older 2.x API.
Both README examples fail with the current
read_gtf.read_gtfreturns a Polars DataFrame by default (result_type="polars",gtfparse/read_gtf.py:274). The pandas-styledf[df["feature"] == "gene"]raisesValueError: expected 20 values when selecting columns by boolean mask. Changed todf.filter(polars.col(...) == ...), with a note aboutresult_type="pandas".df["seqname"](the chromosome) and kept onlyfeature == "gene"rows. StringTie GTFs have onlytranscriptandexonrows (seetests/data/B16.stringtie.head.gtf), so the result was always{}. Changed to transcript FPKMs keyed bytranscript_id.gene_idlookup, which is what Example of how to find a feature by gene_id or transcript_id #13 asked for.I ran both snippets against
tests/data/ensembl_grch37.head.gtfandtests/data/B16.stringtie.head.gtfwith polars 1.43. Patch version bumped to 2.8.1 perAGENTS.md.Closes #13
https://claude.ai/code/session_01DctgBZ5rJiuNzpWXqrNguT