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

Minimac3 segfaults when failing to open output files #5

Closed
agordon opened this issue Jun 26, 2017 · 5 comments
Closed

Minimac3 segfaults when failing to open output files #5

agordon opened this issue Jun 26, 2017 · 5 comments

Comments

@agordon
Copy link

agordon commented Jun 26, 2017

Hi,

I've encountered a segfault in Minimac3 when the output files can not be opened.
This can happen if given the --prefix out/foo parameter and the ./out/ subdirectory does not exist.

The stack trace is:

[... normal Minimac3 output ... until ... ]
 Merging partial VCF files to final output VCF File :  out/foo.dose.vcf.gz 

Program received signal SIGSEGV, Segmentation fault.
0x0000000000437a7d in InputFile::readLine(std::string&) ()
(gdb) bt
#0  0x0000000000437a7d in InputFile::readLine(std::string&) ()
#1  0x00000000004200ee in Imputation::MergeFinalVcfAllVariants(HaplotypeSet&, HaplotypeSet&, ImputationStatistics&, int) ()
#2  0x0000000000429011 in Imputation::performImputation(HaplotypeSet&, HaplotypeSet&, String) ()
#3  0x0000000000406843 in main ()
(gdb) q

I did not investigate much further, but I suspect that perhaps Imputation::MergeFinalVcfAllVariants() does not verify the IFILE variable isn't NULL ?

regards,
-gordon

@Santy-8128
Copy link
Owner

Hi Gordon,

Yes, you are correct. Thanks for pointing this out. We will be making a release of minimac4 soon (within this month) and we will add a check for this issue in minimac4. Currently, we are trying not to make any more changes in minimac3 and instead move everything forward to minimac4. Hope that is okay. If you still need a version of Minimac3 that has fixed this issue, do let me know. I will create a separate branch.

@agordon
Copy link
Author

agordon commented Jun 26, 2017

Hi @Santy-8128 ,

First, thanks for the quick reply. This bug is not critical (for me) and surely does not warrant a separate branch.

Will Minimac4 be close enough to the current git of Minimac3, or is it a complete rewrite ?

@Santy-8128
Copy link
Owner

The basic algorithms are a bit different than Minimac3. But the parameter options and basic input/output formats would remain the same. For most cases, it would NOT require users to change their command lines (just replace minimac3 with minimac4). Is that what you were asking ?

@agordon
Copy link
Author

agordon commented Jun 26, 2017

Yes, partly.

But also:
Would the reference files be the same or need updating,
and,
Would results from Minimac3 be comparable to Minimac4 (in a sense that if I have samples imputed by Minimac3, is it better to re-run everything with Minimac4) ?

thanks again,
-gordon

@Santy-8128
Copy link
Owner

Santy-8128 commented Jun 26, 2017

No, reference files would not need updating. Same files would work. However, the initial release might only support M3VCF files and we will soon allow VCF files as well.

And the results from Minimac3 would be 'similar' to the results from Minimac4 (no need to re-run any experiment). I say 'similar', because due to some algorithmic changes the results won't be exactly same, but we are running numerous tests to verify that the differences in imputation accuracy is insignificant.

The main benefit with Minimac4 would be that it will be 2-4 times faster than Minimac3 (depending on the reference panel, larger the panel, more will be the fold increase in speed). However, it would have an overhead, so if one is imputing only say 20 samples, or is using a very small reference panel (with say only 300 samples), it might be beneficial to use minimac3 (in terms of run-time). We will also release documentation when we make the final release that will give more details.

[P.S. I already have a version on my git repo for testing purposes, in case you wanted to give it a try. :)]

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

No branches or pull requests

2 participants