-
Notifications
You must be signed in to change notification settings - Fork 38
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
Octopus hangs after calling variants #11
Comments
Hi Justin! This looks like a bug in octopus' VCF merge function. Could you please provide your command line prompt that you used, and if possible the temporary directory containing all the BCF files? It should be possible for you to manually merge the BCF files assuming they are not corrupted. Please be aware that the somatic caller is currently some way off the maturity of the germline caller. I've just uploaded a new release which contains numerous fixes and improvements which drastically improves somatic calling performance from the last release, but there is still some way to go. |
Octopus was invoked with: Thanks for the update to to somatic calling! I'll try it out. In the meantime, I've had a look at the temp BCF files and found a lot of genotype calls referencing an alt allele in the germline (e.g., 2|0) that is not present in the ALT column of the VCF file (only 1 alternate present). This seems to only occur with variants tagged with SOMATIC; does 2 mean something different in this context or is this another bug? I'll open up another issue if it is a bug. |
Agh, the odd VCF format you're seeing was due to a bug which has been fixed in the new release. So it looks like htslib is getting into a muddle with octopus' (bad) VCF. Would you be able to try with the new release to see if the problem is resolved? |
Sure, I'll get back to you in 10 hours ;). |
Cheers! Apologies about the slow runtime, I'll be focusing on improving that over the next few weeks. |
Looks like it still hangs in htslib. Inspecting the BCF files the strange genotyping is now fixed, but the SOMATIC mutations are still a little odd: all of them are tri-allelic. I think it's unlikely the only somatic mutations have copy number 3. How does htslib handle multi-allelic sites? Maybe that's still causing it to hang. I've linked against htslib 1.3.1, maybe I should try again with htslib 1.3.2. Or should I be using the master branch of htslib? |
The triploid somatic genotypes are not intended to give copy number information per se, rather they are used to distinguish novel somatic haplotypes from the germline background (they are always ploidy + 1). The third column in the phased genotype is always the somatic allele. Octopus does infer allele frequencies (a somatic allele frequency credible interval is given in the SCR sample field), but it doesn't try to infer copy numbers from these, maybe it's something we'll look at in the future. I've not had this issue with htslib, I am using 1.3.2 so it's possible that a bug in 1.3.1 is causing this. Does the problem persist if you call over a smaller target region (e.g. with just one somatic)? |
Thanks for the clarification, that makes a lot more sense. I tried calling over a single chromosome and it completed successfully. |
Ok after some experiments I can get it to hang if I run octopus on the unknown contigs in hg38, so everything except chr1-22, chrX, and chrY. There doesn't seem to be anything unusal about the VCF output that I dug out of the octopus temporary files for these chromosomes, other than the _ in the chromosome name (e.g., chrUn_KI270438v1). |
Also confirmed bug is still present with htslib 1.3.2. |
I'm not 100% sure, but I think I resolved this at some point over the last year. Will leave open for now. |
Looks like some variant of this bug is still around. Octopus seems to create an "unfiltered" file and then hang. The output file I specify remains empty. I'll try and check if it's caused by the contigs as it previously was a year ago. |
This is odd. Octopus shouldn't have any issues with the underscores in the contig names. I was trying to reproduce this bug today and did come across a new issue (#17), but I don't think it is related to this problem. I haven't managed to reproduce this issue yet, have you checked if you get the same behaviour running on the same contigs with a single sample? I also had a quick look at the htslib method your GDB stack trace indicates where the process gets stuck (starting line 579 here). Although I cannot claim to fully understand this code, that |
Removing contigs didn't help this time, octopus still freezes after producing the "unfiltered" file. I'm currently using a cluster to execute this so debugging with gdb is difficult. I'll run a single sample and see if it terminates. As for the while loop, I don't think it's going into any infinite loops as the CPU usage goes to 0%, suggesting some sort of deadlock. |
Looks like I have the same problem with a single sample: the unfiltered file is produced then octopus hangs and the output file remains empty. |
Very strange. The temporary file merging occurs in the main thread, once all other worker threads have finished, so I'm struggling to see how this can be a deadlock issue. Could you please confirm which OS, compiler, standard library, Boost, and htslib versions you're using? |
I'm on linux, here are the dependencies being used: glibc-2.26-75 I compiled octopus with clang 3.9.1. |
I reproduced the problem on my laptop, here's a stack trace:
HTH. |
That is useful, thanks! Oddly, this stack trace points somewhere quite different to your previous one. From this Stack Overflow question, it looks some thread is waiting on one of the |
Could you please try checking out the branch |
Just some other thoughts. I wonder if there is some issue with using |
It doesn't compile for me with GCC for some reason, but I don't think the libstdc++ from gcc will cause any issues (especially a pthread issue). In any case, the branch partially worked! My first octopus run ran to completion, but the second sample crashed. I'll restart and see if it's a repeatable thing. |
OK it doesn't hang anymore but now it just crashes in the call set refinement stage. No unfiltered files are being produced; does that mean octopus is getting further than before or not? Doesn't seem to be anything useful in the debug log:
|
Ok great. The crash in the variant filtering is certainly an independent bug as this only starts once the calling has finished, and filtering isn't threaded yet. Unfortunately the 'cleanup' after the exception in the filtering removes the unfiltered calls - I'll probably change that behaviour. Would you mind opening a separate issue for the filtering crash? Probably if you just call the region |
Closing this issue as I believe it is fixed in v0.3.2-alpha (c27686f). |
I ran octopus for calling somatic variants with a normal/tumour pair and the variant calling appears to have finished, outputting the following line to stdout:
Unfortunately the process has not exited and the final output file (as specified with -o flag) is still empty. It has been 12 hours since that last output line was printed so I doubt it will ever terminate. I attached to the process with GDB and obtained the following trace:
Peaking in the temp directory seems to indicate the BCF files haven't been touched since that last message was printed to stdout. I will leave the process live for the moment in case you want more debugging output from GDB. Meanwhile, can I merge the temporary BCF files to obtain my variants?
The text was updated successfully, but these errors were encountered: