@teselagen/ove 0.8.22 → 0.8.25

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.
@@ -18,7 +18,7 @@ function searchLayersSelector(
18
18
  mismatchesAllowed,
19
19
  tempSearchLayers = []
20
20
  ) {
21
- const toReturn = [...tempSearchLayers]
21
+ const toReturn = [...tempSearchLayers];
22
22
  if (!searchString || !isOpen) {
23
23
  return toReturn;
24
24
  }
@@ -45,10 +45,7 @@ function searchLayersSelector(
45
45
  start: start * 3,
46
46
  end: end * 3 + 2
47
47
  }));
48
- return [
49
- ...toReturn,
50
- ...r
51
- ];
48
+ return [...toReturn, ...r];
52
49
  }
53
50
 
54
51
  // Use findApproxMatches when literal matching DNA with mismatches allowed
@@ -75,10 +72,13 @@ function searchLayersSelector(
75
72
  forward: true
76
73
  }))
77
74
  .sort((a, b) => a.start - b.start);
78
- return [...toReturn, ...matches.map(match => ({
79
- ...match,
80
- className: "veSearchLayer"
81
- }))];
75
+ return [
76
+ ...toReturn,
77
+ ...matches.map(match => ({
78
+ ...match,
79
+ className: "veSearchLayer"
80
+ }))
81
+ ];
82
82
  }
83
83
 
84
84
  // Use regular findSequenceMatches for all other cases
@@ -90,14 +90,17 @@ function searchLayersSelector(
90
90
  }).sort(({ start }, { start: start2 }) => {
91
91
  return start - start2;
92
92
  });
93
- return [...toReturn, ...matches.map(match => ({
94
- ...match,
95
- forward: !match.bottomStrand,
96
- className:
97
- "veSearchLayer " +
98
- (match.bottomStrand ? " veSearchLayerBottomStrand" : ""),
99
- isSearchLayer: true
100
- }))];
93
+ return [
94
+ ...toReturn,
95
+ ...matches.map(match => ({
96
+ ...match,
97
+ forward: !match.bottomStrand,
98
+ className:
99
+ "veSearchLayer " +
100
+ (match.bottomStrand ? " veSearchLayerBottomStrand" : ""),
101
+ isSearchLayer: true
102
+ }))
103
+ ];
101
104
  }
102
105
 
103
106
  export default createSelector(
@@ -110,6 +113,6 @@ export default createSelector(
110
113
  state => state.sequenceData.isProtein,
111
114
  state => state.sequenceData.proteinSequence,
112
115
  state => state.findTool && state.findTool.mismatchesAllowed,
113
- state => state.temporaryAnnotations.searchLayers,
116
+ state => state.temporaryAnnotations?.searchLayers,
114
117
  searchLayersSelector
115
118
  );