@teselagen/ove 0.8.18 → 0.8.20
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.
- package/index.cjs.js +238 -57
- package/index.es.js +238 -57
- package/index.umd.js +238 -57
- package/ove.css +6 -0
- package/package.json +2 -2
- package/selectors/translationsSelector.d.ts +6 -2
- package/src/AlignmentView/index.js +6 -0
- package/src/AlignmentView/style.css +6 -0
- package/src/LinearView/index.js +1 -0
- package/src/PropertySidePanel/index.js +3 -1
- package/src/StatusBar/MeltingTemp.js +16 -5
- package/src/helperComponents/AddOrEditPrimerDialog/index.js +23 -11
- package/src/selectors/translationsSelector.js +17 -8
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import { reduce } from "lodash-es";
|
|
1
|
+
import { reduce, mapValues } from "lodash-es";
|
|
2
2
|
import uuid from "shortid";
|
|
3
3
|
import sequenceSelector from "./sequenceSelector";
|
|
4
4
|
import orfsSelector from "./orfsSelector";
|
|
5
5
|
import { createSelector } from "reselect";
|
|
6
6
|
|
|
7
7
|
import { getAminoAcidDataForEachBaseOfDna } from "@teselagen/sequence-utils";
|
|
8
|
-
import each from "lodash/each";
|
|
9
8
|
import translationsRawSelector from "./translationsRawSelector";
|
|
10
9
|
import translationSearchMatchesSelector from "./translationSearchMatchesSelector";
|
|
11
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
expandOrContractRangeByLength,
|
|
12
|
+
normalizePositionByRangeLength
|
|
13
|
+
} from "@teselagen/range-utils";
|
|
12
14
|
import cdsFeaturesSelector from "./cdsFeaturesSelector";
|
|
13
15
|
import circularSelector from "./circularSelector";
|
|
14
16
|
|
|
@@ -109,14 +111,21 @@ function translationsSelector(
|
|
|
109
111
|
{}
|
|
110
112
|
)
|
|
111
113
|
};
|
|
112
|
-
|
|
113
|
-
|
|
114
|
+
return mapValues(translationsToPass, translation => {
|
|
115
|
+
const codonStart = translation?.notes?.codon_start?.[0] - 1 || 0;
|
|
116
|
+
const expandedRange = expandOrContractRangeByLength(
|
|
117
|
+
translation,
|
|
118
|
+
-codonStart,
|
|
119
|
+
true,
|
|
120
|
+
sequence.length
|
|
121
|
+
);
|
|
122
|
+
expandedRange.aminoAcids = getAminoAcidDataForEachBaseOfDna(
|
|
114
123
|
sequence,
|
|
115
|
-
|
|
116
|
-
|
|
124
|
+
expandedRange.forward,
|
|
125
|
+
expandedRange
|
|
117
126
|
);
|
|
127
|
+
return expandedRange;
|
|
118
128
|
});
|
|
119
|
-
return translationsToPass;
|
|
120
129
|
}
|
|
121
130
|
|
|
122
131
|
export default createSelector(
|