Skip to content

Comments

Update ibdreduce_v3.py to allow for a matrix phenotype file or 2 column file#32

Merged
rjbohlender merged 1 commit intomasterfrom
ibdreduce-parse-pheno-refactor
Sep 28, 2025
Merged

Update ibdreduce_v3.py to allow for a matrix phenotype file or 2 column file#32
rjbohlender merged 1 commit intomasterfrom
ibdreduce-parse-pheno-refactor

Conversation

@jtb324
Copy link
Collaborator

@jtb324 jtb324 commented Sep 28, 2025

Feature(ibdreduce_v3.py):


Refactoring of the parse_pheno function in ibdreduce so that the user can select a column from a phecode matrix to use as the phenotype.

What was added:


  • CLI argument called "--phenotype-name"
  • a second argument called "phenotype" to the parse_pheno function
  • refactoring of parse_pheno function so it can pull the correct column out the file based on the phenotype name

Description:


This commit addresses issue #31. The user can now provide either a 2 column phenotype file or they can provide a matrix file with many columns. If the matrix is provided then they also should provide the phenotype name as an argument so that the parse_pheno function will select the right column from the matrix (lines 180-184). If the user passes a 2 column file then the program defaults to normal behavior. This commit adds convenience for people who already have a matrix style file from PheWAS analyses, etc...

Refactoring of the parse_pheno function in ibdreduce so that the user can select a column from a phecode matrix to use as the phenotype
@jtb324 jtb324 added the enhancement New feature or request label Sep 28, 2025
@jtb324 jtb324 changed the title Update ibdreduce_v3.py Update ibdreduce_v3.py to allow for a matrix phenotype file or 2 column file Sep 28, 2025
@rjbohlender rjbohlender merged commit a96a371 into master Sep 28, 2025
1 check passed
@rjbohlender rjbohlender deleted the ibdreduce-parse-pheno-refactor branch September 28, 2025 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants