- BedTool.bgzip(in_place=True, force=False, is_sorted=False)¶
Helper function for more control over “tabixed” BedTools.
Checks to see if we already have a BGZIP file; if not then prepare one. Always leaves the original file alone. You can always just make a BedTool out of an already sorted and BGZIPed file to avoid this step.
in_placewill put the BGZIPed file in the same dir (possibly after sorting to tempfile).
is_sorted, then assume the file is already sorted. Otherwise call bedtools sort with the
forcewill overwrite without asking.