From bb5cb73a016456d46c5438ab46df11f30f8dda36 Mon Sep 17 00:00:00 2001 From: Psy-Fer Date: Tue, 3 Sep 2024 14:45:12 +1000 Subject: [PATCH 1/2] add api_request and device_data_error end_reasons --- src/blue_crab.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/blue_crab.py b/src/blue_crab.py index 3da3e3d..b0c8d4a 100755 --- a/src/blue_crab.py +++ b/src/blue_crab.py @@ -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: @@ -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: @@ -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 @@ -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 @@ -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 From 1ddbfccb67c2d8eac418d2f4d26c13f01f9db816 Mon Sep 17 00:00:00 2001 From: Psy-Fer Date: Tue, 3 Sep 2024 14:45:33 +1000 Subject: [PATCH 2/2] bump version to v0.1.2 --- src/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_version.py b/src/_version.py index b81b158..5cbf96b 100644 --- a/src/_version.py +++ b/src/_version.py @@ -1 +1 @@ -__version__="0.1.1" +__version__="0.1.2"