@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.
@@ -70,7 +70,7 @@ var RedoIcon = require('@mui/icons-material/Redo');
70
70
  var UndoIcon = require('@mui/icons-material/Undo');
71
71
  var SaveIcon = require('@mui/icons-material/Save');
72
72
 
73
- var version = "1.1.0";
73
+ var version = "1.1.2";
74
74
 
75
75
  const ApolloConfigSchema = configuration.ConfigurationSchema('ApolloInternetAccount', {
76
76
  baseURL: {
@@ -7255,7 +7255,15 @@ updateCDSLocation, cdsMin, cdsMax, feature, session, }) {
7255
7255
  }
7256
7256
  // Trim any sequence before first start codon and after stop codon
7257
7257
  const startCodonIndex = proteinSequence.indexOf('M');
7258
- const stopCodonIndex = proteinSequence.lastIndexOf('*');
7258
+ if (startCodonIndex === -1) {
7259
+ notify('Start codon not found', 'error');
7260
+ return;
7261
+ }
7262
+ const stopCodonIndex = proteinSequence.indexOf('*', startCodonIndex);
7263
+ if (stopCodonIndex === -1) {
7264
+ notify('Stop codon not found', 'error');
7265
+ return;
7266
+ }
7259
7267
  const startCodonPos = startCodonIndex * 3;
7260
7268
  const stopCodonPos = stopCodonIndex * 3;
7261
7269
  const startCodonGenomicLoc = getCodonGenomicLocation(startCodonPos);
@@ -12791,7 +12799,7 @@ function CreateApolloAnnotation({ annotationFeature, assembly, handleClose, refS
12791
12799
  const [selectedDestinationFeature, setSelectedDestinationFeature] = React.useState();
12792
12800
  const apolloAssembly = apolloSessionModel.apolloDataStore.assemblies.get(assembly.name);
12793
12801
  const refSeq = apolloAssembly?.refSeqs.get(refSeqId);
12794
- const features = refSeq?.getFeatures(region.start, region.end);
12802
+ const features = React.useMemo(() => refSeq?.getFeatures(region.start, region.end), [refSeq, region.start, region.end]);
12795
12803
  React.useEffect(() => {
12796
12804
  const getDestinationFeatures = () => {
12797
12805
  const filteredFeatures = [];