Skip to content

Commit e247c90

Browse files
authored
fixed missing min_qv
1 parent 5e83f87 commit e247c90

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/segger/data/parquet/sample.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def __init__(
3636
base_dir: os.PathLike,
3737
n_workers: Optional[int] = 1,
3838
scale_factor: Optional[float] = 1.0,
39+
min_qv: Optional[float] = 0,
3940
sample_type: str = None,
4041
weights: pd.DataFrame = None,
4142
):
@@ -56,6 +57,7 @@ def __init__(
5657
The scale factor to be used for expanding the boundary extents
5758
during spatial queries. If not provided, the default from settings
5859
will be used.
60+
min_qv : Optional[float], default 0
5961
6062
Raises
6163
------
@@ -71,6 +73,7 @@ def __init__(
7173
boundaries_fn = self.settings.boundaries.filename
7274
self._boundaries_filepath = self._base_dir / boundaries_fn
7375
self.n_workers = n_workers
76+
self.min_qv = min_qv
7477
self.settings.boundaries.scale_factor = 1
7578
nuclear_column = getattr(self.settings.transcripts, "nuclear_column", None)
7679
if nuclear_column is None or self.settings.boundaries.scale_factor != 1.0:
@@ -641,23 +644,23 @@ def __init__(
641644
self.settings = self.sample.settings
642645

643646
# Load data from parquet files
644-
self._load_transcripts(self.sample._transcripts_filepath)
647+
self._load_transcripts(self.sample._transcripts_filepath, self.sample.min_qv)
645648
self._load_boundaries(self.sample._boundaries_filepath)
646649

647650
# Pre-load KDTrees
648651
self.kdtree_tx = KDTree(
649652
self.transcripts[self.settings.transcripts.xy], leafsize=100
650653
)
651654

652-
def _load_transcripts(self, path: os.PathLike, min_qv: float = 30.0):
655+
def _load_transcripts(self, path: os.PathLike, min_qv: float = 0.0):
653656
"""
654657
Loads and filters the transcripts dataframe for the dataset.
655658
656659
Parameters
657660
----------
658661
path : os.PathLike
659662
The file path to the transcripts parquet file.
660-
min_qv : float, optional, default 30.0
663+
min_qv : float, optional, default 0.0
661664
The minimum quality value (QV) for filtering transcripts.
662665
663666
Raises

0 commit comments

Comments
 (0)