Skip to content

Accidental bug in phenotype parser#33

Merged
rjbohlender merged 1 commit intomasterfrom
ibdreuce-pheno-parse
Sep 30, 2025
Merged

Accidental bug in phenotype parser#33
rjbohlender merged 1 commit intomasterfrom
ibdreuce-pheno-parse

Conversation

@jtb324
Copy link
Collaborator

@jtb324 jtb324 commented Sep 30, 2025

Issue:


I accidentally introduced a bug in the parse_pheno function. This bug accidentally always set the phenotype column index to 1 no matter what. This bug was causing the phenotype counts to be off. It only affected trying to run IBDReduce with a phenotype matrix. This did not affect running IBDReduce with a two column phenotype file.

Fix:


I moved the phenotype_indx reassignment into the i==0 if statement so that it would only happen when reading the header line. You could also assign phenotype_indx to 1 before the with statement that opens the file but I think the if/else might be more clear in the future what is happening

I accidentally created a bug in IBDReduce at line 184-187 of the ibdreduce_v3.py.
@jtb324 jtb324 requested a review from rjbohlender September 30, 2025 14:31
@jtb324 jtb324 added the bug Something isn't working label Sep 30, 2025
@rjbohlender rjbohlender merged commit e5584be into master Sep 30, 2025
1 check passed
@rjbohlender rjbohlender deleted the ibdreuce-pheno-parse branch September 30, 2025 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants