Skip to content

Commit

Permalink
using read_cloud_i8 for read_i8 and all tests passed.
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlKCarlK committed Dec 25, 2023
1 parent 99b0baa commit 7125834
Show file tree
Hide file tree
Showing 8 changed files with 2,488 additions and 2,430 deletions.
4 changes: 2 additions & 2 deletions bed_reader/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from bed_reader._open_bed import get_num_threads, open_bed
from bed_reader._sample_data import sample_file, tmp_path
from bed_reader._to_bed import to_bed
from bed_reader._open_bed_cloud import open_bed_cloud
# cmk from bed_reader._open_bed_cloud import open_bed_cloud

from .bed_reader import (
file_aat_piece_f32_orderf,
Expand All @@ -20,7 +20,7 @@
read_f32,
read_f64,
read_i8,
# cmk read_cloud_i8,
read_cloud_i8,
standardize_f32,
standardize_f64,
subset_f32_f32,
Expand Down
8 changes: 5 additions & 3 deletions bed_reader/_open_bed.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
except ImportError:
sparse = None

from .bed_reader import read_f32, read_f64, read_i8 # type: ignore
from .bed_reader import read_f32, read_f64, read_i8, read_cloud_i8 # type: ignore


# https://stackoverflow.com/questions/845058/how-to-get-line-count-of-a-large-file-cheaply-in-python
Expand Down Expand Up @@ -390,7 +390,8 @@ def read(

if self.iid_count > 0 and self.sid_count > 0:
if dtype == np.int8:
reader = read_i8
# cmk000
reader = read_cloud_i8
elif dtype == np.float64:
reader = read_f64
elif dtype == np.float32:
Expand All @@ -402,7 +403,8 @@ def read(
)

reader(
str(self.filepath),
# cmk000
str(self.filepath.as_posix()),
iid_count=self.iid_count,
sid_count=self.sid_count,
is_a1_counted=self.count_A1,
Expand Down
Loading

0 comments on commit 7125834

Please sign in to comment.