Conversation
…n phasing.cpp indicated a return type of int, but there was a path through the function that returns void. I defined an error macro value and return that integer. I also received an error that htslib macro bcf_int32_missing (defined in htslib/vcf.h) was used incorrectly, I think it is supposed to be used to test equality.
…n phasing.cpp indicated a return type of int, but there was a path through the function that returns void. I defined an error macro value and return that integer. I also received an error that htslib macro bcf_int32_missing (defined in htslib/vcf.h) was used incorrectly, I think it is supposed to be used to test equality.
|
I am trying to figure out why the update didn't pass unit tests. Stay tuned for an update. |
…int is assigned to a single output block. The trouble was at the boundary at the buffered and not buffered regions. A set of SNPs in a grid point could lie in the buffer region, which should be excluded. I updated the unit test to reflict this. Moreover, I found the function determine_snp_and_grid_blocks_to_output very difficult to read. It was a combination of the excessive use of parenthesis, spacing, and some variable name. I updated and added more documentation to help the next person reviewing this code to have an easier time understanding its purpose and design.
|
Hi @Zilong-Li the unit tests were failing due to a bug in the unit-test code. The problem was that a grid point spans SNP output buffer regions at the boundary of SNP in SNP output blocks. Consequently, the SNPs assigned to one grid point may have value NA and whichever grid index, causing the unit test to fail. The changes I made and disclosed above did not seem to create the unit test from failing. I still recommend these changes. I also checked if there was a bug in the STITCH function |
I noticed a compiler error / warning when a build the package from source and then run
R CMD check STITCH_1.8.4.tar.gz:truethe function will continue until the terminal } and consequently return void. I just added an error integer.bcf_int32_missingis an integer and I think should be used in a conditional statement instead of as a function macro.Hope it helps.