Skip to content

Commit

Permalink
Use the factor class to extract codes for seqnames (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkanche authored Feb 1, 2025
1 parent 596037e commit 37df6f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ python_requires = >=3.9
install_requires =
importlib-metadata; python_version<"3.8"
dolomite-base>=0.4.2
genomicranges>=0.4.10
genomicranges>=0.6.1
biocframe>=0.5.8
h5py

Expand Down
4 changes: 2 additions & 2 deletions src/dolomite_ranges/save_genomic_ranges.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ def save_genomic_ranges(
with h5py.File(os.path.join(path, "ranges.h5"), "w") as handle:
ghandle = handle.create_group("genomic_ranges")

_seqnames, _ = x.get_seqnames(as_type="factor")
_seqnames = x.get_seqnames(as_type="factor")
dl.write_integer_vector_to_hdf5(
ghandle, name="sequence", h5type="u4", x=_seqnames
ghandle, name="sequence", h5type="u4", x=_seqnames.get_codes()
)

_ranges = x.get_ranges()
Expand Down

0 comments on commit 37df6f2

Please sign in to comment.