Like loading two BED files with ngfrills.parse_regions.
cna2rows = (_cna2coords if coord_only else _cna2regions)
return list(map(cna2rows, _ref_split_targets(reference)))
def _cna2coords(cnarr):
After Change
Like loading two BED files with ngfrills.parse_regions.
coord_kw = {} if coord_only else {"also": ["gene"]}
is_bg = (reference["gene"] == "Background")
targets = reference[~is_bg]
antitargets = reference[is_bg]
return targets.coords(**coord_kw), antitargets.coords(**coord_kw)