Skip to content

Membership files read by legume-numeric's two-column rule; version 0.8.6 - #35

Merged
YPARK merged 1 commit into
mainfrom
membership-reader
Oct 17, 2026
Merged

YPARK merged 1 commit into
mainfrom
membership-reader

Conversation

@YPARK

@YPARK YPARK commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

Membership files read by legume-numeric's two-column rule.

  • read_membership_pairs reads through read_two_field_rows (legume-numeric 0.9.5). A tab line splits on tabs only. A line without one is CSV, so a quoted label keeps its commas (CD4,"CD4-positive, alpha-beta T cell"), which 0.8.5 cut at the comma.
  • Cells are trimmed and unquoted. # and % lines are comments. A leading byte order mark is dropped. Gzipped files read like plain ones. A line that can't be read is an error naming its line number.
  • One warning counts the rows skipped for an empty gene or label. Another counts CSV rows with more than two cells, the usual sign of a label with an unquoted comma.
  • New membership_rows(path): the same rows with the gene/symbol header dropped, plus their skip counts, without the warnings. It's for callers that sniff files, such as a file picker, or that word their own message.

Version 0.8.6; legume-numeric floor 0.9.5.

Needs legume-numeric 0.9.5 on crates.io; CI cannot resolve it until then.

read_membership_pairs reads through read_two_field_rows: a quoted CSV label keeps its commas, cells are unquoted, #/% lines are comments, gzip reads, and a bad line is an error naming it. One warning counts rows with an empty gene or label, another CSV rows with more than two cells. membership_rows returns the same rows and counts without the warnings, for callers that sniff files.
@YPARK
YPARK merged commit e698e71 into main Oct 17, 2026
6 of 10 checks passed
@YPARK
YPARK deleted the membership-reader branch October 17, 2026 17:10
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