@apollo-annotation/jbrowse-plugin-apollo 1.1.0 → 1.1.2

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.
@@ -6788,11 +6788,16 @@
6788
6788
  var cdsFeatures = [];
6789
6789
  var exonFeatures = [];
6790
6790
  var utrFeatures = [];
6791
+ var seenChildFeatures = new Set();
6791
6792
  var _iterator3 = _createForOfIteratorHelper(childFeatures),
6792
6793
  _step3;
6793
6794
  try {
6794
6795
  for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
6795
6796
  var childFeature = _step3.value;
6797
+ if (seenChildFeatures.has(childFeature)) {
6798
+ continue;
6799
+ }
6800
+ seenChildFeatures.add(childFeature);
6796
6801
  var _childFeature = _slicedToArray(childFeature, 1),
6797
6802
  firstChildFeatureLocation = _childFeature[0];
6798
6803
  if (firstChildFeatureLocation.type === 'exon') {
@@ -7115,7 +7120,7 @@
7115
7120
  d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"
7116
7121
  }), 'Add');
7117
7122
 
7118
- var version = "1.1.0";
7123
+ var version = "1.1.2";
7119
7124
 
7120
7125
  const ApolloConfigSchema = configuration.ConfigurationSchema('ApolloInternetAccount', {
7121
7126
  baseURL: {
@@ -29815,7 +29820,15 @@
29815
29820
  }
29816
29821
  // Trim any sequence before first start codon and after stop codon
29817
29822
  const startCodonIndex = proteinSequence.indexOf('M');
29818
- const stopCodonIndex = proteinSequence.lastIndexOf('*');
29823
+ if (startCodonIndex === -1) {
29824
+ notify('Start codon not found', 'error');
29825
+ return;
29826
+ }
29827
+ const stopCodonIndex = proteinSequence.indexOf('*', startCodonIndex);
29828
+ if (stopCodonIndex === -1) {
29829
+ notify('Stop codon not found', 'error');
29830
+ return;
29831
+ }
29819
29832
  const startCodonPos = startCodonIndex * 3;
29820
29833
  const stopCodonPos = stopCodonIndex * 3;
29821
29834
  const startCodonGenomicLoc = getCodonGenomicLocation(startCodonPos);
@@ -35368,7 +35381,7 @@
35368
35381
  const [selectedDestinationFeature, setSelectedDestinationFeature] = React.useState();
35369
35382
  const apolloAssembly = apolloSessionModel.apolloDataStore.assemblies.get(assembly.name);
35370
35383
  const refSeq = apolloAssembly?.refSeqs.get(refSeqId);
35371
- const features = refSeq?.getFeatures(region.start, region.end);
35384
+ const features = React.useMemo(() => refSeq?.getFeatures(region.start, region.end), [refSeq, region.start, region.end]);
35372
35385
  React.useEffect(() => {
35373
35386
  const getDestinationFeatures = () => {
35374
35387
  const filteredFeatures = [];