arq5x / lumpy-sv

lumpy: a general probabilistic framework for structural variant discovery
MIT License
309 stars 118 forks source link

Work-around for lumpy segfaults from lumpyexpress #277

Open hepcat72 opened 5 years ago

hepcat72 commented 5 years ago

I have not tested these changes from this fork, but I have tested them from editing my conda install's lumpyexpress script to not omit any -pe flags and by manually supplying a mean & stdev calculated by lumpyexpress from version 0.2.13 from homebrew...

The call to lumpy from lumpyexpress segfaults when the -pe flags are omitted when the insert mean and stdev are not calculated in lumpyexpress. Furthermore, the lumpy galaxy wrapper fails with an error that mean & stdev are missing.

I kept the warning, but allowed mean and stdev to be output in all cases to avoid the segfaults from lumpyexpress and avoid the error & no output from the lumpy galaxy wrapper.

This is admittedly a work-around. Lumpy should probably be edited to be able to not segfault when the -pe discordant options are missing and should gracefully output no results if mean and stdev do not have valid values.

Files checked in: scripts/lumpyexpress scripts/pairend_distro.py

hepcat72 commented 5 years ago

Well, presumably there are some tests that expect mean & stdev to not get set. I'll take a look at those tomorrow... although... those tests appear to fail for me before any of my changes...

hepcat72 commented 5 years ago

I have updated my galaxy wrapper of lumpyexpress to work around this issue. It's a simple/quick, less-than-ideal fix that simply copies and modifies lumpyexpress, lumpy.config, and pairend_distro.py.

I haven't reduced the test case that causes the segfault, but if you're interested, these are the files that caused me to run into it. I'll leave them up for a week or so if you want to reproduce the issue.

https://www.dropbox.com/s/l8axxuralbq6byl/lumpyexpress_test_files_that_cause_segfault.zip?dl=0

If you run this shell script, which calls lumpyexpress:

https://github.com/hepcat72/robs_galaxy_tools/blob/master/tools/lumpyexpress/lumpy_wrapper.tcsh

using these parameters:

lumpy_wrapper.tcsh 1 out.vcf *.sample.bam

you will reproduce the segfault.

ryanlayer commented 5 years ago

This is tricky. We added those checks b/c people were passing erroneous BAMS. Maybe a better way is to check to see if pe was passed when checking those paramter.

On Thu, Oct 25, 2018 at 2:48 PM Robert Leach notifications@github.com wrote:

I have updated my galaxy wrapper of lumpyexpress to work around this issue. It's a simple/quick, less-than-ideal fix that simply copies and modifies lumpyexpress, lumpy.config, and pairend_distro.py.

I haven't reduced the test case that causes the segfault, but if you're interested, these are the files that caused me to run into it. I'll leave them up for a week or so if you want to reproduce the issue.

https://www.dropbox.com/s/l8axxuralbq6byl/lumpyexpress_test_files_that_cause_segfault.zip?dl=0

If you run this shell script, which calls lumpyexpress:

https://github.com/hepcat72/robs_galaxy_tools/blob/master/tools/lumpyexpress/lumpy_wrapper.tcsh

using these parameters:

lumpy_wrapper.tcsh 1 out.vcf *.sample.bam

you will reproduce the segfault.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/arq5x/lumpy-sv/pull/277#issuecomment-433200228, or mute the thread https://github.com/notifications/unsubscribe-auth/AAlDUZiij-kwimuDa_6e0SNF_S4fuYfAks5uoiOZgaJpZM4XvSOG .