Skip to content

Commit 3bcc3bc

Browse files
committed
Version 6.4.2 bump
1 parent d6ce6bb commit 3bcc3bc

File tree

89 files changed

+9611
-4794
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+9611
-4794
lines changed

README.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,15 @@ See [AUTH.md](AUTH.md) for information on authenticating with the MinKNOW API.
8686
The files in [`proto/minknow_api`](proto/minknow_api/) describe MinKNOW's APIs. Each file
8787
describes a single *service*, which covers a specific area of MinKNOW's functionality.
8888

89-
There are two global services, the [manager service](proto/minknow_api/manager.proto) and
89+
**Prior to 6.3**, there are two global services, the [manager service](proto/minknow_api/manager.proto) and
9090
[basecaller service](proto/minknow_api/basecaller.proto). There is only one instance of each of
91-
these services: see below for how to connect to them. All other services are provided by each flow
92-
cell position independently. For example, if you are using a GridION X5, which has 5 flow cell
91+
these services: see below for how to connect to them.
92+
93+
**For 6.3 and above** we have begun to construct a 'consolidated' API which is intended to simplify control and interrogation of protocol/acquisition runs.
94+
This new API is also present on the 'manager' executable, and proxies requests to individual `control_server` instances.
95+
As such, it only requires a single gRPC client for _any number_ of flow cell positions.
96+
97+
The original per-flow-cell-position APIs are still maintained on each flow cell position independently. For example, if you are using a GridION X5, which has 5 flow cell
9398
positions, there will be 5 ports (or sets of ports - secure, gRPC Web, etc), each of which
9499
will provide *all* the other services.
95100

@@ -127,6 +132,17 @@ information about protocol runs from before the last restart is not available vi
127132
See the [`start_protocol` example](python/minknow_api/examples/start_protocol.py) for an example of how to use
128133
this service to start a protocol.
129134

135+
### v2/protocol.proto
136+
137+
**6.3+ only!**
138+
139+
[This is the first 'consolidated' API.](proto/minknow_api/v2/protocol.proto) It is (like the endpoints on `manager.proto`) always available on port `9501` and `9502`.
140+
141+
It allows for protocols to be started on multiple positions simultaneously.
142+
Once started, multiple protocols may also be stopped using only their `protocol_run_ids`, without reference to the flow cell positions on which they are running.
143+
144+
This pattern is intended to be extended to all methods of interacting with protocols - 'start' should be the only call that requires the user to provide information about a specific position.
145+
130146
### acquisition.proto
131147

132148
The main work of a protocol is acquiring data, and this is managed in
@@ -209,8 +225,9 @@ If you are using the `minknow_api` Python package, this is all handled for you.
209225
gRPC client libraries directly (for example, if you are connecting from a language other than
210226
Python), you will need to tell the library about MinKNOW's TLS certificates.
211227

212-
Within the MinKNOW installation, you can find the CA certificate at `conf/rpc-certs/ca.crt`. This
213-
can be passed to most gRPC client libraries as part of creating a secure/SSL channel.
228+
You can find the CA certificate by default at the location `<data_dir>/rpc-certs/minknow/ca.crt`,
229+
where `<data_dir>` maps to `C:\\data` on Windows and `/data` on Ubuntu and MacOS platforms.
230+
This can be passed to most gRPC client libraries as part of creating a secure/SSL channel.
214231

215232
Note that this certificate is only valid for the "localhost" name - connecting to `127.0.0.1`
216233
directly will not work, nor will connecting across the network. You can work around this by

proto/minknow_api/acquisition.proto

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ syntax="proto3";
33
package minknow_api.acquisition;
44

55
option java_package = "com.nanoporetech.minknow_api";
6+
option go_package ="github.com/nanoporetech/minknow_api/go/gen/acquisition";
67
option objc_class_prefix = "MKAPI";
78

9+
import "minknow_api/analysis_configuration.proto";
810
import "minknow_api/run_until.proto";
911
import "minknow_api/rpc_options.proto";
1012
import "google/protobuf/timestamp.proto";
@@ -674,8 +676,18 @@ message AcquisitionConfigSummary {
674676

675677
// Was basecalling enabled for the run.
676678
bool basecalling_enabled = 1;
677-
// Basecalling configuration filename (if basecalling enabled)
678-
string basecalling_config_filename = 16;
679+
oneof basecall_model {
680+
// Basecalling configuration filename (if basecalling enabled)
681+
string basecalling_config_filename = 16;
682+
683+
// Specify the models to run by name (see find_basecall_configurations in manager.proto)
684+
//
685+
// Model names should be taken from the `name` field of the above RPC directly.
686+
//
687+
// Since 6.3
688+
analysis_configuration.BasecallerConfiguration.ModelNames basecalling_model_names = 25;
689+
}
690+
679691
// Basecalling model version (empty if basecalling not enabled)
680692
// Since 6.0
681693
string basecalling_model_version = 24;

proto/minknow_api/analysis_configuration.proto

Lines changed: 79 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ syntax="proto3";
22

33
package minknow_api.analysis_configuration;
44

5+
option go_package ="github.com/nanoporetech/minknow_api/go/gen/analysis_configuration";
56
option java_package = "com.nanoporetech.minknow_api";
67
option objc_class_prefix = "MKAPI";
78

89
import "google/protobuf/duration.proto";
910
import "google/protobuf/empty.proto";
1011
import "google/protobuf/wrappers.proto";
12+
import "minknow_api/read_end_reason.proto";
1113
import "minknow_api/rpc_options.proto";
1214

1315
service AnalysisConfigurationService {
@@ -184,6 +186,14 @@ service AnalysisConfigurationService {
184186
// The new analysis parameters will be used after any data already received has been processe.
185187
rpc set_dynamic_analysis_configuration(DynamicAnalysisConfiguration) returns (SetDynamicAnalysisConfigurationResponse) { }
186188

189+
// Basecall configuration defaults
190+
//
191+
// These defaults will be based on the connected flow cell type and the selected base calling substrate.
192+
//
193+
// Since 6.3
194+
rpc find_basecall_configuration_defaults(FindBasecallConfigurationDefaultsRequest) returns (FindBasecallConfigurationDefaultsResponse) {
195+
option (experimental) = true;
196+
}
187197
}
188198

189199
message EventDetection {
@@ -238,6 +248,13 @@ message EventDetection {
238248
//
239249
// Note: no longer used.
240250
uint32 max_mux_change_back_shift = 18;
251+
252+
// Force minknow to detect events even when channels are disconnected
253+
//
254+
// If set to false (the default) events are not detected when channels are set outside well 1-4.
255+
//
256+
// If set to true events are always detected.
257+
bool force_detect_events_when_disconnected = 20;
241258
}
242259

243260
message ReadDetectionParams {
@@ -834,16 +851,44 @@ message BasecallerConfiguration
834851
google.protobuf.UInt64Value max_bases = 3;
835852
}
836853

854+
// A set of model names to run in the basecaller.
855+
message ModelNames {
856+
// Simplex model to use when basecalling.
857+
//
858+
// This field is not optional - empty values are invalid.
859+
string simplex_model = 1;
860+
861+
// An optional list of modified bases to use, the caller is responsible
862+
// for ensuring these are compatible modifications.
863+
//
864+
// An empty list will lead to no modified base calling.
865+
repeated string modified_models = 2;
866+
867+
// An optional stereo model to use for calling.
868+
//
869+
// And empty string will perform no stereo step.
870+
string stereo_model = 3;
871+
}
872+
837873
// Choose if the basecaller is enabled or disabled.
838874
//
839875
// If set to false then no basecalling will take place, and the rest of the config is ignored.
840876
bool enable = 2;
841877

842-
// The basecaller cfg file with all the settings.
843-
//
844-
// Filename can be absolute, or a basename (eg dna_r9.4_450bps.cfg)
845-
// which the basecaller should locate (see basecaller application config entry: "data_path")
846-
string config_filename = 1;
878+
oneof basecall_model {
879+
// The basecaller cfg file with all the settings.
880+
//
881+
// Filename can be absolute, or a basename (eg dna_r9.4_450bps.cfg)
882+
// which the basecaller should locate (see basecaller application config entry: "data_path")
883+
string config_filename = 1;
884+
885+
// Specify the models to run by name (see find_basecall_configurations in manager.proto)
886+
//
887+
// Model names should be taken from the `name` field of the above RPC directly.
888+
//
889+
// Since 6.3
890+
ModelNames model_names = 12;
891+
}
847892

848893
// Enable or disable pass/fail filtering based on alignment. When enabled, reads which
849894
// do not align to any references will be marked as "failed", and written to the folder
@@ -915,6 +960,11 @@ message BasecallerConfiguration
915960
//
916961
// Note: Since 5.9 this option has no effect, the basecaller is responsible for deciding read splitting score.
917962
google.protobuf.FloatValue min_score_read_splitting = 9;
963+
964+
// Enable poly a tail estimation.
965+
//
966+
// Since 6.3
967+
bool estimate_poly_a = 11;
918968
}
919969

920970
message SetBasecallerConfigurationRequest
@@ -1575,7 +1625,31 @@ message DynamicAnalysisConfiguration {
15751625

15761626
// Parameters for read scale tracking:
15771627
ReadScaleTracking read_scale_tracking = 1;
1628+
1629+
// Force MinKNOW to not write or basecall all data from the live
1630+
// sequencing stream.
1631+
//
1632+
// This may be useful if there is a section of data that is not
1633+
// wanted in the final output files and reports.
1634+
bool force_veto_all_reads = 2;
1635+
1636+
// Force MinKNOW to not write or basecall data with specific end reasons.
1637+
//
1638+
// This may be useful if there is a section of data that is not
1639+
// wanted in the final output files and reports.
1640+
repeated read_end_reason.ReadEndReason force_veto_end_reasons = 3;
15781641
}
15791642

15801643
message GetDynamicAnalysisConfigurationRequest {}
15811644
message SetDynamicAnalysisConfigurationResponse {}
1645+
1646+
message FindBasecallConfigurationDefaultsRequest {
1647+
}
1648+
1649+
message FindBasecallConfigurationDefaultsResponse {
1650+
// The default variant to be used.
1651+
//
1652+
// This can be used to search the results of manager.find_basecall_configurations
1653+
// for a simplex model with a matching variant.
1654+
string default_variant = 1;
1655+
}

proto/minknow_api/analysis_workflows.proto

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ syntax="proto3";
22

33
package minknow_api.analysis_workflows;
44

5+
option go_package ="github.com/nanoporetech/minknow_api/go/gen/analysis_workflow";
56
option java_package = "com.nanoporetech.minknow_api";
67
option objc_class_prefix = "MKAPI";
78

@@ -36,3 +37,11 @@ message ProxyResponse {
3637
uint32 status_code = 1;
3738
string response_body = 2;
3839
}
40+
41+
message AnalysisWorkflowRequest {
42+
// The id of the workflow to start
43+
string workflow_id = 1;
44+
45+
// The parameters to send to the workflow, represented as a stringified JSON object
46+
string parameters = 2;
47+
}

proto/minknow_api/basecaller.proto

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ syntax="proto3";
22

33
package minknow_api.basecaller;
44

5+
option go_package ="github.com/nanoporetech/minknow_api/go/gen/basecaller";
56
option java_package = "com.nanoporetech.minknow_api";
67
option objc_class_prefix = "MKAPI";
78

@@ -171,8 +172,17 @@ message StartBasecallingRequest {
171172
// Reads will be sorted into subdirectories based on the sequencing run they came from.
172173
string output_reads_directory = 2;
173174

174-
// The name of the basecalling configuration to use.
175-
string configuration = 3;
175+
oneof basecall_model {
176+
// The name of the basecalling configuration to use.
177+
string configuration = 3;
178+
179+
// Specify the models to run by name (see find_basecall_configurations in manager.proto)
180+
//
181+
// Model names should be taken from the `name` field of the above RPC directly.
182+
//
183+
// Since 6.3
184+
analysis_configuration.BasecallerConfiguration.ModelNames model_names = 16;
185+
}
176186

177187
// Enable output of .fast5 files containing original raw reads, event data/trace table from
178188
// basecall and basecall result sequence.
@@ -208,7 +218,7 @@ message StartBasecallingRequest {
208218
// Minimum Q-Score for a read to be passed by the basecaller.
209219
//
210220
// Since 6.1.
211-
optional double min_qscore = 15;
221+
double min_qscore = 15;
212222

213223
// Enable read splitting in the basecaller
214224
//
@@ -220,6 +230,11 @@ message StartBasecallingRequest {
220230
//
221231
// Note: Since 5.9 this option has no effect, the basecaller is responsible for deciding when read splitting should be enabled.
222232
google.protobuf.FloatValue min_score_read_splitting = 14;
233+
234+
// Enable poly a tail estimation.
235+
//
236+
// Since 6.3
237+
bool estimate_poly_a = 156;
223238
}
224239

225240
message StartBasecallingResponse {
@@ -333,7 +348,12 @@ message StartRequest {
333348
basecaller.StartPostProcessingProtocolRequest start_post_processing_protocol_request = 5;
334349

335350
// Since 5.8
351+
//
352+
// DEPRECATED: use 'analysis_workflow_request'
336353
analysis_workflows.ProxyRequest proxy_request = 6;
354+
355+
// Since 6.4
356+
analysis_workflows.AnalysisWorkflowRequest analysis_workflow_request = 7;
337357
}
338358
}
339359

proto/minknow_api/data.proto

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ syntax="proto3";
33
package minknow_api.data;
44

55
option java_package = "com.nanoporetech.minknow_api";
6+
option go_package ="github.com/nanoporetech/minknow_api/go/gen/data";
67
option objc_class_prefix = "MKAPI";
78

89
import "minknow_api/rpc_options.proto";
910
import "minknow_api/device.proto";
10-
import "minknow_api/statistics.proto";
11+
import "minknow_api/read_end_reason.proto";
1112
import "google/protobuf/duration.proto";
1213
import "google/protobuf/wrappers.proto";
1314

@@ -206,8 +207,12 @@ service DataService {
206207

207208
// Returns various points of yield information for the ongoing experiment, such as complete
208209
// read information and basecaller progress.
210+
//
211+
// Note: This API does not guarantee between versions and may change as internal MinKNOW changes
212+
// require different data is monitored.
209213
rpc get_experiment_yield_info (GetExperimentYieldInfoRequest) returns (GetExperimentYieldInfoResponse) {
210214
option idempotency_level = NO_SIDE_EFFECTS;
215+
option (experimental) = true;
211216
}
212217
}
213218

@@ -662,7 +667,7 @@ message GetLiveReadsResponse {
662667
int32 previous_read_classification = 10;
663668

664669
// The classification of the chunk prior to this read starting.
665-
statistics.ReadEndReason previous_read_end_reason = 11;
670+
read_end_reason.ReadEndReason previous_read_end_reason = 11;
666671
};
667672

668673
message ActionResponse {
@@ -913,14 +918,16 @@ message GetExperimentYieldInfoResponse{
913918
uint64 pending_memory_reads = 2;
914919
uint64 pending_disk_reads = 15;
915920
uint64 pending_multi_disk_reads = 3;
916-
uint64 pending_skipped_reads = 4;
921+
uint64 pending_skipped_reads = 4; // No longer used
917922
uint64 pending_force_skipped_reads = 5;
923+
uint64 pending_retry_reads = 18;
918924
uint64 processed_memory_reads = 6;
919925
uint64 processed_disk_reads = 7;
920-
uint64 processed_skipped_reads = 8;
926+
uint64 processed_skipped_reads = 8; // No longer used
921927
uint64 processed_force_skipped_reads = 9;
922928
uint64 stored_reads_bytes_memory = 10;
923-
uint64 stored_read_supporting_bytes_memory = 16;
929+
uint64 stored_read_supporting_bytes_memory = 16; // No longer used
930+
uint64 stored_reads_bytes_memory_including_in_flight = 17;
924931
uint64 stored_reads_bytes_disk = 11;
925932
uint64 discarded_error_bytes = 12;
926933
uint64 channels_writing_to_disk = 13;
@@ -948,21 +955,23 @@ message GetExperimentYieldInfoResponse{
948955
}
949956

950957
message HdfWriterInfo {
951-
uint64 pending_compressions = 1;
952-
uint64 pending_writes = 2;
958+
uint64 pending_compressions = 1; // No longer used
959+
uint64 pending_writes = 2; // No longer used
953960
uint64 pending_hdf_tasks = 3;
954-
uint64 completed_writes = 4;
961+
uint64 completed_writes = 4; // No longer used
955962
uint64 dataset_bytes_data_in_flight = 5;
956963
}
957964

958965
message BasecallStatistics {
959966
uint64 reads_in_progress = 1;
967+
uint64 samples_in_progress = 14;
960968
uint64 reads_processed = 2;
961969
uint64 reads_skipped = 3;
962970
uint64 reads_force_skipped = 4;
963971
uint64 reads_failed_calling_filtered = 5;
964972
uint64 reads_failed_calling = 6;
965973
uint64 reads_called = 7;
974+
uint64 samples_in_client_buffer = 13;
966975
uint64 samples_called = 8;
967976
uint64 samples_skipped = 9;
968977
uint64 bases_passed_called = 10;

0 commit comments

Comments
 (0)