Variant calling fails with "malformed BED entry"
|Reported by:||Nicklas Nordborg||Owned by:||Nicklas Nordborg|
The full error message:
Error: malformed BED entry at line 62347. Start Coordinate detected that is < 0. Exiting.
This seems to happen when a variant is found that is less than 50 base-pairs from the start of the chromosome. The preparations for the GC-content calculatings generates a BED file with start/end coordinates that are (location-50, location+50). If
location<50 a negative number is writted to the BED file which is not allowed.
We need to detect this and write 0 instead. This also affects the
gc_stat.py program that is calculating the GC-content for the "local" area (which are 6 base pairs around the location). This calculation is currently always done on 44-56 in the sequence, but it must be adjusted if the location < 50. For example if location is 42 we should output 0 and 92 in the BED file for start/end and the local GC content should use 36-48.