Skip to content

Commit

Permalink
fix(cram): coords -> region
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdoret committed Feb 9, 2024
1 parent ff39cea commit 259c860
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion modo/cram.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Utilities to interact with genomic intervals in CRAM files."""
import re
from typing import Iterator

import smoc_schema.datamodel as model
Expand Down
1 change: 1 addition & 0 deletions modo/helpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from enum import Enum
import re
from urllib.parse import urlparse

import smoc_schema.datamodel as model
Expand Down
6 changes: 4 additions & 2 deletions modo/io.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from pathlib import Path
import re
from typing import Any, Mapping, List

from linkml_runtime.loaders import (
json_loader,
yaml_loader,
Expand All @@ -10,6 +11,7 @@
from linkml_runtime.dumpers import json_dumper
import smoc_schema.datamodel as model
from .api import MODO
from .cram import slice_cram
from .helpers import class_from_name
from .storage import add_metadata_group, init_zarr
import json
Expand Down Expand Up @@ -88,8 +90,8 @@ def slice(data: model.DataEntity, region: str) -> Any:
The region string in UCSC format (i.e. chr:start-end).
"""

match data.data_format:
match str(data.data_format):
case "CRAM":
return slice_cram(data.data_path, coords)
return slice_cram(data.data_path, region)
case _:
raise ValueError(f"Unsupported data format: {data.data_format}")

0 comments on commit 259c860

Please sign in to comment.