freeseek / mocha

MOsaic CHromosomal Alterations (MoChA) caller
MIT License
81 stars 23 forks source link

segfault at basic qc step #3

Closed kylec closed 5 years ago

kylec commented 5 years ago

I'm using the WGS and array example posted on the README as my VCF then converted to BCF. When I run the data QC step (excluding dups, etc) using the command on either the WGS or array bcf

$HOME/bin/bcftools annotate --no-version -Ou -a dup.grch37.bed.gz -c CHROM,FROM,TO,JK -h jk.header.txt  wgs.unphased.bcf

I get the following segfault

(gdb) run annotate --no-version -Ou -a dup.grch37.bed.gz -c CHROM,FROM,TO,JK -h jk.header.txt  wgs.unphased.bcf
Starting program: /rsrch2/epi/kchang3/bin/bcftools annotate --no-version -Ou -a dup.grch37.bed.gz -c CHROM,FROM,TO,JK -h jk.header.txt  wgs.unphased.bcf
[Thread debugging using libthread_db enabled]

Program received signal SIGSEGV, Segmentation fault.
0x000000000044cb4d in setter_info_real ()
(gdb)

I have attached the bcf and header files. example.zip

freeseek commented 5 years ago

I have just tried to run your command using my own version of dup.grch37.bed.gz/dup.grch37.bed.gz.tbi and it works for me. This is what that file should contain:

$ zcat dup.grch37.bed.gz | head
1   10000   10485   0.00713299
1   10485   18392   0.00579252
1   18392   87112   0.00457824
1   87113   88000   0.00686326
1   88000   110582  0.00653207
1   110582  139463  0.00485026
1   139463  154500  0.00317143
1   154500  173929  0.00214293
1   173929  177417  0.00201696
1   227417  228316  0.011709

In any case, I did not write bcftools annotate. Make sure you use one of the latest versions of bcftools (e.g. 1.9-83-gb406a39) and, if you can reproduce the error, then maybe file a bug report with the maintainer of bcftools.

kylec commented 5 years ago

Somehow I'm missing the 4th column in my dup file. I suppose that's why I'm getting the segfault. Edit: Need to remove the cut command as mentioned in issue #2

freeseek commented 5 years ago

My bad indeed. I fixed the README. Thank you for reporting the issue now. Still, bcftools annotate should have given you a proper error message rather than segfault.

kylec commented 5 years ago

On a separate note, I don't know my sample's gender so I generated the exclusion list without the sex test. Will it have significant impact on the phasing and mocha results?

kylec commented 5 years ago

My bad indeed. I fixed the README. Thank you for reporting the issue now. Still, bcftools annotate should have given you a proper error message rather than segfault.

Thank you for your prompt reply and help!

freeseek commented 5 years ago

It will not have a huge impact, but you could run MoChA on the unphased VCF and it will generate a summary file with the sex column which you could use to complete the QC before you phase the data. I will include this information in the next update.