Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new end_reasons: api_request and device_data_error #14

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__="0.1.1"
__version__="0.1.2"
10 changes: 7 additions & 3 deletions src/blue_crab.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ def s2p_end_reason_convert(end_reason):
"data_service_unblock_mux_change": (p5.EndReasonEnum.DATA_SERVICE_UNBLOCK_MUX_CHANGE, True),
"signal_positive": (p5.EndReasonEnum.SIGNAL_POSITIVE, False),
"signal_negative": (p5.EndReasonEnum.SIGNAL_NEGATIVE, False),
"api_request": (p5.EndReasonEnum.API_REQUEST, False),
"device_data_error": (p5.EndReasonEnum.DEVICE_DATA_ERROR, False),
}

try:
Expand All @@ -112,6 +114,8 @@ def p2s_end_reason_convert(end_reason):
"data_service_unblock_mux_change": 3,
"signal_positive": 4,
"signal_negative": 5,
"api_request": 6,
"device_data_error": 7,
}

try:
Expand Down Expand Up @@ -336,7 +340,7 @@ def m2m_worker(args, input_queue, slow5_out):
s5 = slow5.Open(slow5_filepath, 'w', rec_press=args.compress, sig_press=args.sig_compress, DEBUG=0)
header = {}
sampling_rate = 0
end_reason_labels = ["unknown", "mux_change", "unblock_mux_change", "data_service_unblock_mux_change", "signal_positive", "signal_negative"]
end_reason_labels = ["unknown", "mux_change", "unblock_mux_change", "data_service_unblock_mux_change", "signal_positive", "signal_negative", "api_request", "device_data_error"]
# get header info in first read
# Get pod5 reads
count = 0
Expand Down Expand Up @@ -420,7 +424,7 @@ def m2s_worker(args, pod5_filepath_set, slow5_out):
s5 = slow5.Open(slow5_out, 'w', rec_press=args.compress, sig_press=args.sig_compress, DEBUG=0)
header = {}
sampling_rate = 0
end_reason_labels = ["unknown", "mux_change", "unblock_mux_change", "data_service_unblock_mux_change", "signal_positive", "signal_negative"]
end_reason_labels = ["unknown", "mux_change", "unblock_mux_change", "data_service_unblock_mux_change", "signal_positive", "signal_negative", "api_request", "device_data_error"]
# get header info in first read
# Get pod5 reads
count = 0
Expand Down Expand Up @@ -504,7 +508,7 @@ def s2s_worker(args, pfile, slow5_out):
s5 = slow5.Open(slow5_filepath, 'w', rec_press=args.compress, sig_press=args.sig_compress, DEBUG=0)
header = {}
sampling_rate = 0
end_reason_labels = ["unknown", "mux_change", "unblock_mux_change", "data_service_unblock_mux_change", "signal_positive", "signal_negative"]
end_reason_labels = ["unknown", "mux_change", "unblock_mux_change", "data_service_unblock_mux_change", "signal_positive", "signal_negative", "api_request", "device_data_error"]
# get header info in first read
# Get pod5 reads
count = 0
Expand Down
Loading