pybedtools.bedtool.BedTool.remove_invalid

BedTool.remove_invalid(*args, **kwargs)[source]

Remove invalid features that may break BEDTools programs.

>>> a = pybedtools.BedTool("chr1 10 100\nchr1 10 1",
... from_string=True)
>>> print(a.remove_invalid()) 
chr1    10      100