Closed tjakobi closed 7 years ago
I was able to recover one of the temporary files. Indeed, the file is missing a column as suggested by bedtools:
20 35705295 35705333 QKI_HepG2_rep02 200 +
1 27407577 27407615 QKI_HepG2_rep02 200 +
15 84869291 84869329 QKI_HepG2_rep02 200 +
5 149632806 149632843 QKI_HepG2_rep02 20
It seems the file is only partially complete since it is ending in the middle of a value.
A cluster wide search for possible segfaults of bedtools showed segfaults on 4 machines, which correlates with the number of failed jobs (also 4):
[2109293.051118] traps: bedtools[38431] trap divide error ip:4fba16 sp:7ffce107dda0 error:0 in bedtools[400000+231000]
[2110512.508267] traps: bedtools[32043] trap divide error ip:4fba16 sp:7fff75ec9ce0 error:0 in bedtools[400000+231000]
[2111499.498531] traps: bedtools[36229] trap divide error ip:4fba16 sp:7fff9685b8c0 error:0 in bedtools[400000+231000]
[2111904.482610] traps: bedtools[37884] trap divide error ip:4fba16 sp:7ffdb865bca0 error:0 in bedtools[400000+231000]
[2109686.312481] traps: bedtools[37998] trap divide error ip:4fba16 sp:7ffcd48e1b70 error:0 in bedtools[400000+231000]
[2110037.443168] traps: bedtools[25038] trap divide error ip:4fba16 sp:7ffe1e124be0 error:0 in bedtools[400000+231000]
A second run with the same input files shows that even the one job that finished successfully in the first try now fails with a segfault, too. Additionally the line numbers in the temporary files are different between the runs.
The error in bedtools is caused in
void BedShuffle::ChooseLocusFromInclusionFile(BED &bedEntry)
:
#ifdef USE_RAND
CHRPOS randomStart = includeInterval->start + (rand() % includeInterval->size());
#else
CHRPOS randomStart = includeInterval->start + ((long) mt_rand() % includeInterval->size());
#endif
The interval size is not checked to be > 0. Therefore, if the input bed file has intervals with 0-length, bedtools with fail with a division by 0.
I'll submit a bug report and probably a pull request to get that fixed.
The feature selection for exon and gene works without any errors. However, the exact same work flow fails after quite some time (~30 minutes) with a bedtools error:
Interestingly, while the first temporary bed files exists, the second one cannot be recovered after the crash. Also the number of columns is different for the different runs: