@apollo-annotation/jbrowse-plugin-apollo 0.1.20 → 0.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5541,18 +5541,18 @@
5541
5541
  key: "executeOnServer",
5542
5542
  value: function () {
5543
5543
  var _executeOnServer = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(backend) {
5544
- var assemblyModel, fileModel, filesService, user, assembly, changes, logger, _iterator2, _step2, _logger$debug, _logger$debug2, _logger$debug3, _logger$debug4, change, assemblyName, fileIds, fileId, FILE_UPLOAD_FOLDER, fileDoc, assemblyDoc, _yield$assemblyModel$, _yield$assemblyModel$2, newAssemblyDoc, featureStream, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, f, _logger$verbose, gff3Feature;
5544
+ var assemblyModel, checkModel, fileModel, filesService, user, assembly, changes, logger, _iterator2, _step2, _logger$debug, _logger$debug2, _logger$debug3, _logger$debug4, change, assemblyName, fileIds, fileId, FILE_UPLOAD_FOLDER, fileDoc, assemblyDoc, checkDocs, checks, _yield$assemblyModel$, _yield$assemblyModel$2, newAssemblyDoc, featureStream, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, f, _logger$verbose, gff3Feature;
5545
5545
  return _regeneratorRuntime().wrap(function _callee$(_context) {
5546
5546
  while (1) switch (_context.prev = _context.next) {
5547
5547
  case 0:
5548
- assemblyModel = backend.assemblyModel, fileModel = backend.fileModel, filesService = backend.filesService, user = backend.user;
5548
+ assemblyModel = backend.assemblyModel, checkModel = backend.checkModel, fileModel = backend.fileModel, filesService = backend.filesService, user = backend.user;
5549
5549
  assembly = this.assembly, changes = this.changes, logger = this.logger;
5550
5550
  _iterator2 = _createForOfIteratorHelper(changes);
5551
5551
  _context.prev = 3;
5552
5552
  _iterator2.s();
5553
5553
  case 5:
5554
5554
  if ((_step2 = _iterator2.n()).done) {
5555
- _context.next = 67;
5555
+ _context.next = 71;
5556
5556
  break;
5557
5557
  }
5558
5558
  change = _step2.value;
@@ -5590,14 +5590,24 @@
5590
5590
  throw new Error("Assembly \"".concat(assemblyName, "\" already exists"));
5591
5591
  case 23:
5592
5592
  _context.next = 25;
5593
+ return checkModel.find({
5594
+ "default": true
5595
+ }).exec();
5596
+ case 25:
5597
+ checkDocs = _context.sent;
5598
+ checks = checkDocs.map(function (checkDoc) {
5599
+ return checkDoc._id.toHexString();
5600
+ }); // Add assembly
5601
+ _context.next = 29;
5593
5602
  return assemblyModel.create([{
5594
5603
  _id: assembly,
5595
5604
  name: assemblyName,
5596
5605
  user: user,
5597
5606
  status: -1,
5598
- fileId: fileId
5607
+ fileId: fileId,
5608
+ checks: checks
5599
5609
  }]);
5600
- case 25:
5610
+ case 29:
5601
5611
  _yield$assemblyModel$ = _context.sent;
5602
5612
  _yield$assemblyModel$2 = _slicedToArray(_yield$assemblyModel$, 1);
5603
5613
  newAssemblyDoc = _yield$assemblyModel$2[0];
@@ -5605,81 +5615,81 @@
5605
5615
  (_logger$debug3 = logger.debug) === null || _logger$debug3 === void 0 || _logger$debug3.call(logger, "File type: \"".concat(fileDoc.type, "\""));
5606
5616
  // Add refSeqs
5607
5617
  // We cannot use Mongo 'session' / transaction here because Mongo has 16 MB limit for transaction
5608
- _context.next = 32;
5618
+ _context.next = 36;
5609
5619
  return this.addRefSeqIntoDb(fileDoc, newAssemblyDoc._id.toString(), backend);
5610
- case 32:
5620
+ case 36:
5611
5621
  // Loop all features
5612
5622
  (_logger$debug4 = logger.debug) === null || _logger$debug4 === void 0 || _logger$debug4.call(logger, "**************** LOOPATAAN KAIKKI FEATURET SEURAAVAKSI File type: \"".concat(fileDoc.type, "\""));
5613
5623
  featureStream = filesService.parseGFF3(filesService.getFileStream(fileDoc));
5614
5624
  _iteratorAbruptCompletion = false;
5615
5625
  _didIteratorError = false;
5616
- _context.prev = 36;
5626
+ _context.prev = 40;
5617
5627
  _iterator = _asyncIterator(featureStream);
5618
- case 38:
5619
- _context.next = 40;
5628
+ case 42:
5629
+ _context.next = 44;
5620
5630
  return _iterator.next();
5621
- case 40:
5631
+ case 44:
5622
5632
  if (!(_iteratorAbruptCompletion = !(_step = _context.sent).done)) {
5623
- _context.next = 49;
5633
+ _context.next = 53;
5624
5634
  break;
5625
5635
  }
5626
5636
  f = _step.value;
5627
5637
  gff3Feature = f;
5628
5638
  (_logger$verbose = logger.verbose) === null || _logger$verbose === void 0 || _logger$verbose.call(logger, "ENTRY=".concat(JSON.stringify(gff3Feature)));
5629
5639
  // Add new feature into database
5630
- _context.next = 46;
5640
+ _context.next = 50;
5631
5641
  return this.addFeatureIntoDb(gff3Feature, backend);
5632
- case 46:
5642
+ case 50:
5633
5643
  _iteratorAbruptCompletion = false;
5634
- _context.next = 38;
5644
+ _context.next = 42;
5635
5645
  break;
5636
- case 49:
5637
- _context.next = 55;
5646
+ case 53:
5647
+ _context.next = 59;
5638
5648
  break;
5639
- case 51:
5640
- _context.prev = 51;
5641
- _context.t0 = _context["catch"](36);
5642
- _didIteratorError = true;
5643
- _iteratorError = _context.t0;
5644
5649
  case 55:
5645
5650
  _context.prev = 55;
5646
- _context.prev = 56;
5651
+ _context.t0 = _context["catch"](40);
5652
+ _didIteratorError = true;
5653
+ _iteratorError = _context.t0;
5654
+ case 59:
5655
+ _context.prev = 59;
5656
+ _context.prev = 60;
5647
5657
  if (!(_iteratorAbruptCompletion && _iterator["return"] != null)) {
5648
- _context.next = 60;
5658
+ _context.next = 64;
5649
5659
  break;
5650
5660
  }
5651
- _context.next = 60;
5661
+ _context.next = 64;
5652
5662
  return _iterator["return"]();
5653
- case 60:
5654
- _context.prev = 60;
5663
+ case 64:
5664
+ _context.prev = 64;
5655
5665
  if (!_didIteratorError) {
5656
- _context.next = 63;
5666
+ _context.next = 67;
5657
5667
  break;
5658
5668
  }
5659
5669
  throw _iteratorError;
5660
- case 63:
5661
- return _context.finish(60);
5662
- case 64:
5663
- return _context.finish(55);
5664
- case 65:
5670
+ case 67:
5671
+ return _context.finish(64);
5672
+ case 68:
5673
+ return _context.finish(59);
5674
+ case 69:
5665
5675
  _context.next = 5;
5666
5676
  break;
5667
- case 67:
5668
- _context.next = 72;
5677
+ case 71:
5678
+ _context.next = 76;
5669
5679
  break;
5670
- case 69:
5671
- _context.prev = 69;
5680
+ case 73:
5681
+ _context.prev = 73;
5672
5682
  _context.t1 = _context["catch"](3);
5673
5683
  _iterator2.e(_context.t1);
5674
- case 72:
5675
- _context.prev = 72;
5684
+ case 76:
5685
+ _context.prev = 76;
5676
5686
  _iterator2.f();
5677
- return _context.finish(72);
5678
- case 75:
5687
+ return _context.finish(76);
5688
+ case 79:
5679
5689
  case "end":
5680
5690
  return _context.stop();
5681
5691
  }
5682
- }, _callee, this, [[3, 69, 72, 75], [36, 51, 55, 65], [56,, 60, 64]]);
5692
+ }, _callee, this, [[3, 73, 76, 79], [40, 55, 59, 69], [60,, 64, 68]]);
5683
5693
  }));
5684
5694
  function executeOnServer(_x) {
5685
5695
  return _executeOnServer.apply(this, arguments);
@@ -15231,11 +15241,11 @@
15231
15241
  key: "executeOnServer",
15232
15242
  value: function () {
15233
15243
  var _executeOnServer = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(backend) {
15234
- var assemblyModel, refSeqModel, user, assembly, changes, logger, CHUNK_SIZE, customChunkSize, _iterator, _step, _logger$debug, change, assemblyName, externalLocation, fa, fai, gzi, sequenceAdapter, allSequenceSizes, assemblyDoc, _yield$assemblyModel$, _yield$assemblyModel$2, newAssemblyDoc, sequenceName, _logger$debug2, _yield$refSeqModel$cr, _yield$refSeqModel$cr2, newRefSeqDoc;
15244
+ var assemblyModel, checkModel, refSeqModel, user, assembly, changes, logger, CHUNK_SIZE, customChunkSize, _iterator, _step, _logger$debug, change, assemblyName, externalLocation, fa, fai, gzi, sequenceAdapter, allSequenceSizes, assemblyDoc, checkDocs, checks, _yield$assemblyModel$, _yield$assemblyModel$2, newAssemblyDoc, sequenceName, _logger$debug2, _yield$refSeqModel$cr, _yield$refSeqModel$cr2, newRefSeqDoc;
15235
15245
  return _regeneratorRuntime().wrap(function _callee$(_context) {
15236
15246
  while (1) switch (_context.prev = _context.next) {
15237
15247
  case 0:
15238
- assemblyModel = backend.assemblyModel, refSeqModel = backend.refSeqModel, user = backend.user;
15248
+ assemblyModel = backend.assemblyModel, checkModel = backend.checkModel, refSeqModel = backend.refSeqModel, user = backend.user;
15239
15249
  assembly = this.assembly, changes = this.changes, logger = this.logger;
15240
15250
  CHUNK_SIZE = process.env.CHUNK_SIZE;
15241
15251
  customChunkSize = CHUNK_SIZE && Number(CHUNK_SIZE);
@@ -15244,7 +15254,7 @@
15244
15254
  _iterator.s();
15245
15255
  case 7:
15246
15256
  if ((_step = _iterator.n()).done) {
15247
- _context.next = 41;
15257
+ _context.next = 45;
15248
15258
  break;
15249
15259
  }
15250
15260
  change = _step.value;
@@ -15291,26 +15301,36 @@
15291
15301
  throw new Error("Assembly \"".concat(assemblyName, "\" already exists"));
15292
15302
  case 22:
15293
15303
  _context.next = 24;
15304
+ return checkModel.find({
15305
+ "default": true
15306
+ }).exec();
15307
+ case 24:
15308
+ checkDocs = _context.sent;
15309
+ checks = checkDocs.map(function (checkDoc) {
15310
+ return checkDoc._id.toHexString();
15311
+ });
15312
+ _context.next = 28;
15294
15313
  return assemblyModel.create([{
15295
15314
  _id: assembly,
15296
15315
  name: assemblyName,
15297
15316
  user: user,
15298
15317
  status: -1,
15299
- externalLocation: externalLocation
15318
+ externalLocation: externalLocation,
15319
+ checks: checks
15300
15320
  }]);
15301
- case 24:
15321
+ case 28:
15302
15322
  _yield$assemblyModel$ = _context.sent;
15303
15323
  _yield$assemblyModel$2 = _slicedToArray(_yield$assemblyModel$, 1);
15304
15324
  newAssemblyDoc = _yield$assemblyModel$2[0];
15305
15325
  (_logger$debug = logger.debug) === null || _logger$debug === void 0 || _logger$debug.call(logger, "Added new assembly \"".concat(assemblyName, "\", docId \"").concat(newAssemblyDoc._id, "\""));
15306
15326
  _context.t0 = _regeneratorRuntime().keys(allSequenceSizes);
15307
- case 29:
15327
+ case 33:
15308
15328
  if ((_context.t1 = _context.t0()).done) {
15309
- _context.next = 39;
15329
+ _context.next = 43;
15310
15330
  break;
15311
15331
  }
15312
15332
  sequenceName = _context.t1.value;
15313
- _context.next = 33;
15333
+ _context.next = 37;
15314
15334
  return refSeqModel.create([_objectSpread2(_objectSpread2({
15315
15335
  name: sequenceName,
15316
15336
  assembly: newAssemblyDoc._id,
@@ -15321,32 +15341,32 @@
15321
15341
  user: user,
15322
15342
  status: -1
15323
15343
  })]);
15324
- case 33:
15344
+ case 37:
15325
15345
  _yield$refSeqModel$cr = _context.sent;
15326
15346
  _yield$refSeqModel$cr2 = _slicedToArray(_yield$refSeqModel$cr, 1);
15327
15347
  newRefSeqDoc = _yield$refSeqModel$cr2[0];
15328
15348
  (_logger$debug2 = logger.debug) === null || _logger$debug2 === void 0 || _logger$debug2.call(logger, "Added new refSeq \"".concat(sequenceName, "\", docId \"").concat(newRefSeqDoc._id, "\""));
15329
- _context.next = 29;
15349
+ _context.next = 33;
15330
15350
  break;
15331
- case 39:
15351
+ case 43:
15332
15352
  _context.next = 7;
15333
15353
  break;
15334
- case 41:
15335
- _context.next = 46;
15354
+ case 45:
15355
+ _context.next = 50;
15336
15356
  break;
15337
- case 43:
15338
- _context.prev = 43;
15357
+ case 47:
15358
+ _context.prev = 47;
15339
15359
  _context.t2 = _context["catch"](5);
15340
15360
  _iterator.e(_context.t2);
15341
- case 46:
15342
- _context.prev = 46;
15361
+ case 50:
15362
+ _context.prev = 50;
15343
15363
  _iterator.f();
15344
- return _context.finish(46);
15345
- case 49:
15364
+ return _context.finish(50);
15365
+ case 53:
15346
15366
  case "end":
15347
15367
  return _context.stop();
15348
15368
  }
15349
- }, _callee, this, [[5, 43, 46, 49]]);
15369
+ }, _callee, this, [[5, 47, 50, 53]]);
15350
15370
  }));
15351
15371
  function executeOnServer(_x) {
15352
15372
  return _executeOnServer.apply(this, arguments);
@@ -15514,7 +15534,7 @@
15514
15534
  value: function () {
15515
15535
  var _executeOnServerIndexed = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(backend, assemblyName, fileIds) {
15516
15536
  var _this$logger$debug, _this$logger;
15517
- var CHUNK_SIZE, customChunkSize, FILE_UPLOAD_FOLDER, fa, fai, gzi, assemblyModel, fileModel, filesService, refSeqModel, user, faDoc, faChecksum, faiDoc, faiChecksum, gziDoc, gziChecksum, sequenceAdapter, allSequenceSizes, assemblyDoc, _yield$assemblyModel$, _yield$assemblyModel$2, newAssemblyDoc, sequenceName, _this$logger$debug2, _this$logger2, _yield$refSeqModel$cr, _yield$refSeqModel$cr2, newRefSeqDoc;
15537
+ var CHUNK_SIZE, customChunkSize, FILE_UPLOAD_FOLDER, fa, fai, gzi, assemblyModel, checkModel, fileModel, filesService, refSeqModel, user, faDoc, faChecksum, faiDoc, faiChecksum, gziDoc, gziChecksum, sequenceAdapter, allSequenceSizes, assemblyDoc, checkDocs, checks, _yield$assemblyModel$, _yield$assemblyModel$2, newAssemblyDoc, sequenceName, _this$logger$debug2, _this$logger2, _yield$refSeqModel$cr, _yield$refSeqModel$cr2, newRefSeqDoc;
15518
15538
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
15519
15539
  while (1) switch (_context2.prev = _context2.next) {
15520
15540
  case 0:
@@ -15528,7 +15548,7 @@
15528
15548
  throw new Error('No FILE_UPLOAD_FOLDER found in .env file');
15529
15549
  case 5:
15530
15550
  fa = fileIds.fa, fai = fileIds.fai, gzi = fileIds.gzi;
15531
- assemblyModel = backend.assemblyModel, fileModel = backend.fileModel, filesService = backend.filesService, refSeqModel = backend.refSeqModel, user = backend.user;
15551
+ assemblyModel = backend.assemblyModel, checkModel = backend.checkModel, fileModel = backend.fileModel, filesService = backend.filesService, refSeqModel = backend.refSeqModel, user = backend.user;
15532
15552
  _context2.next = 9;
15533
15553
  return fileModel.findById(fa);
15534
15554
  case 9:
@@ -15584,26 +15604,36 @@
15584
15604
  throw new Error("Assembly \"".concat(assemblyName, "\" already exists"));
15585
15605
  case 34:
15586
15606
  _context2.next = 36;
15607
+ return checkModel.find({
15608
+ "default": true
15609
+ }).exec();
15610
+ case 36:
15611
+ checkDocs = _context2.sent;
15612
+ checks = checkDocs.map(function (checkDoc) {
15613
+ return checkDoc._id.toHexString();
15614
+ });
15615
+ _context2.next = 40;
15587
15616
  return assemblyModel.create([{
15588
15617
  _id: this.assembly,
15589
15618
  name: assemblyName,
15590
15619
  user: user,
15591
15620
  status: -1,
15592
- fileIds: fileIds
15621
+ fileIds: fileIds,
15622
+ checks: checks
15593
15623
  }]);
15594
- case 36:
15624
+ case 40:
15595
15625
  _yield$assemblyModel$ = _context2.sent;
15596
15626
  _yield$assemblyModel$2 = _slicedToArray(_yield$assemblyModel$, 1);
15597
15627
  newAssemblyDoc = _yield$assemblyModel$2[0];
15598
15628
  (_this$logger$debug = (_this$logger = this.logger).debug) === null || _this$logger$debug === void 0 || _this$logger$debug.call(_this$logger, "Added new assembly \"".concat(assemblyName, "\", docId \"").concat(newAssemblyDoc._id, "\""));
15599
15629
  _context2.t0 = _regeneratorRuntime().keys(allSequenceSizes);
15600
- case 41:
15630
+ case 45:
15601
15631
  if ((_context2.t1 = _context2.t0()).done) {
15602
- _context2.next = 51;
15632
+ _context2.next = 55;
15603
15633
  break;
15604
15634
  }
15605
15635
  sequenceName = _context2.t1.value;
15606
- _context2.next = 45;
15636
+ _context2.next = 49;
15607
15637
  return refSeqModel.create([_objectSpread2(_objectSpread2({
15608
15638
  name: sequenceName,
15609
15639
  assembly: newAssemblyDoc._id,
@@ -15614,14 +15644,14 @@
15614
15644
  user: user,
15615
15645
  status: -1
15616
15646
  })]);
15617
- case 45:
15647
+ case 49:
15618
15648
  _yield$refSeqModel$cr = _context2.sent;
15619
15649
  _yield$refSeqModel$cr2 = _slicedToArray(_yield$refSeqModel$cr, 1);
15620
15650
  newRefSeqDoc = _yield$refSeqModel$cr2[0];
15621
15651
  (_this$logger$debug2 = (_this$logger2 = this.logger).debug) === null || _this$logger$debug2 === void 0 || _this$logger$debug2.call(_this$logger2, "Added new refSeq \"".concat(sequenceName, "\", docId \"").concat(newRefSeqDoc._id, "\""));
15622
- _context2.next = 41;
15652
+ _context2.next = 45;
15623
15653
  break;
15624
- case 51:
15654
+ case 55:
15625
15655
  case "end":
15626
15656
  return _context2.stop();
15627
15657
  }
@@ -15637,11 +15667,11 @@
15637
15667
  value: function () {
15638
15668
  var _executeOnServerFasta = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(backend, assemblyName, fileId) {
15639
15669
  var _this$logger$debug3, _this$logger3, _this$logger$debug4, _this$logger4, _this$logger$debug5, _this$logger5;
15640
- var assemblyModel, fileModel, user, fileDoc, assemblyDoc, _yield$assemblyModel$3, _yield$assemblyModel$4, newAssemblyDoc;
15670
+ var assemblyModel, checkModel, fileModel, user, fileDoc, assemblyDoc, checkDocs, checks, _yield$assemblyModel$3, _yield$assemblyModel$4, newAssemblyDoc;
15641
15671
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
15642
15672
  while (1) switch (_context3.prev = _context3.next) {
15643
15673
  case 0:
15644
- assemblyModel = backend.assemblyModel, fileModel = backend.fileModel, user = backend.user; // Get file checksum
15674
+ assemblyModel = backend.assemblyModel, checkModel = backend.checkModel, fileModel = backend.fileModel, user = backend.user; // Get file checksum
15645
15675
  _context3.next = 3;
15646
15676
  return fileModel.findById(fileId).exec();
15647
15677
  case 3:
@@ -15667,6 +15697,15 @@
15667
15697
  throw new Error("Assembly \"".concat(assemblyName, "\" already exists"));
15668
15698
  case 12:
15669
15699
  _context3.next = 14;
15700
+ return checkModel.find({
15701
+ "default": true
15702
+ }).exec();
15703
+ case 14:
15704
+ checkDocs = _context3.sent;
15705
+ checks = checkDocs.map(function (checkDoc) {
15706
+ return checkDoc._id.toHexString();
15707
+ }); // Add assembly
15708
+ _context3.next = 18;
15670
15709
  return assemblyModel.create([{
15671
15710
  _id: this.assembly,
15672
15711
  name: assemblyName,
@@ -15674,9 +15713,10 @@
15674
15713
  status: -1,
15675
15714
  fileIds: {
15676
15715
  fa: fileId
15677
- }
15716
+ },
15717
+ checks: checks
15678
15718
  }]);
15679
- case 14:
15719
+ case 18:
15680
15720
  _yield$assemblyModel$3 = _context3.sent;
15681
15721
  _yield$assemblyModel$4 = _slicedToArray(_yield$assemblyModel$3, 1);
15682
15722
  newAssemblyDoc = _yield$assemblyModel$4[0];
@@ -15684,9 +15724,9 @@
15684
15724
  (_this$logger$debug5 = (_this$logger5 = this.logger).debug) === null || _this$logger$debug5 === void 0 || _this$logger$debug5.call(_this$logger5, "File type: \"".concat(fileDoc.type, "\", assemblyId: \"").concat(newAssemblyDoc._id, "\""));
15685
15725
  // Add refSeqs
15686
15726
  // We cannot use Mongo 'session' / transaction here because Mongo has 16 MB limit for transaction
15687
- _context3.next = 21;
15727
+ _context3.next = 25;
15688
15728
  return this.addRefSeqIntoDb(fileDoc, newAssemblyDoc._id.toString(), backend);
15689
- case 21:
15729
+ case 25:
15690
15730
  case "end":
15691
15731
  return _context3.stop();
15692
15732
  }
@@ -17418,7 +17458,7 @@
17418
17458
 
17419
17459
  var ImportJBrowseConfigChange$1 = {};
17420
17460
 
17421
- var _excluded = ["assemblies", "internetAccounts", "plugins", "tracks"];
17461
+ var _excluded = ["__v", "_id", "assemblies", "internetAccounts", "plugins", "tracks"];
17422
17462
  Object.defineProperty(ImportJBrowseConfigChange$1, "__esModule", {
17423
17463
  value: true
17424
17464
  });
@@ -20614,7 +20654,7 @@
20614
20654
  }), 'Add');
20615
20655
  default_1$a = Add["default"] = _default$c;
20616
20656
 
20617
- var version = "0.1.20";
20657
+ var version = "0.1.21";
20618
20658
 
20619
20659
  const ApolloConfigSchema = configuration.ConfigurationSchema('ApolloInternetAccount', {
20620
20660
  baseURL: {
@@ -39770,7 +39810,7 @@
39770
39810
  freeResources( /* { region } */) { }
39771
39811
  }
39772
39812
 
39773
- var configSchema$2 = configuration.ConfigurationSchema('ApolloSequenceAdapter', {
39813
+ var configSchema$3 = configuration.ConfigurationSchema('ApolloSequenceAdapter', {
39774
39814
  assemblyId: {
39775
39815
  type: 'string',
39776
39816
  defaultValue: '',
@@ -39780,7 +39820,7 @@
39780
39820
  function installApolloSequenceAdapter(pluginManager) {
39781
39821
  pluginManager.addAdapterType(() => new AdapterType__default["default"]({
39782
39822
  name: 'ApolloSequenceAdapter',
39783
- configSchema: configSchema$2,
39823
+ configSchema: configSchema$3,
39784
39824
  adapterMetadata: {
39785
39825
  category: undefined,
39786
39826
  hiddenFromGUI: true,
@@ -40471,7 +40511,7 @@
40471
40511
  freeResources() { }
40472
40512
  }
40473
40513
 
40474
- var configSchema$1 = configuration.ConfigurationSchema('ApolloTextSearchAdapter', {
40514
+ var configSchema$2 = configuration.ConfigurationSchema('ApolloTextSearchAdapter', {
40475
40515
  assemblyNames: {
40476
40516
  type: 'stringArray',
40477
40517
  defaultValue: [],
@@ -40494,7 +40534,7 @@
40494
40534
  pluginManager.addTextSearchAdapterType(() => new pluggableElementTypes.TextSearchAdapterType({
40495
40535
  name: 'ApolloTextSearchAdapter',
40496
40536
  displayName: 'Apollo text search adapter',
40497
- configSchema: configSchema$1,
40537
+ configSchema: configSchema$2,
40498
40538
  AdapterClass: ApolloTextSearchAdapter,
40499
40539
  description: 'Apollo Text Search adapter',
40500
40540
  }));
@@ -42320,11 +42360,7 @@
42320
42360
  React__default["default"].createElement(TranscriptSequence, { feature: feature, session: apolloSession, assembly: currentAssembly._id || '', refName: refName })));
42321
42361
  });
42322
42362
 
42323
- function configSchemaFactory$1(pluginManager) {
42324
- const LGVPlugin = pluginManager.getPlugin('LinearGenomeViewPlugin');
42325
- const { baseLinearDisplayConfigSchema } = LGVPlugin.exports;
42326
- return configuration.ConfigurationSchema('LinearApolloDisplay', { height: { type: 'number', defaultValue: 500 } }, { baseConfiguration: baseLinearDisplayConfigSchema, explicitlyTyped: true });
42327
- }
42363
+ const configSchema$1 = configuration.ConfigurationSchema('LinearApolloDisplay', {}, { explicitIdentifier: 'displayId', explicitlyTyped: true });
42328
42364
 
42329
42365
  function handleFeatureTypeChange(changeManager, feature, oldType, newType) {
42330
42366
  const featureId = feature._id;
@@ -42568,56 +42604,16 @@
42568
42604
  } })));
42569
42605
  });
42570
42606
 
42571
- // TODO: get this added to LGV runtime exports so we don't have to duplicate it
42572
42607
  const minDisplayHeight = 20;
42573
- /**
42574
- * #stateModel TrackHeightMixin
42575
- * #category display
42576
- */
42577
- const TrackHeightMixin = require$$1$3.types
42578
- .model({
42579
- heightPreConfig: require$$1$3.types.maybe(require$$1$3.types.refinement('displayHeight', require$$1$3.types.number, (n) => n >= minDisplayHeight)),
42580
- })
42581
- .volatile(() => ({
42582
- scrollTop: 0,
42583
- }))
42584
- .views((self) => ({
42585
- get height() {
42586
- // @ts-expect-error getConf needs self.configuration
42587
- return self.heightPreConfig ?? configuration.getConf(self, 'height');
42588
- },
42589
- }))
42590
- .actions((self) => ({
42591
- setScrollTop(scrollTop) {
42592
- self.scrollTop = scrollTop;
42593
- },
42594
- setHeight(displayHeight) {
42595
- self.heightPreConfig = Math.max(displayHeight, minDisplayHeight);
42596
- return self.height;
42597
- },
42598
- resizeHeight(distance) {
42599
- const oldHeight = self.height;
42600
- const newHeight = this.setHeight(self.height + distance);
42601
- return newHeight - oldHeight;
42602
- },
42603
- }));
42604
-
42605
42608
  function baseModelFactory(_pluginManager, configSchema) {
42606
- // TODO: Restore this when TRackHeightMixin is in LGV runtime exports
42607
- // const LGVPlugin = pluginManager.getPlugin(
42608
- // 'LinearGenomeViewPlugin',
42609
- // ) as LinearGenomeViewPlugin
42610
- // const { TrackHeightMixin } = LGVPlugin.exports
42611
- return require$$1$3.types
42612
- .compose(pluggableElementTypes.BaseDisplay, TrackHeightMixin)
42613
- .named('BaseLinearApolloDisplay')
42609
+ return pluggableElementTypes.BaseDisplay.named('BaseLinearApolloDisplay')
42614
42610
  .props({
42615
42611
  type: require$$1$3.types.literal('LinearApolloDisplay'),
42616
42612
  configuration: configuration.ConfigurationReference(configSchema),
42613
+ graphical: true,
42614
+ table: false,
42615
+ heightPreConfig: require$$1$3.types.maybe(require$$1$3.types.refinement('displayHeight', require$$1$3.types.number, (n) => n >= minDisplayHeight)),
42617
42616
  })
42618
- .volatile((self) => ({
42619
- lgv: require$$1$2.getContainingView(self),
42620
- }))
42621
42617
  .views((self) => {
42622
42618
  const { configuration, renderProps: superRenderProps } = self;
42623
42619
  return {
@@ -42630,6 +42626,26 @@
42630
42626
  },
42631
42627
  };
42632
42628
  })
42629
+ .volatile(() => ({
42630
+ scrollTop: 0,
42631
+ }))
42632
+ .views((self) => ({
42633
+ get lgv() {
42634
+ return require$$1$2.getContainingView(self);
42635
+ },
42636
+ get height() {
42637
+ if (self.heightPreConfig) {
42638
+ return self.heightPreConfig;
42639
+ }
42640
+ if (self.graphical && self.table) {
42641
+ return 500;
42642
+ }
42643
+ if (self.graphical) {
42644
+ return 200;
42645
+ }
42646
+ return 300;
42647
+ },
42648
+ }))
42633
42649
  .views((self) => ({
42634
42650
  get rendererTypeName() {
42635
42651
  return self.configuration.renderer.type;
@@ -42686,6 +42702,73 @@
42686
42702
  .apolloSelectedFeature;
42687
42703
  },
42688
42704
  }))
42705
+ .actions((self) => ({
42706
+ setScrollTop(scrollTop) {
42707
+ self.scrollTop = scrollTop;
42708
+ },
42709
+ setHeight(displayHeight) {
42710
+ self.heightPreConfig = Math.max(displayHeight, minDisplayHeight);
42711
+ return self.height;
42712
+ },
42713
+ resizeHeight(distance) {
42714
+ const oldHeight = self.height;
42715
+ const newHeight = this.setHeight(self.height + distance);
42716
+ return newHeight - oldHeight;
42717
+ },
42718
+ showGraphicalOnly() {
42719
+ self.graphical = true;
42720
+ self.table = false;
42721
+ },
42722
+ showTableOnly() {
42723
+ self.graphical = false;
42724
+ self.table = true;
42725
+ },
42726
+ showGraphicalAndTable() {
42727
+ self.graphical = true;
42728
+ self.table = true;
42729
+ },
42730
+ }))
42731
+ .views((self) => {
42732
+ const { trackMenuItems: superTrackMenuItems } = self;
42733
+ return {
42734
+ trackMenuItems() {
42735
+ const { graphical, table } = self;
42736
+ return [
42737
+ ...superTrackMenuItems(),
42738
+ {
42739
+ type: 'subMenu',
42740
+ label: 'Appearance',
42741
+ subMenu: [
42742
+ {
42743
+ label: 'Show graphical display',
42744
+ type: 'radio',
42745
+ checked: graphical && !table,
42746
+ onClick: () => {
42747
+ self.showGraphicalOnly();
42748
+ },
42749
+ },
42750
+ {
42751
+ label: 'Show table display',
42752
+ type: 'radio',
42753
+ checked: table && !graphical,
42754
+ onClick: () => {
42755
+ self.showTableOnly();
42756
+ },
42757
+ },
42758
+ {
42759
+ label: 'Show both graphical and table display',
42760
+ type: 'radio',
42761
+ checked: table && graphical,
42762
+ onClick: () => {
42763
+ self.showGraphicalAndTable();
42764
+ },
42765
+ },
42766
+ ],
42767
+ },
42768
+ ];
42769
+ },
42770
+ };
42771
+ })
42689
42772
  .actions((self) => ({
42690
42773
  setSelectedFeature(feature) {
42691
42774
  self.session.apolloSetSelectedFeature(feature);
@@ -44769,7 +44852,7 @@
44769
44852
  const LinearApolloDisplay = mobxReact.observer(function LinearApolloDisplay(props) {
44770
44853
  const theme = material.useTheme();
44771
44854
  const { model } = props;
44772
- const { apolloRowHeight, contextMenuItems: getContextMenuItems, cursor, featuresHeight, isShown, onMouseDown, onMouseLeave, onMouseMove, onMouseUp, regionCannotBeRendered, session, setCanvas, setCollaboratorCanvas, setOverlayCanvas, setSeqTrackCanvas, setSeqTrackOverlayCanvas, setTheme, tabularEditor, } = model;
44855
+ const { apolloRowHeight, contextMenuItems: getContextMenuItems, cursor, featuresHeight, isShown, onMouseDown, onMouseLeave, onMouseMove, onMouseUp, regionCannotBeRendered, session, setCanvas, setCollaboratorCanvas, setOverlayCanvas, setSeqTrackCanvas, setSeqTrackOverlayCanvas, setTheme, } = model;
44773
44856
  const { classes } = useStyles$1();
44774
44857
  const lgv = require$$1$2.getContainingView(model);
44775
44858
  React.useEffect(() => {
@@ -44826,9 +44909,7 @@
44826
44909
  React__default["default"].createElement("canvas", { ref: async (node) => {
44827
44910
  await Promise.resolve();
44828
44911
  setOverlayCanvas(node);
44829
- }, width: lgv.dynamicBlocks.totalWidthPx, height: featuresHeight, onMouseMove: onMouseMove, onMouseLeave: onMouseLeave, onMouseDown: onMouseDown, onMouseUp: onMouseUp, onClick: () => {
44830
- tabularEditor.showPane();
44831
- }, className: classes.canvas, style: { cursor: cursor ?? 'default' }, "data-testid": "overlayCanvas" }),
44912
+ }, width: lgv.dynamicBlocks.totalWidthPx, height: featuresHeight, onMouseMove: onMouseMove, onMouseLeave: onMouseLeave, onMouseDown: onMouseDown, onMouseUp: onMouseUp, className: classes.canvas, style: { cursor: cursor ?? 'default' }, "data-testid": "overlayCanvas" }),
44832
44913
  lgv.displayedRegions.flatMap((region, idx) => {
44833
44914
  const assembly = assemblyManager.get(region.assemblyName);
44834
44915
  return [...session.apolloDataStore.checkResults.values()]
@@ -44964,25 +45045,33 @@
44964
45045
  });
44965
45046
  const DisplayComponent = mobxReact.observer(function DisplayComponent({ model, ...other }) {
44966
45047
  const { classes } = useStyles();
44967
- const { height: overallHeight, isShown, selectedFeature, tabularEditor, toggleShown, } = model;
44968
- const detailsHeight = tabularEditor.isShown ? model.detailsHeight : 0;
44969
- const featureAreaHeight = isShown
44970
- ? overallHeight - detailsHeight - accordionControlHeight * 2
44971
- : 0;
44972
- const onDetailsResize = (delta) => {
44973
- model.setDetailsHeight(model.detailsHeight - delta);
44974
- };
45048
+ const { detailsHeight, graphical, height: overallHeight, isShown, selectedFeature, table, tabularEditor, toggleShown, } = model;
44975
45049
  const canvasScrollContainerRef = React.useRef(null);
44976
45050
  React.useEffect(() => {
44977
45051
  scrollSelectedFeatureIntoView(model, canvasScrollContainerRef);
44978
45052
  }, [model, selectedFeature]);
45053
+ const onDetailsResize = (delta) => {
45054
+ model.setDetailsHeight(detailsHeight - delta);
45055
+ };
45056
+ if (graphical && table) {
45057
+ const tabularHeight = tabularEditor.isShown ? detailsHeight : 0;
45058
+ const featureAreaHeight = isShown
45059
+ ? overallHeight - detailsHeight - accordionControlHeight * 2
45060
+ : 0;
45061
+ return (React__default["default"].createElement("div", { style: { height: overallHeight } },
45062
+ React__default["default"].createElement(AccordionControl, { open: isShown, title: "Graphical", onClick: toggleShown }),
45063
+ React__default["default"].createElement("div", { className: classes.shading, ref: canvasScrollContainerRef, style: { height: featureAreaHeight } },
45064
+ React__default["default"].createElement(LinearApolloDisplay, { model: model, ...other })),
45065
+ React__default["default"].createElement(AccordionControl, { title: "Table", open: tabularEditor.isShown, onClick: tabularEditor.togglePane, onResize: onDetailsResize }),
45066
+ React__default["default"].createElement("div", { className: classes.details, style: { height: tabularHeight } },
45067
+ React__default["default"].createElement(TabularEditorPane, { model: model }))));
45068
+ }
45069
+ if (graphical) {
45070
+ return (React__default["default"].createElement("div", { className: classes.shading, ref: canvasScrollContainerRef, style: { height: overallHeight } },
45071
+ React__default["default"].createElement(LinearApolloDisplay, { model: model, ...other })));
45072
+ }
44979
45073
  return (React__default["default"].createElement("div", { className: classes.details, style: { height: overallHeight } },
44980
- React__default["default"].createElement(AccordionControl, { open: isShown, title: "Graphical", onClick: toggleShown }),
44981
- React__default["default"].createElement("div", { className: classes.shading, ref: canvasScrollContainerRef, style: { height: featureAreaHeight } },
44982
- React__default["default"].createElement(LinearApolloDisplay, { model: model, ...other })),
44983
- React__default["default"].createElement(AccordionControl, { title: "Table", open: tabularEditor.isShown, onClick: tabularEditor.togglePane, onResize: onDetailsResize }),
44984
- React__default["default"].createElement("div", { style: { height: detailsHeight } },
44985
- React__default["default"].createElement(TabularEditorPane, { model: model }))));
45074
+ React__default["default"].createElement(TabularEditorPane, { model: model })));
44986
45075
  });
44987
45076
  function makeSixFrameDisplayComponent(pluginManager) {
44988
45077
  const LGVPlugin = pluginManager.getPlugin('LinearGenomeViewPlugin');
@@ -46716,7 +46805,7 @@
46716
46805
  });
46717
46806
  });
46718
46807
  pluginManager.addDisplayType(() => {
46719
- const configSchema = configSchemaFactory$1(pluginManager);
46808
+ const configSchema = configSchema$1;
46720
46809
  return new pluggableElementTypes.DisplayType({
46721
46810
  name: 'LinearApolloDisplay',
46722
46811
  configSchema,