-
Notifications
You must be signed in to change notification settings - Fork 6
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
IndexError: tuple index out of range #37
Comments
@Sendong98 this is odd. Can you provide a reproducible example? |
Of course, here's an example for the Alphaimpute example genotype file: I added random 9 and got the error during imputation. |
I can reproduce the error on my end. And I will try to identify the cause of the error. |
I have found out the cause of the error. It is because if there are a lot of '9' in 'genotypes.txt' file, 'self.haplotypes' of function 'setup_library' in file 'BurrowsWheelerLibrary.py' has shape (0,), but we use self.haplotypes.shape[1], which does not exist and leads to the error. I have now modified the function 'setup_library'. |
Hi
I'm trying to do some imputation checks by masking the genotype data and it worked well with the original file but always get errors when I use the file that I added random 9(missing value) into the genotype file:
File "/home1/p314480/.local/lib/python3.10/site-packages/alphaimpute2/Imputation/BurrowsWheelerLibrary.py", line 65, in setup_library
bw_loci = np.array(range(self.haplotypes.shape[1]), dtype = np.int64)
IndexError: tuple index out of range
How could I solve this problem? Thank you!
The text was updated successfully, but these errors were encountered: