nmr-processing 7.4.1 → 7.4.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.
- package/lib/assignment/getAssignments.d.ts +1 -1
- package/lib/assignment/nmrAssigment.d.ts +19 -27
- package/lib/assignment/utils/getAssignment/buildAssignments.d.ts +1 -1
- package/lib/assignment/utils/getAssignment/checkIDs.d.ts +3 -20
- package/lib/assignment/utils/getAssignment/checkIDs.js.map +1 -1
- package/lib/assignment/utils/getAssignment/formatData.d.ts +1 -1
- package/lib/assignment/utils/getAssignment/formatData.js.map +1 -1
- package/lib/assignment/utils/getAssignment/getTargetsAndCorrelations.d.ts +1 -1
- package/lib/assignment/utils/getAssignment/getTargetsAndCorrelations.js.map +1 -1
- package/lib/index.d.ts +3 -1
- package/lib-esm/assignment/utils/getAssignment/checkIDs.js.map +1 -1
- package/lib-esm/assignment/utils/getAssignment/formatData.js.map +1 -1
- package/lib-esm/assignment/utils/getAssignment/getTargetsAndCorrelations.js.map +1 -1
- package/package.json +1 -1
- package/src/assignment/nmrAssigment.ts +23 -21
- package/src/assignment/utils/getAssignment/buildAssignments.ts +1 -1
- package/src/assignment/utils/getAssignment/checkIDs.ts +6 -28
- package/src/assignment/utils/getAssignment/formatData.ts +2 -1
- package/src/assignment/utils/getAssignment/getTargetsAndCorrelations.ts +2 -1
- package/src/index.ts +9 -1
|
@@ -77,5 +77,5 @@ export interface GetAssignmentsOptions {
|
|
|
77
77
|
}
|
|
78
78
|
export declare function getAssignments(input: GetAutoAssignmentInput, options?: GetAssignmentsOptions): Promise<{
|
|
79
79
|
score: w;
|
|
80
|
-
assignment: import("./
|
|
80
|
+
assignment: import("./nmrAssigment").SpectraDataWithIds[];
|
|
81
81
|
}[]>;
|
|
@@ -1,28 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import type {
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
[key: string]: number;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Contains the ranges for each nucleus or kind of experiment e.g. { H: [], C: [], apt: [], dept135: []}
|
|
13
|
-
* the ranges represented with atom label only contain the range from a single pulse experiment or equivalent.
|
|
14
|
-
*/
|
|
15
|
-
ranges: {
|
|
16
|
-
[key: string]: NMRRange[];
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Contains the zones for each kind of experiment e.g. { H: [], C: [], apt: [], dept135: []};
|
|
20
|
-
*/
|
|
21
|
-
zones: {
|
|
22
|
-
[key: string]: NMRZone[];
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Instance of Molecule
|
|
26
|
-
*/
|
|
27
|
-
molecule: Molecule;
|
|
1
|
+
import type { NMRRange, NMRSignal1D, NMRSignal2D, NMRZone } from '..';
|
|
2
|
+
import { MakeMandatory } from '../utilities/MakeMandatory';
|
|
3
|
+
import type { SpectraData1D, SpectraData2D } from './getAssignments';
|
|
4
|
+
export declare type NMRSignal1DWithId = MakeMandatory<NMRSignal1D, 'id'>;
|
|
5
|
+
export declare type NMRSignal2DWithId = MakeMandatory<NMRSignal2D, 'id'>;
|
|
6
|
+
export interface NMRZoneWithIds extends Omit<NMRZone, 'signals' | 'id'> {
|
|
7
|
+
id: string;
|
|
8
|
+
signals: Array<NMRSignal2DWithId>;
|
|
28
9
|
}
|
|
10
|
+
export interface NMRRangeWithIds extends Omit<NMRRange, 'id' | 'signals'> {
|
|
11
|
+
id: string;
|
|
12
|
+
signals: Array<NMRSignal1DWithId>;
|
|
13
|
+
}
|
|
14
|
+
export interface SpectraData1DWithIds extends Omit<SpectraData1D, 'ranges'> {
|
|
15
|
+
ranges: NMRRangeWithIds[];
|
|
16
|
+
}
|
|
17
|
+
export interface SpectraData2DWithIds extends Omit<SpectraData2D, 'zones'> {
|
|
18
|
+
zones: NMRZoneWithIds[];
|
|
19
|
+
}
|
|
20
|
+
export declare type SpectraDataWithIds = SpectraData1DWithIds | SpectraData2DWithIds;
|
|
@@ -2,7 +2,7 @@ import { Values } from 'nmr-correlation';
|
|
|
2
2
|
import { Molecule } from 'openchemlib';
|
|
3
3
|
import { NMRSignal1D, PredictCarbonOptions, PredictProtonOptions } from '../../..';
|
|
4
4
|
import { MakeMandatory } from '../../../utilities/MakeMandatory';
|
|
5
|
-
import { SpectraDataWithIds } from '
|
|
5
|
+
import { SpectraDataWithIds } from '../../nmrAssigment';
|
|
6
6
|
import { TargetsByAtomType } from './getTargetsAndCorrelations';
|
|
7
7
|
export declare type AtomTypes = 'H' | 'C';
|
|
8
8
|
export declare type CurrentAtoms = Array<AtomTypes>;
|
|
@@ -1,23 +1,6 @@
|
|
|
1
|
-
import type { NMRRange,
|
|
2
|
-
import {
|
|
3
|
-
import type {
|
|
4
|
-
export declare type NMRSignal1DWithId = MakeMandatory<NMRSignal1D, 'id'>;
|
|
5
|
-
export declare type NMRSignal2DWithId = MakeMandatory<NMRSignal2D, 'id'>;
|
|
6
|
-
export interface NMRZoneWithIds extends Omit<NMRZone, 'signals' | 'id'> {
|
|
7
|
-
id: string;
|
|
8
|
-
signals: Array<NMRSignal2DWithId>;
|
|
9
|
-
}
|
|
10
|
-
export interface NMRRangeWithIds extends Omit<NMRRange, 'id' | 'signals'> {
|
|
11
|
-
id: string;
|
|
12
|
-
signals: Array<NMRSignal1DWithId>;
|
|
13
|
-
}
|
|
14
|
-
export interface SpectraData1DWithIds extends Omit<SpectraData1D, 'ranges'> {
|
|
15
|
-
ranges: NMRRangeWithIds[];
|
|
16
|
-
}
|
|
17
|
-
export interface SpectraData2DWithIds extends Omit<SpectraData2D, 'zones'> {
|
|
18
|
-
zones: NMRZoneWithIds[];
|
|
19
|
-
}
|
|
20
|
-
export declare type SpectraDataWithIds = SpectraData1DWithIds | SpectraData2DWithIds;
|
|
1
|
+
import type { NMRRange, NMRZone } from '../../..';
|
|
2
|
+
import type { SpectraData } from '../../getAssignments';
|
|
3
|
+
import type { SpectraDataWithIds, NMRRangeWithIds, NMRZoneWithIds } from '../../nmrAssigment';
|
|
21
4
|
export declare function checkIDs(input?: SpectraData[]): SpectraDataWithIds[];
|
|
22
5
|
export declare function hasIDs(data: NMRRange[] | NMRZone[]): asserts data is NMRRangeWithIds[] | NMRZoneWithIds[];
|
|
23
6
|
export declare function addIDs(data: NMRRange[] | NMRZone[]): NMRRangeWithIds[] | NMRZoneWithIds[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkIDs.js","sourceRoot":"","sources":["../../../../src/assignment/utils/getAssignment/checkIDs.ts"],"names":[],"mappings":";;;;;;AAOA,+DAAuC;AAEvC,uDAAoD;
|
|
1
|
+
{"version":3,"file":"checkIDs.js","sourceRoot":"","sources":["../../../../src/assignment/utils/getAssignment/checkIDs.ts"],"names":[],"mappings":";;;;;;AAOA,+DAAuC;AAEvC,uDAAoD;AAEpD,SAAgB,QAAQ,CAAC,QAAuB,EAAE;IAChD,IAAI,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAkB,CAAC;IACpE,IAAI,OAAO,GAAyB,EAAE,CAAC;IACvC,KAAK,MAAM,WAAW,IAAI,UAAU,EAAE;QACpC,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,WAAW,CAAC;QACjC,IAAI,IAAA,iCAAe,EAAC,WAAW,CAAC,EAAE;YAChC,IAAI,IAAI,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAsB,CAAC;YAC3D,KAAK,MAAM,OAAO,IAAI,IAAI,EAAE;gBAC1B,MAAM,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;gBAChC,KAAK,IAAI,MAAM,IAAI,OAAO,CAAC,OAAO,IAAI,EAAE,EAAE;oBACxC,IAAI,CAAC,MAAM,CAAC,WAAW;wBAAE,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC;iBAC3D;aACF;YACD,OAAO,CAAC,IAAI,CAAC,EAA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WithIds, SpectraData2DWithIds, SpectraDataWithIds } from '../../nmrAssigment';
|
|
2
2
|
interface SpectraData1DFormatted extends Omit<SpectraData1DWithIds, 'ranges'> {
|
|
3
3
|
ranges: {
|
|
4
4
|
values: NMRRangeWithIds[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatData.js","sourceRoot":"","sources":["../../../../src/assignment/utils/getAssignment/formatData.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"formatData.js","sourceRoot":"","sources":["../../../../src/assignment/utils/getAssignment/formatData.ts"],"names":[],"mappings":";;;AAQA,uDAAoD;AAapD,SAAgB,UAAU,CACxB,QAA8B,EAAE;IAEhC,IAAI,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAyB,CAAC;IAC3E,IAAI,OAAO,GAA2B,EAAE,CAAC;IACzC,KAAK,MAAM,WAAW,IAAI,UAAU,EAAE;QACpC,MAAM,EAAE,IAAI,EAAE,GAAG,WAAW,CAAC;QAC7B,IAAI,IAAA,iCAAe,EAAC,WAAW,CAAC,EAAE;YAChC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;SAChE;aAAM;YACL,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,WAAW,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;SAC9D;KACF;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAdD,gCAcC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Correlation, Link } from 'nmr-correlation';
|
|
2
|
-
import { SpectraDataWithIds } from '
|
|
2
|
+
import { SpectraDataWithIds } from '../../nmrAssigment';
|
|
3
3
|
export interface CorrelationWithIntegration extends Pick<Correlation, 'link' | 'atomType' | 'label' | 'attachment' | 'protonsCount'> {
|
|
4
4
|
integration: number;
|
|
5
5
|
indirectLinks: Array<Link>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTargetsAndCorrelations.js","sourceRoot":"","sources":["../../../../src/assignment/utils/getAssignment/getTargetsAndCorrelations.ts"],"names":[],"mappings":";;;AAAA,qDAAuD;
|
|
1
|
+
{"version":3,"file":"getTargetsAndCorrelations.js","sourceRoot":"","sources":["../../../../src/assignment/utils/getAssignment/getTargetsAndCorrelations.ts"],"names":[],"mappings":";;;AAAA,qDAAuD;AAKvD,6CAA0C;AAC1C,uFAAoF;AAsBpF,SAAgB,yBAAyB,CACvC,OAA6B,EAC7B,UAAe,EAAE;IAEjB,gFAAgF;IAChF,8DAA8D;IAE9D,MAAM,EAAE,SAAS,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC;IAErD,MAAM,WAAW,GAAG,IAAA,uBAAU,EAAC,OAAO,CAAC,CAAC;IACxC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,IAAA,sCAAoB,EAAC,WAAW,EAAE;QACjE,SAAS;KACV,CAAC,CAAC;IAEH,IAAI,OAAO,GAAQ,EAAE,CAAC;IACtB,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE;QACtC,IAAI,WAAW,CAAC,MAAM;YAAE,SAAS;QACjC,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,WAAW,CAAC;QAC/C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;YAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;QAC/C,OAAO,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,GAAG,WAAW,CAAC;QAC1C,IAAI,QAAQ,KAAK,GAAG,EAAE;YACpB,OAAO,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,WAAW;gBACrC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC;SAC1C;aAAM;YACL,OAAO,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,WAAW,GAAG,IAAA,iEAA+B,EACvE,WAAW,EACX,YAAY,CACb,CAAC;SACH;KACF;IAED,OAAO;QACL,OAAO;QACP,YAAY;KACb,CAAC;AACJ,CAAC;AAnCD,8DAmCC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -28,10 +28,12 @@ export * from './databases/getDatabase';
|
|
|
28
28
|
export * from './databases/carbonImpurities';
|
|
29
29
|
export * from './databases/protonImpurities';
|
|
30
30
|
export type { NMRSignal1D } from './signals/NMRSignal1D';
|
|
31
|
-
export type { NMRSignal2D } from './xyz/NMRSignal2D';
|
|
31
|
+
export type { NMRSignal2D, Signal2DAxisData } from './xyz/NMRSignal2D';
|
|
32
32
|
export type { NMRRange } from './xy/NMRRange';
|
|
33
33
|
export type { NMRZone } from './xyz/NMRZone';
|
|
34
34
|
export type { NMRPeak1D } from './peaks/NMRPeak1D';
|
|
35
35
|
export type { Prediction1D } from './prediction/prediction1D';
|
|
36
36
|
export type { Jcoupling } from './signals/jcoupling';
|
|
37
|
+
export type { DatabaseNMREntry } from './databases/DatabaseNMREntry';
|
|
37
38
|
export type { DataBaseLevelStructure, DataBaseStructure, } from './prediction/dataStructure';
|
|
39
|
+
export type { NMRSignal1DWithId, NMRSignal2DWithId, SpectraData1DWithIds, SpectraData2DWithIds, SpectraDataWithIds, } from './assignment/nmrAssigment';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkIDs.js","sourceRoot":"","sources":["../../../../src/assignment/utils/getAssignment/checkIDs.ts"],"names":[],"mappings":"AAOA,OAAO,UAAU,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"checkIDs.js","sourceRoot":"","sources":["../../../../src/assignment/utils/getAssignment/checkIDs.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AC;QAC/D,KAAK,IAAI,MAAM,IAAI,OAAO,CAAC,OAAO,IAAI,EAAE,EAAE;YACxC,IAAI,CAAC,MAAM,CAAC,EAAE;gBAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;SAC3D;KACF;AACH,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,IAA4B;IACjD,KAAK,MAAM,OAAO,IAAI,IAAI,EAAE;QAC1B,IAAI,CAAC,OAAO,CAAC,EAAE;YAAE,OAAO,CAAC,EAAE,GAAG,UAAU,EAAE,CAAC;QAC3C,KAAK,IAAI,MAAM,IAAI,OAAO,CAAC,OAAO,IAAI,EAAE,EAAE;YACxC,IAAI,CAAC,MAAM,CAAC,EAAE;gBAAE,MAAM,CAAC,EAAE,GAAG,UAAU,EAAE,CAAC;SAC1C;KACF;IACD,MAAM,CAAC,IAAI,CAAC,CAAC;IACb,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatData.js","sourceRoot":"","sources":["../../../../src/assignment/utils/getAssignment/formatData.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"formatData.js","sourceRoot":"","sources":["../../../../src/assignment/utils/getAssignment/formatData.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAapD,MAAM,UAAU,UAAU,CACxB,QAA8B,EAAE;IAEhC,IAAI,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAyB,CAAC;IAC3E,IAAI,OAAO,GAA2B,EAAE,CAAC;IACzC,KAAK,MAAM,WAAW,IAAI,UAAU,EAAE;QACpC,MAAM,EAAE,IAAI,EAAE,GAAG,WAAW,CAAC;QAC7B,IAAI,eAAe,CAAC,WAAW,CAAC,EAAE;YAChC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;SAChE;aAAM;YACL,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,WAAW,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;SAC9D;KACF;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTargetsAndCorrelations.js","sourceRoot":"","sources":["../../../../src/assignment/utils/getAssignment/getTargetsAndCorrelations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"getTargetsAndCorrelations.js","sourceRoot":"","sources":["../../../../src/assignment/utils/getAssignment/getTargetsAndCorrelations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAKvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AAsBpF,MAAM,UAAU,yBAAyB,CACvC,OAA6B,EAC7B,UAAe,EAAE;IAEjB,gFAAgF;IAChF,8DAA8D;IAE9D,MAAM,EAAE,SAAS,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC;IAErD,MAAM,WAAW,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IACxC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,oBAAoB,CAAC,WAAW,EAAE;QACjE,SAAS;KACV,CAAC,CAAC;IAEH,IAAI,OAAO,GAAQ,EAAE,CAAC;IACtB,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE;QACtC,IAAI,WAAW,CAAC,MAAM;YAAE,SAAS;QACjC,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,WAAW,CAAC;QAC/C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;YAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC;QAC/C,OAAO,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,GAAG,WAAW,CAAC;QAC1C,IAAI,QAAQ,KAAK,GAAG,EAAE;YACpB,OAAO,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,WAAW;gBACrC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC;SAC1C;aAAM;YACL,OAAO,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC,WAAW,GAAG,+BAA+B,CACvE,WAAW,EACX,YAAY,CACb,CAAC;SACH;KACF;IAED,OAAO;QACL,OAAO;QACP,YAAY;KACb,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { NMRRange, NMRSignal1D, NMRSignal2D, NMRZone } from '..';
|
|
2
|
+
import { MakeMandatory } from '../utilities/MakeMandatory';
|
|
2
3
|
|
|
3
|
-
import type {
|
|
4
|
-
import type { NMRZone } from '../xyz/NMRZone';
|
|
4
|
+
import type { SpectraData1D, SpectraData2D } from './getAssignments';
|
|
5
5
|
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* Contains the zones for each kind of experiment e.g. { H: [], C: [], apt: [], dept135: []};
|
|
18
|
-
*/
|
|
19
|
-
zones: { [key: string]: NMRZone[] };
|
|
20
|
-
/**
|
|
21
|
-
* Instance of Molecule
|
|
22
|
-
*/
|
|
23
|
-
molecule: Molecule;
|
|
6
|
+
export type NMRSignal1DWithId = MakeMandatory<NMRSignal1D, 'id'>;
|
|
7
|
+
export type NMRSignal2DWithId = MakeMandatory<NMRSignal2D, 'id'>;
|
|
8
|
+
|
|
9
|
+
export interface NMRZoneWithIds extends Omit<NMRZone, 'signals' | 'id'> {
|
|
10
|
+
id: string;
|
|
11
|
+
signals: Array<NMRSignal2DWithId>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface NMRRangeWithIds extends Omit<NMRRange, 'id' | 'signals'> {
|
|
15
|
+
id: string;
|
|
16
|
+
signals: Array<NMRSignal1DWithId>;
|
|
24
17
|
}
|
|
18
|
+
|
|
19
|
+
export interface SpectraData1DWithIds extends Omit<SpectraData1D, 'ranges'> {
|
|
20
|
+
ranges: NMRRangeWithIds[];
|
|
21
|
+
}
|
|
22
|
+
export interface SpectraData2DWithIds extends Omit<SpectraData2D, 'zones'> {
|
|
23
|
+
zones: NMRZoneWithIds[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type SpectraDataWithIds = SpectraData1DWithIds | SpectraData2DWithIds;
|
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
import { predictCarbon } from '../../../prediction/predictCarbon';
|
|
12
12
|
import { predictProton } from '../../../prediction/predictProton';
|
|
13
13
|
import { MakeMandatory } from '../../../utilities/MakeMandatory';
|
|
14
|
+
import { SpectraDataWithIds } from '../../nmrAssigment';
|
|
14
15
|
import { StoreAssignments } from '../buildAssignments';
|
|
15
16
|
|
|
16
|
-
import { SpectraDataWithIds } from './checkIDs';
|
|
17
17
|
import {
|
|
18
18
|
createMapPossibleAssignment,
|
|
19
19
|
MapPossibleAssignments,
|
|
@@ -1,36 +1,14 @@
|
|
|
1
|
-
import type { NMRRange,
|
|
2
|
-
import {
|
|
1
|
+
import type { NMRRange, NMRZone } from '../../..';
|
|
2
|
+
import type { SpectraData } from '../../getAssignments';
|
|
3
3
|
import type {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from '../../
|
|
4
|
+
SpectraDataWithIds,
|
|
5
|
+
NMRRangeWithIds,
|
|
6
|
+
NMRZoneWithIds,
|
|
7
|
+
} from '../../nmrAssigment';
|
|
8
8
|
import generateID from '../generateID';
|
|
9
9
|
|
|
10
10
|
import { isSpectraData1D } from './isSpectraData1D';
|
|
11
11
|
|
|
12
|
-
export type NMRSignal1DWithId = MakeMandatory<NMRSignal1D, 'id'>;
|
|
13
|
-
export type NMRSignal2DWithId = MakeMandatory<NMRSignal2D, 'id'>;
|
|
14
|
-
|
|
15
|
-
export interface NMRZoneWithIds extends Omit<NMRZone, 'signals' | 'id'> {
|
|
16
|
-
id: string;
|
|
17
|
-
signals: Array<NMRSignal2DWithId>;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export interface NMRRangeWithIds extends Omit<NMRRange, 'id' | 'signals'> {
|
|
21
|
-
id: string;
|
|
22
|
-
signals: Array<NMRSignal1DWithId>;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export interface SpectraData1DWithIds extends Omit<SpectraData1D, 'ranges'> {
|
|
26
|
-
ranges: NMRRangeWithIds[];
|
|
27
|
-
}
|
|
28
|
-
export interface SpectraData2DWithIds extends Omit<SpectraData2D, 'zones'> {
|
|
29
|
-
zones: NMRZoneWithIds[];
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export type SpectraDataWithIds = SpectraData1DWithIds | SpectraData2DWithIds;
|
|
33
|
-
|
|
34
12
|
export function checkIDs(input: SpectraData[] = []): SpectraDataWithIds[] {
|
|
35
13
|
let inputClone = JSON.parse(JSON.stringify(input)) as SpectraData[];
|
|
36
14
|
let spectra: SpectraDataWithIds[] = [];
|
|
@@ -4,7 +4,8 @@ import {
|
|
|
4
4
|
SpectraData1DWithIds,
|
|
5
5
|
SpectraData2DWithIds,
|
|
6
6
|
SpectraDataWithIds,
|
|
7
|
-
} from '
|
|
7
|
+
} from '../../nmrAssigment';
|
|
8
|
+
|
|
8
9
|
import { isSpectraData1D } from './isSpectraData1D';
|
|
9
10
|
|
|
10
11
|
interface SpectraData1DFormatted extends Omit<SpectraData1DWithIds, 'ranges'> {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { buildCorrelationData } from 'nmr-correlation';
|
|
2
2
|
import type { Correlation, Link } from 'nmr-correlation';
|
|
3
3
|
|
|
4
|
-
import { SpectraDataWithIds } from '
|
|
4
|
+
import { SpectraDataWithIds } from '../../nmrAssigment';
|
|
5
|
+
|
|
5
6
|
import { formatData } from './formatData';
|
|
6
7
|
import { getIntegrationOfAttachedProtons } from './getIntegrationOfAttachedProtons';
|
|
7
8
|
|
package/src/index.ts
CHANGED
|
@@ -38,13 +38,21 @@ export * from './databases/carbonImpurities';
|
|
|
38
38
|
export * from './databases/protonImpurities';
|
|
39
39
|
|
|
40
40
|
export type { NMRSignal1D } from './signals/NMRSignal1D';
|
|
41
|
-
export type { NMRSignal2D } from './xyz/NMRSignal2D';
|
|
41
|
+
export type { NMRSignal2D, Signal2DAxisData } from './xyz/NMRSignal2D';
|
|
42
42
|
export type { NMRRange } from './xy/NMRRange';
|
|
43
43
|
export type { NMRZone } from './xyz/NMRZone';
|
|
44
44
|
export type { NMRPeak1D } from './peaks/NMRPeak1D';
|
|
45
45
|
export type { Prediction1D } from './prediction/prediction1D';
|
|
46
46
|
export type { Jcoupling } from './signals/jcoupling';
|
|
47
|
+
export type { DatabaseNMREntry } from './databases/DatabaseNMREntry';
|
|
47
48
|
export type {
|
|
48
49
|
DataBaseLevelStructure,
|
|
49
50
|
DataBaseStructure,
|
|
50
51
|
} from './prediction/dataStructure';
|
|
52
|
+
export type {
|
|
53
|
+
NMRSignal1DWithId,
|
|
54
|
+
NMRSignal2DWithId,
|
|
55
|
+
SpectraData1DWithIds,
|
|
56
|
+
SpectraData2DWithIds,
|
|
57
|
+
SpectraDataWithIds,
|
|
58
|
+
} from './assignment/nmrAssigment';
|