fix: add missing commas in Alliance column lists to prevent silent string concatenation#120
Open
AaryanCode69 wants to merge 1 commit intoreactome:mainfrom
Open
Conversation
…ring concatenation
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.
Summary
Fix missing commas in Alliance of Genome Resources column definition lists that caused Python's implicit string concatenation to silently merge adjacent column names into single malformed entries.
Problem
src/data_generation/alliance/__init__.pydefines column name lists for parsing Alliance TSV files. Two lists had missing commas between adjacent string literals, triggering Python's implicit string concatenation — a language feature where"A" "B"silently becomes"AB"with no error.Location 1 —
molecular_interaction(line ~141)Location 2 —
genetic_interaction(lines ~180–184)This would cause incorrect column-to-name mapping when parsing Alliance TSV files, with every column after the concatenation point shifted by 1 (Location 1) or 4 (Location 2).
Fix
Added the missing commas after each string literal so they are treated as separate list entries:
Changes
src/data_generation/alliance/__init__.pymolecular_interaction,genetic_interaction)Impact Assessment
upload_to_chromadb()loop only processesfiletype == "genes", so these column lists are not yet consumed in production.molecular_interactionandgenetic_interactiondata, these lists will now correctly match the actual TSV headers from the Alliance API.Related Issue
Closes #118