Skip to content

Commit

Permalink
judge channels implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
kdoroschak committed Mar 17, 2021
1 parent 38fac06 commit 6e6ad46
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
8 changes: 8 additions & 0 deletions src/poretitioner/utils/segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,14 @@ def segment(
local_logger.debug(
f"Segmenting configuration '{bulk_f5_filepath}' and saving results at location '{save_location}' "
)
good_channels = judge_channels(
bulk_f5_filepath,
segment_config.open_channel_prior_mean,
segment_config.open_channel_prior_stdv,
)

object.__setattr__(segment_config, "good_channels", good_channels)

return parallel_find_captures(
config,
segment_config,
Expand Down
7 changes: 5 additions & 2 deletions src/tests/test_segment.py
Original file line number Diff line number Diff line change
Expand Up @@ -611,7 +611,6 @@ def prep_capture_windows_test():
assert count_by_channel[channel_number] == 4


@pytest.mark.xfail(reason="Need to implement config (filters currently in progress).")
class TestParallelFindCaptures:
def parallel_find_captures_test(self):
bulk_f5_fname = "src/tests/data/bulk_fast5_dummy.fast5"
Expand Down Expand Up @@ -735,7 +734,11 @@ def segment_test(self):
"translocation_delay": 20,
"open_channel_prior_mean": 220,
"open_channel_prior_stdv": 50,
"good_channels": [1, 3],
"good_channels": [
1,
2,
3,
], # this will be internally overwritten by the good channels calculation, which should not include channel 2
"end_tolerance": 50,
"terminal_capture_only": False,
"n_captures_per_file": 1000,
Expand Down

0 comments on commit 6e6ad46

Please sign in to comment.