1. James Taylor
  2. bx-python
Issue #27 resolved

Allow backup to space separated files in interval parsing

Brad Chapman
created an issue

Based on a discussion at BioStar:

http://biostar.stackexchange.com/questions/7204/any-good-bed-wig-parsers-in-python/7208#7208

It was suggested that interval parsing should also handle "tab" separated files that are actually separated by spaces. This patch adds a allow_spaces=True argument that will try space separating a line if it fails by tab separation:

reader = GenomicIntervalReader(file, allow_spaces=True)

It could be configurable for other whitespace separators as well if other cases come up. See the suite of bed test files at:

http://freesv.ch/bed_tester.tar.gz