-
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
Test example error #16
Comments
@XingerTang do you have any sense of what is driving this error? can you also share here what exact command you use to get this error? |
@gregorgorjanc The command I used to get this error is just the command to run the example code
The error is probably caused by the datatype of In line 155 of
However, in the function |
@XingerTang this is odd - What do you propose we do to address this issue? |
@gregorgorjanc We only call I think it can be addressed by replacing the |
@gregorgorjanc The problem is a little bit more complicated than I thought. I checked all the places where For the ndarray case, For the a tuple of ndarrays case, it is the one that is actually used when the program runs, no matter whether the input pedigree file exists or not. I guess what happened is that, during the development of the program, the developers originally want to accept multiploid input, which the ndarray allows. Yet, later they decide to limit the case to only take diploid input, which the tuple is enough. So some of the functions written previously left and causes the mismatch of the datatypes. If what I guess is correct, what I need to do is remove some of the functions that are not being used and then update |
@XingerTang thanks for looking into this! Which packages have you looked at? I think we should make sure these tools work (these use tinyhouse) - will they work with your proposed change in tiny house? https://github.com/AlphaGenes/AlphaPeel https://github.com/AlphaGenes/AlphaImpute2 https://github.com/AlphaGenes/AlphaFamImpute |
@gregorgorjanc The datatype of If the issue is fixed, then the error won't be raised when |
@gregorgorjanc I checked all 5 packages and all of them except Another difference between the As |
@XingerTang I think the best way forward would indeed be to first work with tuple datatype for Having said all this I now wonder why we are in this situation! The other packages are somewhat older that the |
@gregorgorjanc Sure! I will do that later! |
@gregorgorjanc Yes, you are correct, |
@XingerTang does this mean we should:
|
@gregorgorjanc I think we will first do 2 then do 1... But let's just wait for the response. |
@XingerTang which version/commit of Waiting for Steve, but noticed he moved to Ox. Have contacted him on Twitter;) |
@XingerTang looks like that Steve agrees with your proposed path (#16 (comment)) forward! Let's revert |
@gregorgorjanc Stable commits
The hash of the commit that modified the datatype of So, if our aim is only to fix the bug, it is enough to revert to d5d4f9d. Still, there are functions other than # the functions using ndarray
tinyhouse.Pedigree.readInPed()
tinyhouse.Pedigree.decode_alleles()
tinyhouse.Pedigree.encode_alleles()
tinyhouse.Pedigree.update_allele_coding()
tinyhouse.Pedigree.writeGenotypesPed()
tinyhouse.Pedigree.writePhasePed() These functions are mostly created in the commit 0b02d79 (its parent is 0eb5c24) and experienced some small modifications later. So, to get rid of all functions in Possible influences of revertingTo d5d4f9dNot many things are changed since that commit, so not many things we would lose after reverting. At that point, To 0eb5c24By reviewing the code, you can see that the updates toward the use of These features would disappear if we revert the commits, but luckily they are all solely used by But it also means that we might need to rewrite |
Huh, messy. Excellent detective job! How much work would it be in AlphaPeel and AlphaImpute2 (key tools just now, others could be adapted later) to move to |
@gregorgorjanc The way Thus, for I'm not sure which method is easier, but this way is still kind of hard as almost everything in |
Ok, looks like we really should work with tuples then. A thought for intermediate period - can we modify tinyhouse.Pedigree.writePhase() to work with both cases? Nah, that will not work since it's a class atributte. To save the work in tinyhouse since the bug was introduced, I propose the following:
how does this sound? |
@gregorgorjanc |
@XingerTang by 3. and 4. I meant that let's do whatever needs doing in tinyhouse (on a devel branch) and if need be also on AlphaPeel and AlphaImpute2 (on a devel branch; but this fixing might not be needed at all here, but if it does, then we should just do it so we make some progress forward). OK? |
@gregorgorjanc OK! Let's do that. |
It seems to me that I think this is due to the way I wrote My conclusion is that the change I made to |
@sthorn thanks for chipping in. Yes, we will revert back to tuples of haplotypes and momentarily break AlphaPlantImpute2, but since we use submodules we are fine for the intermediate period. Good, we are now going in the right direction;) |
@gregorgorjanc Hi! I tried to follow the workflow you proposed. |
Let's see where this takes us;) |
@XingerTang I am still having the same problem as noted above - this is what I have done - have I missed anything?
This is the
Aha, we still have the old submodule, but hmm, you have updated yesterday be681d8 - I don't think you have moved the reference to the latest submodule version have you? |
@gregorgorjanc I have moved the reference to the latest submodule.
Also, there is a way to track other branches of the submodule by modifying |
@XingerTang I think this must be related to how the submodule is configured initially? Anyway, I made it work on my end, so we achieved what we aimed to achieve! Yay! This means that the fix in Can you please do this - let's leave this issue open till that happens. We are nearly there. Thanks! |
@gregorgorjanc What I got from Googling is that Git initially doesn't support tracking the non-default branch at all and adds this feature later at some point, and I guess that is the reason why we have to configure it by ourselves. I will do
I will tick the checkbox once I'm done. |
Great planning and use of tickboxes;) Will try to use them more in the future too. |
@gregorgorjanc |
@XingerTang best if we first do it on the devel branch and once we are entirely happy with the status of the devel, we merge into main. The idea of the main is that it should always be deployable. I am aware that you are asking this because the way submodule tinyhouse reference seems to work only with the main branch, but for the |
@gregorgorjanc Sure I will do that! |
Updated submodule reference to 65456ea #16
Updated submodule reference to 65456ea AlphaGenes/AlphaImpute2#16
@gregorgorjanc I didn't notice the datatype issue of So to move forward, I may need to make modifications to Another thing I want to mention is that these modules using |
@XingerTang great detective work! This is likely the root cause of the unfortunate code split in At this stage for me, the first priority is on AlphaPeel due to current projects in the lab - two projects will be using AlphaPeel. So my strategy is to ensure AlphaPeel is easy to install, well documented, and reasonably tested so we ensure accuracy. Second priority is for AlphaImpute2, then other tools. With the above in mind and your detective work, I propose that you open an issue in all the affected Alpha tools and link to this issue here as a background explanation. Having those issues open there will remind us why the problem is, where the problem is coming from, and what we might want to do about it in the future. To avoid duplication, I propose we move this OK? |
I still think moving to |
@sthorn Thanks for your comment, I will try to do it. |
Good point @sthorn! That could be a nice fix. |
While running the test example, it raises the following error
The text was updated successfully, but these errors were encountered: