@teselagen/ove 0.8.8 → 0.8.9
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/CutsiteFilter/AdditionalCutsiteInfoDialog.d.ts +1 -1
- package/Editor/FillWindow.d.ts +1 -1
- package/Editor/index.d.ts +2 -2
- package/Reflex/ReflexContainer.d.ts +1 -3
- package/Reflex/ReflexElement.d.ts +1 -1
- package/commands/index.d.ts +2 -11
- package/index.cjs.js +29 -405
- package/index.es.js +29 -405
- package/index.umd.js +29 -405
- package/package.json +1 -1
- package/selectors/annotationSearchSelector.d.ts +1 -1
- package/selectors/cdsFeaturesSelector.d.ts +1 -1
- package/selectors/cutsitesSelector.d.ts +2 -2
- package/selectors/filteredFeaturesSelector.d.ts +1 -1
- package/selectors/filteredPartsSelector.d.ts +1 -1
- package/selectors/filteredPrimersSelector.d.ts +1 -1
- package/selectors/searchLayersSelector.d.ts +1 -1
- package/selectors/translationsSelector.d.ts +1 -11
- package/src/AlignmentView/index.js +15 -7
- package/src/PropertySidePanel/index.js +2 -1
- package/src/utils/getAlignedAminoAcidSequenceProps.js +8 -2
- package/utils/addWrappedAddons.d.ts +1 -1
- package/utils/editorUtils.d.ts +1 -1
- package/utils/getAlignedAminoAcidSequenceProps.d.ts +12 -0
- package/withEditorInteractions/clickAndDragUtils.d.ts +5 -5
|
@@ -74,7 +74,11 @@ import { coerceInitialValue } from "./coerceInitialValue";
|
|
|
74
74
|
import { tabHeight } from "../constants";
|
|
75
75
|
import LabileSitesLayer from "./LabileSitesLayer";
|
|
76
76
|
import PropertySidePanel from "../PropertySidePanel";
|
|
77
|
-
import {
|
|
77
|
+
import {
|
|
78
|
+
getAlignedAminoAcidSequenceProps,
|
|
79
|
+
getLabileSites,
|
|
80
|
+
parseTracks
|
|
81
|
+
} from "../utils/getAlignedAminoAcidSequenceProps";
|
|
78
82
|
|
|
79
83
|
let charWidthInLinearViewDefault = 12;
|
|
80
84
|
try {
|
|
@@ -244,6 +248,11 @@ export const AlignmentView = props => {
|
|
|
244
248
|
}
|
|
245
249
|
};
|
|
246
250
|
|
|
251
|
+
const aminoAcidAlignmentProperties = useMemo(() => {
|
|
252
|
+
if (isPairwise || !alignmentTracks[0].sequenceData.isProtein) return;
|
|
253
|
+
return getAlignedAminoAcidSequenceProps(alignmentTracks);
|
|
254
|
+
}, [alignmentTracks, isPairwise]);
|
|
255
|
+
|
|
247
256
|
useEffect(() => {
|
|
248
257
|
window.scrollAlignmentToPercent = scrollAlignmentToPercent;
|
|
249
258
|
if (window.Cypress)
|
|
@@ -684,11 +693,6 @@ export const AlignmentView = props => {
|
|
|
684
693
|
});
|
|
685
694
|
};
|
|
686
695
|
|
|
687
|
-
const aminoAcidAlignmentProperties = useMemo(() => {
|
|
688
|
-
if (isPairwise || !alignmentTracks[0].sequenceData.isProtein) return;
|
|
689
|
-
return getAlignedAminoAcidSequenceProps(alignmentTracks);
|
|
690
|
-
}, [alignmentTracks, isPairwise]);
|
|
691
|
-
|
|
692
696
|
const renderItem = (_i, _key, isTemplate, cloneProps) => {
|
|
693
697
|
const isDragDisabled = !allowTrackRearrange || isPairwise;
|
|
694
698
|
let i;
|
|
@@ -1966,6 +1970,9 @@ export default compose(
|
|
|
1966
1970
|
}
|
|
1967
1971
|
});
|
|
1968
1972
|
|
|
1973
|
+
const tracks = parseTracks(alignmentTracks);
|
|
1974
|
+
const labileSites = getLabileSites(tracks, 0.5);
|
|
1975
|
+
|
|
1969
1976
|
const annotationsWithCounts = [];
|
|
1970
1977
|
if (alignmentTracks) {
|
|
1971
1978
|
let totalNumOfFeatures = 0;
|
|
@@ -1980,7 +1987,8 @@ export default compose(
|
|
|
1980
1987
|
});
|
|
1981
1988
|
annotationsWithCounts.push({
|
|
1982
1989
|
features: totalNumOfFeatures,
|
|
1983
|
-
parts: totalNumOfParts
|
|
1990
|
+
parts: totalNumOfParts,
|
|
1991
|
+
labileSites: labileSites.sites?.length ?? 0
|
|
1984
1992
|
});
|
|
1985
1993
|
} else if (pairwiseAlignments) {
|
|
1986
1994
|
pairwiseAlignments.forEach(pairwise => {
|
|
@@ -187,6 +187,7 @@ export default ({ properties, setProperties, style }) => {
|
|
|
187
187
|
<div
|
|
188
188
|
ref={sidebarRef}
|
|
189
189
|
style={{
|
|
190
|
+
position: "relative",
|
|
190
191
|
width: isOpen ? 350 : 0,
|
|
191
192
|
minWidth: isOpen ? 350 : 0,
|
|
192
193
|
maxWidth: isOpen ? 350 : 0,
|
|
@@ -205,7 +206,7 @@ export default ({ properties, setProperties, style }) => {
|
|
|
205
206
|
<Button
|
|
206
207
|
style={{
|
|
207
208
|
position: "absolute",
|
|
208
|
-
top:
|
|
209
|
+
top: 0,
|
|
209
210
|
right: 10,
|
|
210
211
|
zIndex: 1,
|
|
211
212
|
cursor: "pointer"
|
|
@@ -214,7 +214,7 @@ function getIdentityAndFrequencies(alignedSequences) {
|
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
function getLabileSites(alignedSequences, threshold = 0.5) {
|
|
217
|
+
export function getLabileSites(alignedSequences, threshold = 0.5) {
|
|
218
218
|
const sequences = Object.values(alignedSequences);
|
|
219
219
|
const alignmentLength = sequences[0].length;
|
|
220
220
|
|
|
@@ -261,7 +261,7 @@ function getLabileSites(alignedSequences, threshold = 0.5) {
|
|
|
261
261
|
};
|
|
262
262
|
}
|
|
263
263
|
|
|
264
|
-
export
|
|
264
|
+
export function parseTracks(tracks) {
|
|
265
265
|
let sequences = {};
|
|
266
266
|
|
|
267
267
|
tracks.forEach(at => {
|
|
@@ -271,6 +271,12 @@ export const getAlignedAminoAcidSequenceProps = tracks => {
|
|
|
271
271
|
};
|
|
272
272
|
});
|
|
273
273
|
|
|
274
|
+
return sequences;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export const getAlignedAminoAcidSequenceProps = tracks => {
|
|
278
|
+
const sequences = parseTracks(tracks);
|
|
279
|
+
|
|
274
280
|
const identity = calculateIdentityMatrix(sequences);
|
|
275
281
|
const { overallIdentity, frequencies } = getIdentityAndFrequencies(sequences);
|
|
276
282
|
const labileSites = getLabileSites(sequences, 0.5);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function addWrappedAddons(anns: any, seqLen: any): any
|
|
1
|
+
export function addWrappedAddons(anns: any, seqLen: any): any;
|
package/utils/editorUtils.d.ts
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
export function getLabileSites(alignedSequences: any, threshold?: number): {
|
|
2
|
+
sites: {
|
|
3
|
+
position: number;
|
|
4
|
+
conservationScore: number;
|
|
5
|
+
residueVariation: string[];
|
|
6
|
+
frequencies: {};
|
|
7
|
+
}[];
|
|
8
|
+
conservationScores: (number | null)[];
|
|
9
|
+
totalLabileSites: number;
|
|
10
|
+
percentageLabile: number;
|
|
11
|
+
};
|
|
12
|
+
export function parseTracks(tracks: any): {};
|
|
1
13
|
export function getAlignedAminoAcidSequenceProps(tracks: any): {
|
|
2
14
|
overallIdentity: number;
|
|
3
15
|
frequencies: number[];
|
|
@@ -41,17 +41,17 @@ export function updateSelectionOrCaret({ shiftHeld, sequenceLength, newRangeOrCa
|
|
|
41
41
|
newRangeOrCaret: any;
|
|
42
42
|
caretPosition: any;
|
|
43
43
|
selectionLayer: any;
|
|
44
|
-
selectionLayerUpdate?:
|
|
45
|
-
caretPositionUpdate?:
|
|
44
|
+
selectionLayerUpdate?: any;
|
|
45
|
+
caretPositionUpdate?: any;
|
|
46
46
|
doNotWrapOrigin: any;
|
|
47
|
-
}):
|
|
47
|
+
}): any;
|
|
48
48
|
export function editorDragged({ nearestCaretPos, doNotWrapOrigin, caretPosition, easyStore, caretPositionUpdate, selectionLayerUpdate, selectionLayer, sequenceLength }: {
|
|
49
49
|
nearestCaretPos: any;
|
|
50
50
|
doNotWrapOrigin: any;
|
|
51
51
|
caretPosition?: number | undefined;
|
|
52
52
|
easyStore: any;
|
|
53
|
-
caretPositionUpdate?:
|
|
54
|
-
selectionLayerUpdate?:
|
|
53
|
+
caretPositionUpdate?: any;
|
|
54
|
+
selectionLayerUpdate?: any;
|
|
55
55
|
selectionLayer?: {
|
|
56
56
|
start: number;
|
|
57
57
|
end: number;
|