Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghaibao committed Aug 10, 2024
1 parent 1db2b5b commit 4f33876
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jcvi/graphics/landscape.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,11 +473,12 @@ def read_roi(roi_file: str) -> Dict[str, List[str]]:
roi = defaultdict(list)
with open(roi_file, encoding="utf-8") as fp:
for row in fp:
filename, region = row.strip().split(",")
filename, region = row.strip().split(",")[:2]
chrom, start_end = region.split(":", 1)
start, end = start_end.split("-")
region = (chrom, (int(start) + int(end)) // 2)
roi[filename].append(region)
logger.info("Read %d regions of interest", len(roi))
return roi


Expand Down

0 comments on commit 4f33876

Please sign in to comment.