Class: Rafflesia::Maps

Inherits:
Object
  • Object
show all
Defined in:
lib/rafflesia/maps.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Maps

Returns a new instance of Maps.



9
10
11
# File 'lib/rafflesia/maps.rb', line 9

def initialize(client)
  @client = client
end

Instance Method Details

#metadataIngest(allow_network: nil, database: nil, emdb_ids: nil, output_format: nil, output_relation: nil, partition_by: nil, preview_limit: nil, relation: nil, release: nil, sort_by: nil, request_options: {}) ⇒ Rafflesia::EnvelopeMapMetadataIngestData

POST /v1/maps/metadata/ingest

Parameters:

  • allow_network (Boolean, nil) (defaults to: nil)

    Allow remote EMDB metadata download when an entry is not already cached.

  • database (String, nil) (defaults to: nil)

    Database name published with the relation

  • emdb_ids (Array<String>, nil) (defaults to: nil)

    EMDB accessions to ingest metadata for, for example EMD-14322.

  • output_format (Rafflesia::Types::MapMetadataIngestRequestOutputFormat, nil) (defaults to: nil)

    Requested durable relation format; parquet is the initial physical format

  • output_relation (String, nil) (defaults to: nil)

    Local output path or alias for a durable relation artifact

  • partition_by (Array<String>, nil) (defaults to: nil)

    Requested physical partition columns

  • preview_limit (Integer, nil) (defaults to: nil)

    When output_relation is requested, include at most this many rows as a non-pageable preview

  • relation (String, nil) (defaults to: nil)

    Requested logical relation name

  • release (String, nil) (defaults to: nil)

    Immutable database release published with the relation

  • sort_by (Array<String>, nil) (defaults to: nil)

    Requested physical sort columns

  • request_options (Hash) (defaults to: {})

    (see Rafflesia::Types::RequestOptions)

Returns:



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/rafflesia/maps.rb', line 26

def metadataIngest(
  allow_network: nil,
  database: nil,
  emdb_ids: nil,
  output_format: nil,
  output_relation: nil,
  partition_by: nil,
  preview_limit: nil,
  relation: nil,
  release: nil,
  sort_by: nil,
  request_options: {}
)
  body = {
    'allow_network' => allow_network,
    'database' => database,
    'emdb_ids' => emdb_ids,
    'output_format' => output_format,
    'output_relation' => output_relation,
    'partition_by' => partition_by,
    'preview_limit' => preview_limit,
    'relation' => relation,
    'release' => release,
    'sort_by' => sort_by
  }.compact
  response = @client.request(
    method: :post,
    path: '/v1/maps/metadata/ingest',
    auth: true,
    body: body,
    request_options: request_options
  )
  result = Rafflesia::EnvelopeMapMetadataIngestData.new(response.body)
  result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
  result
end

#modelsCandidatesExport(archive_artifact_manifest_object_id: nil, archive_artifact_manifest_path: nil, dataset_name: nil, dataset_version: nil, output_dir: nil, request_options: {}) ⇒ Rafflesia::EnvelopeMapModelCandidateExportData

POST /v1/maps/models/candidates/export

Parameters:

  • archive_artifact_manifest_object_id (String, nil) (defaults to: nil)
  • archive_artifact_manifest_path (String, nil) (defaults to: nil)
  • dataset_name (String, nil) (defaults to: nil)
  • dataset_version (String, nil) (defaults to: nil)
  • output_dir (String, nil) (defaults to: nil)
  • request_options (Hash) (defaults to: {})

    (see Rafflesia::Types::RequestOptions)

Returns:



71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/rafflesia/maps.rb', line 71

def modelsCandidatesExport(
  archive_artifact_manifest_object_id: nil,
  archive_artifact_manifest_path: nil,
  dataset_name: nil,
  dataset_version: nil,
  output_dir: nil,
  request_options: {}
)
  body = {
    'archive_artifact_manifest_object_id' => archive_artifact_manifest_object_id,
    'archive_artifact_manifest_path' => archive_artifact_manifest_path,
    'dataset_name' => dataset_name,
    'dataset_version' => dataset_version,
    'output_dir' => output_dir
  }.compact
  response = @client.request(
    method: :post,
    path: '/v1/maps/models/candidates/export',
    auth: true,
    body: body,
    request_options: request_options
  )
  result = Rafflesia::EnvelopeMapModelCandidateExportData.new(response.body)
  result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
  result
end

#modelsEvidenceExport(allow_network: nil, database: nil, map_ids: nil, output_format: nil, output_relation: nil, partition_by: nil, preview_limit: nil, relation: nil, release: nil, sort_by: nil, request_options: {}) ⇒ Rafflesia::EnvelopeMapModelEvidenceData

POST /v1/maps/models/evidence/export

Parameters:

  • allow_network (Boolean, nil) (defaults to: nil)

    Allow remote EMDB metadata download when a referenced map is not already cached.

  • database (String, nil) (defaults to: nil)

    Database name published with the relation

  • map_ids (Array<String>, nil) (defaults to: nil)

    Restrict to associations for these map ids; empty means every recorded association.

  • output_format (Rafflesia::Types::MapModelEvidenceExportRequestOutputFormat, nil) (defaults to: nil)

    Requested durable relation format; parquet is the initial physical format

  • output_relation (String, nil) (defaults to: nil)

    Local output path or alias for a durable relation artifact

  • partition_by (Array<String>, nil) (defaults to: nil)

    Requested physical partition columns

  • preview_limit (Integer, nil) (defaults to: nil)

    When output_relation is requested, include at most this many rows as a non-pageable preview

  • relation (String, nil) (defaults to: nil)

    Requested logical relation name

  • release (String, nil) (defaults to: nil)

    Immutable database release published with the relation

  • sort_by (Array<String>, nil) (defaults to: nil)

    Requested physical sort columns

  • request_options (Hash) (defaults to: {})

    (see Rafflesia::Types::RequestOptions)

Returns:



111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/rafflesia/maps.rb', line 111

def modelsEvidenceExport(
  allow_network: nil,
  database: nil,
  map_ids: nil,
  output_format: nil,
  output_relation: nil,
  partition_by: nil,
  preview_limit: nil,
  relation: nil,
  release: nil,
  sort_by: nil,
  request_options: {}
)
  body = {
    'allow_network' => allow_network,
    'database' => database,
    'map_ids' => map_ids,
    'output_format' => output_format,
    'output_relation' => output_relation,
    'partition_by' => partition_by,
    'preview_limit' => preview_limit,
    'relation' => relation,
    'release' => release,
    'sort_by' => sort_by
  }.compact
  response = @client.request(
    method: :post,
    path: '/v1/maps/models/evidence/export',
    auth: true,
    body: body,
    request_options: request_options
  )
  result = Rafflesia::EnvelopeMapModelEvidenceData.new(response.body)
  result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
  result
end

#modelsFitApply(candidate:, map_id:, structure_id:, max_voxel_bytes: nil, target_id: nil, threshold: nil, request_options: {}) ⇒ Rafflesia::EnvelopeMapModelFitCandidateApplyData

POST /v1/maps/models/fit/apply

Parameters:

  • candidate (Rafflesia::MapModelFitCandidate)
  • map_id (String)
  • max_voxel_bytes (Integer, nil) (defaults to: nil)
  • structure_id (String)
  • target_id (String, nil) (defaults to: nil)
  • threshold (Float, nil) (defaults to: nil)
  • request_options (Hash) (defaults to: {})

    (see Rafflesia::Types::RequestOptions)

Returns:



157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# File 'lib/rafflesia/maps.rb', line 157

def modelsFitApply(
  candidate:,
  map_id:,
  structure_id:,
  max_voxel_bytes: nil,
  target_id: nil,
  threshold: nil,
  request_options: {}
)
  body = {
    'candidate' => candidate,
    'map_id' => map_id,
    'max_voxel_bytes' => max_voxel_bytes,
    'structure_id' => structure_id,
    'target_id' => target_id,
    'threshold' => threshold
  }.compact
  response = @client.request(
    method: :post,
    path: '/v1/maps/models/fit/apply',
    auth: true,
    body: body,
    request_options: request_options
  )
  result = Rafflesia::EnvelopeMapModelFitCandidateApplyData.new(response.body)
  result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
  result
end

#modelsFitCandidates(cyclic_copy_count:, map_id:, seed:, structure_id:, candidate_count: nil, max_voxel_bytes: nil, maximum_radius_angstrom: nil, minimum_radius_angstrom: nil, restart_count: nil, threshold: nil, request_options: {}) ⇒ Rafflesia::EnvelopeMapModelFitCandidateSearchData

POST /v1/maps/models/fit/candidates

Parameters:

  • candidate_count (Integer, nil) (defaults to: nil)
  • cyclic_copy_count (Integer)
  • map_id (String)
  • max_voxel_bytes (Integer, nil) (defaults to: nil)
  • maximum_radius_angstrom (Float, nil) (defaults to: nil)
  • minimum_radius_angstrom (Float, nil) (defaults to: nil)
  • restart_count (Integer, nil) (defaults to: nil)
  • seed (Integer)
  • structure_id (String)
  • threshold (Float, nil) (defaults to: nil)
  • request_options (Hash) (defaults to: {})

    (see Rafflesia::Types::RequestOptions)

Returns:



199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/rafflesia/maps.rb', line 199

def modelsFitCandidates(
  cyclic_copy_count:,
  map_id:,
  seed:,
  structure_id:,
  candidate_count: nil,
  max_voxel_bytes: nil,
  maximum_radius_angstrom: nil,
  minimum_radius_angstrom: nil,
  restart_count: nil,
  threshold: nil,
  request_options: {}
)
  body = {
    'candidate_count' => candidate_count,
    'cyclic_copy_count' => cyclic_copy_count,
    'map_id' => map_id,
    'max_voxel_bytes' => max_voxel_bytes,
    'maximum_radius_angstrom' => maximum_radius_angstrom,
    'minimum_radius_angstrom' => minimum_radius_angstrom,
    'restart_count' => restart_count,
    'seed' => seed,
    'structure_id' => structure_id,
    'threshold' => threshold
  }.compact
  response = @client.request(
    method: :post,
    path: '/v1/maps/models/fit/candidates',
    auth: true,
    body: body,
    request_options: request_options
  )
  result = Rafflesia::EnvelopeMapModelFitCandidateSearchData.new(response.body)
  result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
  result
end

#modelsFitExport(candidate_dataset_manifest_path: nil, candidate_table_path: nil, dataset_name: nil, dataset_version: nil, max_pairs: nil, max_voxel_bytes: nil, output_dir: nil, threshold: nil, request_options: {}) ⇒ Rafflesia::EnvelopeMapModelFitBatchExportData

POST /v1/maps/models/fit/export

Parameters:

  • candidate_dataset_manifest_path (String, nil) (defaults to: nil)
  • candidate_table_path (String, nil) (defaults to: nil)
  • dataset_name (String, nil) (defaults to: nil)
  • dataset_version (String, nil) (defaults to: nil)
  • max_pairs (Integer, nil) (defaults to: nil)
  • max_voxel_bytes (Integer, nil) (defaults to: nil)
  • output_dir (String, nil) (defaults to: nil)
  • threshold (Float, nil) (defaults to: nil)
  • request_options (Hash) (defaults to: {})

    (see Rafflesia::Types::RequestOptions)

Returns:



247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
# File 'lib/rafflesia/maps.rb', line 247

def modelsFitExport(
  candidate_dataset_manifest_path: nil,
  candidate_table_path: nil,
  dataset_name: nil,
  dataset_version: nil,
  max_pairs: nil,
  max_voxel_bytes: nil,
  output_dir: nil,
  threshold: nil,
  request_options: {}
)
  body = {
    'candidate_dataset_manifest_path' => candidate_dataset_manifest_path,
    'candidate_table_path' => candidate_table_path,
    'dataset_name' => dataset_name,
    'dataset_version' => dataset_version,
    'max_pairs' => max_pairs,
    'max_voxel_bytes' => max_voxel_bytes,
    'output_dir' => output_dir,
    'threshold' => threshold
  }.compact
  response = @client.request(
    method: :post,
    path: '/v1/maps/models/fit/export',
    auth: true,
    body: body,
    request_options: request_options
  )
  result = Rafflesia::EnvelopeMapModelFitBatchExportData.new(response.body)
  result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
  result
end

#modelsFitScore(map_id:, structure_id:, max_voxel_bytes: nil, threshold: nil, request_options: {}) ⇒ Rafflesia::EnvelopeMapModelFitScoreData

POST /v1/maps/models/fit/score

Parameters:

  • map_id (String)
  • max_voxel_bytes (Integer, nil) (defaults to: nil)
  • structure_id (String)
  • threshold (Float, nil) (defaults to: nil)
  • request_options (Hash) (defaults to: {})

    (see Rafflesia::Types::RequestOptions)

Returns:



287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
# File 'lib/rafflesia/maps.rb', line 287

def modelsFitScore(
  map_id:,
  structure_id:,
  max_voxel_bytes: nil,
  threshold: nil,
  request_options: {}
)
  body = {
    'map_id' => map_id,
    'max_voxel_bytes' => max_voxel_bytes,
    'structure_id' => structure_id,
    'threshold' => threshold
  }.compact
  response = @client.request(
    method: :post,
    path: '/v1/maps/models/fit/score',
    auth: true,
    body: body,
    request_options: request_options
  )
  result = Rafflesia::EnvelopeMapModelFitScoreData.new(response.body)
  result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
  result
end

#modelsLinksCreate(map_id:, structure_id:, metadata: nil, method_: nil, model_id: nil, source: nil, source_url: nil, request_options: {}) ⇒ Rafflesia::EnvelopeMapModelAssociationData

POST /v1/maps/models/links/create

Parameters:

  • map_id (String)
  • metadata (Hash{String => String}, nil) (defaults to: nil)
  • method (String, nil)
  • model_id (String, nil) (defaults to: nil)
  • source (String, nil) (defaults to: nil)
  • source_url (String, nil) (defaults to: nil)
  • structure_id (String)
  • request_options (Hash) (defaults to: {})

    (see Rafflesia::Types::RequestOptions)

Returns:



322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
# File 'lib/rafflesia/maps.rb', line 322

def modelsLinksCreate(
  map_id:,
  structure_id:,
  metadata: nil,
  method_: nil,
  model_id: nil,
  source: nil,
  source_url: nil,
  request_options: {}
)
  body = {
    'map_id' => map_id,
    'metadata' => ,
    'method' => method_,
    'model_id' => model_id,
    'source' => source,
    'source_url' => source_url,
    'structure_id' => structure_id
  }.compact
  response = @client.request(
    method: :post,
    path: '/v1/maps/models/links/create',
    auth: true,
    body: body,
    request_options: request_options
  )
  result = Rafflesia::EnvelopeMapModelAssociationData.new(response.body)
  result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
  result
end

#modelsList(database: nil, map_id: nil, model_id: nil, output_format: nil, output_relation: nil, partition_by: nil, preview_limit: nil, relation: nil, release: nil, sort_by: nil, structure_id: nil, request_options: {}) ⇒ Rafflesia::EnvelopeMapModelAssociationsData

POST /v1/maps/models/list

Parameters:

  • database (String, nil) (defaults to: nil)

    Database name published with the relation

  • map_id (String, nil) (defaults to: nil)
  • model_id (String, nil) (defaults to: nil)
  • output_format (Rafflesia::Types::MapModelListRequestOutputFormat, nil) (defaults to: nil)

    Requested durable relation format; parquet is the initial physical format

  • output_relation (String, nil) (defaults to: nil)

    Local output path or alias for a durable relation artifact

  • partition_by (Array<String>, nil) (defaults to: nil)

    Requested physical partition columns

  • preview_limit (Integer, nil) (defaults to: nil)

    When output_relation is requested, include at most this many rows as a non-pageable preview

  • relation (String, nil) (defaults to: nil)

    Requested logical relation name

  • release (String, nil) (defaults to: nil)

    Immutable database release published with the relation

  • sort_by (Array<String>, nil) (defaults to: nil)

    Requested physical sort columns

  • structure_id (String, nil) (defaults to: nil)
  • request_options (Hash) (defaults to: {})

    (see Rafflesia::Types::RequestOptions)

Returns:



367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
# File 'lib/rafflesia/maps.rb', line 367

def modelsList(
  database: nil,
  map_id: nil,
  model_id: nil,
  output_format: nil,
  output_relation: nil,
  partition_by: nil,
  preview_limit: nil,
  relation: nil,
  release: nil,
  sort_by: nil,
  structure_id: nil,
  request_options: {}
)
  body = {
    'database' => database,
    'map_id' => map_id,
    'model_id' => model_id,
    'output_format' => output_format,
    'output_relation' => output_relation,
    'partition_by' => partition_by,
    'preview_limit' => preview_limit,
    'relation' => relation,
    'release' => release,
    'sort_by' => sort_by,
    'structure_id' => structure_id
  }.compact
  response = @client.request(
    method: :post,
    path: '/v1/maps/models/list',
    auth: true,
    body: body,
    request_options: request_options
  )
  result = Rafflesia::EnvelopeMapModelAssociationsData.new(response.body)
  result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
  result
end

#recordsFetch(emdb_id:, allow_network: nil, include_volume: nil, max_download_bytes: nil, volume_source_url: nil, request_options: {}) ⇒ Rafflesia::EnvelopeCryoEmMapData

POST /v1/maps/records/fetch

Parameters:

  • allow_network (Boolean, nil) (defaults to: nil)
  • emdb_id (String)
  • include_volume (Boolean, nil) (defaults to: nil)

    When true, download and store the EMDB voxel map object instead of metadata JSON.

  • max_download_bytes (Integer, nil) (defaults to: nil)

    Maximum EMDB volume download size in bytes; defaults to 500 MiB.

  • volume_source_url (String, nil) (defaults to: nil)

    Optional explicit EMDB map volume URL; defaults to the canonical EMDB FTP map path.

  • request_options (Hash) (defaults to: {})

    (see Rafflesia::Types::RequestOptions)

Returns:



414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
# File 'lib/rafflesia/maps.rb', line 414

def recordsFetch(
  emdb_id:,
  allow_network: nil,
  include_volume: nil,
  max_download_bytes: nil,
  volume_source_url: nil,
  request_options: {}
)
  body = {
    'allow_network' => allow_network,
    'emdb_id' => emdb_id,
    'include_volume' => include_volume,
    'max_download_bytes' => max_download_bytes,
    'volume_source_url' => volume_source_url
  }.compact
  response = @client.request(
    method: :post,
    path: '/v1/maps/records/fetch',
    auth: true,
    body: body,
    request_options: request_options
  )
  result = Rafflesia::EnvelopeCryoEmMapData.new(response.body)
  result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
  result
end

#recordsImport(path:, emdb_id: nil, map_id: nil, source: nil, request_options: {}) ⇒ Rafflesia::EnvelopeCryoEmMapData

POST /v1/maps/records/import

Parameters:

  • emdb_id (String, nil) (defaults to: nil)
  • map_id (String, nil) (defaults to: nil)
  • path (String)
  • source (String, nil) (defaults to: nil)
  • request_options (Hash) (defaults to: {})

    (see Rafflesia::Types::RequestOptions)

Returns:



448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
# File 'lib/rafflesia/maps.rb', line 448

def recordsImport(
  path:,
  emdb_id: nil,
  map_id: nil,
  source: nil,
  request_options: {}
)
  body = {
    'emdb_id' => emdb_id,
    'map_id' => map_id,
    'path' => path,
    'source' => source
  }.compact
  response = @client.request(
    method: :post,
    path: '/v1/maps/records/import',
    auth: true,
    body: body,
    request_options: request_options
  )
  result = Rafflesia::EnvelopeCryoEmMapData.new(response.body)
  result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
  result
end

#recordsMetadata(map_id:, request_options: {}) ⇒ Rafflesia::EnvelopeCryoEmMapData

POST /v1/maps/records/metadata

Parameters:

  • map_id (String)
  • request_options (Hash) (defaults to: {})

    (see Rafflesia::Types::RequestOptions)

Returns:



477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
# File 'lib/rafflesia/maps.rb', line 477

def (
  map_id:,
  request_options: {}
)
  body = {
    'map_id' => map_id
  }
  response = @client.request(
    method: :post,
    path: '/v1/maps/records/metadata',
    auth: true,
    body: body,
    request_options: request_options
  )
  result = Rafflesia::EnvelopeCryoEmMapData.new(response.body)
  result.last_response = Rafflesia::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
  result
end