Skip to content

Cleanup issues AlphaGenes/AlphaImpute2#64#65

Merged
XingerTang merged 1 commit intoAlphaGenes:develfrom
XingerTang:maintenance/issue-64-cleanup-issues
Apr 1, 2026
Merged

Cleanup issues AlphaGenes/AlphaImpute2#64#65
XingerTang merged 1 commit intoAlphaGenes:develfrom
XingerTang:maintenance/issue-64-cleanup-issues

Conversation

@XingerTang
Copy link
Copy Markdown
Contributor

Related Issue

Closes #64
Closes #58
Closes #60

Relate to #59

What changed

Why this change

Clean up issues

Notes / Risks

  • The recent changes in tinyhouse is incompatible with current AlphaImpute2 code.

@XingerTang
Copy link
Copy Markdown
Contributor Author

Error output with the up-to-date tinyhouse version:

TypeError: 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/Users/xtang3/anaconda3/envs/phase/bin/AlphaImpute2", line 7, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/xtang3/anaconda3/envs/phase/lib/python3.11/site-packages/alphaimpute2/tinyhouse/Utils.py", line 10, in timer
    values = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xtang3/anaconda3/envs/phase/lib/python3.11/site-packages/alphaimpute2/alphaimpute2.py", line 495, in main
    read_in_data(pedigree, args)
  File "/Users/xtang3/anaconda3/envs/phase/lib/python3.11/site-packages/alphaimpute2/tinyhouse/Utils.py", line 10, in timer
    values = func(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xtang3/anaconda3/envs/phase/lib/python3.11/site-packages/alphaimpute2/alphaimpute2.py", line 455, in read_in_data
    InputOutput.readInPedigreeFromInputs(pedigree, args, genotypes=True, haps=True)
  File "/Users/xtang3/anaconda3/envs/phase/lib/python3.11/site-packages/alphaimpute2/tinyhouse/InputOutput.py", line 376, in readInPedigreeFromInputs
    if pedigree.MainMetaFounder[:3] != "MF_":
       ~~~~~~~~~~~~~~~~~~~~~~~~^^^^
TypeError: 'NoneType' object is not subscriptable
___________________________________________________

@XingerTang
Copy link
Copy Markdown
Contributor Author

XingerTang commented Mar 27, 2026

All the tests are now tested on the three OSs: ubuntu-latest, Windows-latest, macos-latestand all Python versions 3.6 - 3.13.

The tests can be passed for all cases, but sometimes the accuracy report may fail to generate for the ubuntu system for population-based imputation for some unknown reason. I have added a warning if the accuracy report is only partial, and encourage the user to re-run the tests if that is the case.

Copy link
Copy Markdown
Member

@gregorgorjanc gregorgorjanc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Only left you a couple of minor bits to address.

@gregorgorjanc
Copy link
Copy Markdown
Member

I looked at the changes, which look ok. Best to address the -help while we are at it in the other package too, so we have two use cases that are the same so we then follow this template.

@gregorgorjanc gregorgorjanc dismissed their stale review March 31, 2026 16:51

All requests done!

@gregorgorjanc
Copy link
Copy Markdown
Member

Time for squash and merge this PR @XingerTang;)

@XingerTang XingerTang force-pushed the maintenance/issue-64-cleanup-issues branch from e1c9380 to afec2a9 Compare April 1, 2026 13:05
@XingerTang XingerTang merged commit fb874ad into AlphaGenes:devel Apr 1, 2026
24 checks passed
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.

2 participants