paulhager / smart-phase

A comprehensive and intelligent clinical phasing tool
GNU General Public License v3.0
13 stars 2 forks source link

Bed file parsing fix #12

Closed davidrajones closed 2 years ago

davidrajones commented 2 years ago

Hi,

I've noticed that the bed parsing is not correcting for bed format being 0-based start. Where

https://samtools.github.io/htsjdk/javadoc/htsjdk/htsjdk/samtools/util/Interval.html

requires 1 based coordinates for both start and finish.

This small fix includes a correction for that when parsing the -g options, as well a small check for a possible empty 'name' column (column[3]) where there may be further info in the bed file that could break the parsing (score - column[4] etc).

Please let me know if more requires changing. It would be great if these fixes could go out in a hotfix tagged release.

Kind regards,

davidrajones

paulhager commented 2 years ago

Looks good! Thanks for catching that.