Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exception in writePhasePed writePhase and in Pedigree.py #1

Open
hindlem opened this issue Jun 3, 2021 · 0 comments
Open

exception in writePhasePed writePhase and in Pedigree.py #1

hindlem opened this issue Jun 3, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@hindlem
Copy link

hindlem commented Jun 3, 2021

Pedigree.writePhasePed and Pedigree.writePhase expect ind.haplotypes to be n = 1|2 dimension np array (use ind.haplotypes.ndim) but this appears to be tuple. e.g see in line 155 of Pedigree it is set as a tuple of np int arrays.

An example command that causes this error...

AlphaImpute2 -out alphagenes/chr1_lowconfidence2/out -genotypes alphagenes/real_gens_alphagenes_chr1.genotype -pedigree real_gens_ped.txt -maxthreads 24 -phase_output -length .4630 -final_peeling_threshold 0.1

Stacktrace was...

Traceback (most recent call last):
  File "/home/mhindle/.local/bin/AlphaImpute2", line 8, in <module>
    sys.exit(main())
  File "/home/mhindle/.local/lib/python3.8/site-packages/alphaimpute2/tinyhouse/Utils.py", line 8, in timer
    values = func(*args, **kwargs)
  File "/home/mhindle/.local/lib/python3.8/site-packages/alphaimpute2/alphaimpute2.py", line 304, in main
    write_out_data(pedigree, args)
  File "/home/mhindle/.local/lib/python3.8/site-packages/alphaimpute2/tinyhouse/Utils.py", line 8, in timer
    values = func(*args, **kwargs)
  File "/home/mhindle/.local/lib/python3.8/site-packages/alphaimpute2/alphaimpute2.py", line 255, in write_out_data
    pedigree.writePhase(args.out + ".haplotypes")
  File "/home/mhindle/.local/lib/python3.8/site-packages/alphaimpute2/tinyhouse/Pedigree.py", line 943, in writePhase
    if ind.haplotypes.ndim == 2:  # diploid
AttributeError: 'tuple' object has no attribute 'ndim'

github AlphaImpute v0.0.3 and tinyhouse master checkout on 02/Jun/2021

@gregorgorjanc gregorgorjanc added the bug Something isn't working label Jul 5, 2023
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

No branches or pull requests

2 participants