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

add segfault handler for debugging #65

Merged
merged 4 commits into from
May 21, 2024
Merged

Conversation

Griffan
Copy link
Owner

@Griffan Griffan commented May 18, 2024

This PR aims to resolve segfault reported by multiple users in issue #45
To better trace the error without exchanging testing dataset, I added this simple debugging mode to print backtrace at the crash site.

Debugging Mode

If you encounter abnormal errors, e.g. "Segmentation fault", you can try to recompile the build under debugging mode:

cmake .. -DCMAKE_BUILD_TYPE=Debug
make

and then rerun your command line to locate the backtrace message, and then post it to issues page, for example:

Stack trace (most recent call last):
#6    Object "VerifyBamID", at 0x10ad9d822, in main + 466
#5    Object "VerifyBamID", at 0x10ad9b53d, in execute(int, char**) + 8509
#4    Object "VerifyBamID", at 0x10adc70c7, in ContaminationEstimator::OptimizeLLK(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 903
#3    Object "VerifyBamID", at 0x10adc9408, in ContaminationEstimator::OptimizeHeter(AmoebaMinimizer&) + 1560
#2    Object "libsystem_platform.dylib", at 0x7ff8182f0dfc, in _sigtramp + 28
#1    Object "VerifyBamID", at 0x10ad9e3ed, in backward::SignalHandling::sig_handler(int, __siginfo*, void*) + 13
#0    Object "VerifyBamID", at 0x10ad9e456, in backward::SignalHandling::handleSignal(int, __siginfo*, void*) + 70

@yfarjoun
Copy link
Contributor

Thanks @Griffan. Trying this out. will report back.

@Griffan
Copy link
Owner Author

Griffan commented May 19, 2024

Hi @yfarjoun, I have pushed the fix by bypassing these samples with uninformative GT or PL fields. Let me know if it finish the job successfully on your side. Thanks!

@yfarjoun
Copy link
Contributor

it worked (in that it didn't explode..) I am missing many sites, due to the fact that they are multi-allelic. how did you pre process the 1KG vcfs, as they have lots of multiallelic sites as well?

@hyunminkang
Copy link
Collaborator

I would recommend any multi-allelic sites as verifyBamID is using biallelic variants. If the reference data is too big, you may decompose the VCF into bi-allelics first and filter variants by missingness.

@Griffan Griffan merged commit 4b362f5 into master May 21, 2024
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

Successfully merging this pull request may close these issues.

None yet

3 participants