gps-global-types 1.0.11 → 1.0.12
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/cluster.types.tsx +12 -0
- package/index.tsx +3 -1
- package/isolate.types.tsx +134 -0
- package/mst.types.tsx +13 -2
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const ClusterFields = {
|
|
2
|
+
'_id': ObjectId,
|
|
3
|
+
'threshold': Number,
|
|
4
|
+
'scheme': String,
|
|
5
|
+
'clusterNickName': String,
|
|
6
|
+
'isActive': Boolean,
|
|
7
|
+
'dateCreated': Date,
|
|
8
|
+
'lastModified': Date,
|
|
9
|
+
'minimumPatientCount': Number,
|
|
10
|
+
// 'isolates': [clusterIsoSchema], //array of ClusterIsolates
|
|
11
|
+
'distances': Map,
|
|
12
|
+
}
|
package/index.tsx
CHANGED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
export const KlebFields = {
|
|
2
|
+
'Yersiniabactin': String,
|
|
3
|
+
'Colibactin': String,
|
|
4
|
+
'Aerobactin': String,
|
|
5
|
+
'Salmochelin': String,
|
|
6
|
+
'RmpADC': String,
|
|
7
|
+
'rmpA2': String,
|
|
8
|
+
'K_locus': String,
|
|
9
|
+
'O_locus': String,
|
|
10
|
+
'O_type': String,
|
|
11
|
+
"SHV_mutations": String,
|
|
12
|
+
"Omp_mutations": String,
|
|
13
|
+
"Col_mutations": String,
|
|
14
|
+
"Flq_mutations": String,
|
|
15
|
+
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export const IsolateFields = {
|
|
20
|
+
"_id":String,
|
|
21
|
+
"mrsnId": String,
|
|
22
|
+
"qcCallFinal": String,
|
|
23
|
+
"rawOrganismId": String,
|
|
24
|
+
"genus": String,
|
|
25
|
+
"species": String,
|
|
26
|
+
"wgsId": String,
|
|
27
|
+
"topHits": String,
|
|
28
|
+
"wgsIdMethod": String,
|
|
29
|
+
"dbBuild": String,
|
|
30
|
+
"isContaminated": Boolean,
|
|
31
|
+
"projects": Array,
|
|
32
|
+
"libraryPlate": String,
|
|
33
|
+
"sequencingRun": String,
|
|
34
|
+
"numberOfContigsRaw": Number,
|
|
35
|
+
"numberOfContigsFilteredForLength": Number,
|
|
36
|
+
"totalLengthOfContigsFilteredForLength": Number,
|
|
37
|
+
"numberOfContigsFilteredForLowCoverage": Number,
|
|
38
|
+
"totalLengthOfContigsFilteredForLowCoverage": String,
|
|
39
|
+
"numberOfGoodContigs": Number,
|
|
40
|
+
"averageReadDepthOfGoodContigs": Number,
|
|
41
|
+
"totalLengthOfGoodContigs": Number,
|
|
42
|
+
"medianInsertSize": String,
|
|
43
|
+
"assembler": String,
|
|
44
|
+
"qcCallAssembly": String,
|
|
45
|
+
"scheme": String,
|
|
46
|
+
"mlst": String,
|
|
47
|
+
"gene1": String,
|
|
48
|
+
"gene2": String,
|
|
49
|
+
"gene3": String,
|
|
50
|
+
"gene4": String,
|
|
51
|
+
"gene5": String,
|
|
52
|
+
"gene6": String,
|
|
53
|
+
"gene7": String,
|
|
54
|
+
"gene8": String,
|
|
55
|
+
"qcCallMlst": String,
|
|
56
|
+
"uploadProcessed": String,
|
|
57
|
+
"uploadUser": String,
|
|
58
|
+
"sequencingRunDate": Date,
|
|
59
|
+
"qcCallId": String,
|
|
60
|
+
"manuallyEnteredWgsId": Boolean,
|
|
61
|
+
"accessionNumber": String,
|
|
62
|
+
"deprecatedSequencedIsolatesCollectionId": String,
|
|
63
|
+
"amr": Array,
|
|
64
|
+
"armordAccessionNumber": String,
|
|
65
|
+
"armordBed": String,
|
|
66
|
+
"armordCultureDate": Date,
|
|
67
|
+
"armordCultureSite": String,
|
|
68
|
+
"armordFacility": String,
|
|
69
|
+
"armordFacilityCode": String,
|
|
70
|
+
"armordFile": String,
|
|
71
|
+
"armordIsolateNumber": String,
|
|
72
|
+
"armordIsolateType": String,
|
|
73
|
+
"armordMrsnId": String,
|
|
74
|
+
"armordPatientId": String,
|
|
75
|
+
"armordRawOrganismId": String,
|
|
76
|
+
"armordUnit": String,
|
|
77
|
+
"submittedOrganismId": String,
|
|
78
|
+
"isManuallyEntered": Boolean,
|
|
79
|
+
"sampleType": String,
|
|
80
|
+
"qcPoc": String,
|
|
81
|
+
"qcReviewer": String,
|
|
82
|
+
"facilityCode": String,
|
|
83
|
+
"facilityName": String,
|
|
84
|
+
"collectionDate": String,
|
|
85
|
+
"index1": String,
|
|
86
|
+
"index2": String,
|
|
87
|
+
"r1FileNameRaw": String,
|
|
88
|
+
"r1FileNameRenamed": String,
|
|
89
|
+
"r1ReadCount": Number,
|
|
90
|
+
"r1ReadsWithWarningsCount": Number,
|
|
91
|
+
"r2FileNameRaw": String,
|
|
92
|
+
"r2FileNameRenamed": String,
|
|
93
|
+
"r2ReadCount": Number,
|
|
94
|
+
"r2ReadsWithWarningsCount": Number,
|
|
95
|
+
"qcCallFastQc": String,
|
|
96
|
+
"inputReads": Number,
|
|
97
|
+
"inputBases": Number,
|
|
98
|
+
"qtrimmedReadsCount": Number,
|
|
99
|
+
"qtrimmedReadsPercent": Number,
|
|
100
|
+
"qtrimmedBasesCount": Number,
|
|
101
|
+
"qtrimmedBasesPercent": Number,
|
|
102
|
+
"ktrimmedReadsCount": Number,
|
|
103
|
+
"ktrimmedReadsPercent": Number,
|
|
104
|
+
"ktrimmedBasesCount": Number,
|
|
105
|
+
"ktrimmedBasesPercent": Number,
|
|
106
|
+
"totalRemovedReadsCount": Number,
|
|
107
|
+
"totalRemovedReadsPercent": Number,
|
|
108
|
+
"totalRemovedBasesCount": Number,
|
|
109
|
+
"totalRemovedBasesPercent": Number,
|
|
110
|
+
"resultReadsCount": Number,
|
|
111
|
+
"resultReadsPercent": Number,
|
|
112
|
+
"resultBasesCount": Number,
|
|
113
|
+
"resultBasesPercent": Number,
|
|
114
|
+
"qcCallTrim": String,
|
|
115
|
+
"assemblyFile": String,
|
|
116
|
+
"assemblerVersion": String,
|
|
117
|
+
"assemblerStatus": Boolean,
|
|
118
|
+
"schemeSelection": String,
|
|
119
|
+
"source": String,
|
|
120
|
+
"mlstUtility": String,
|
|
121
|
+
"mlstUtilityVersion": String,
|
|
122
|
+
"mlstDatabaseVersion": Date,
|
|
123
|
+
"isRepresentative": Boolean,
|
|
124
|
+
"username": String,
|
|
125
|
+
"uploadDate": Date,
|
|
126
|
+
// $addFields with the intent of unpacking objects (amr + projects)
|
|
127
|
+
"tier": Number,
|
|
128
|
+
"allele": String,
|
|
129
|
+
"alleles": Array,
|
|
130
|
+
"projectCode": Array,
|
|
131
|
+
"mrsnSuperFamily": String,
|
|
132
|
+
"expectedPhenotype": String,
|
|
133
|
+
// "kleborate": [KlebSchema]
|
|
134
|
+
}
|
package/mst.types.tsx
CHANGED
|
@@ -40,7 +40,7 @@ export interface LatestNodes { armordCultureDate: Date | string, isos: any[], _i
|
|
|
40
40
|
export interface MSTGraph {
|
|
41
41
|
name?:string,
|
|
42
42
|
snapshotData?:SnapshotType
|
|
43
|
-
nodes: NodeType[] // core parameter of d3tree.js . keeps all isolates collection data
|
|
43
|
+
nodes: any //todo:temp//NodeType[] // core parameter of d3tree.js . keeps all isolates collection data
|
|
44
44
|
links: EdgeType[] // core parameter of d3tree.js
|
|
45
45
|
latest: LatestNodes // earliest node for easy toggling
|
|
46
46
|
custom: CustomDict // . I KNOW THIS IS DUMB but from user's pov it results in seamless color transitions across pages
|
|
@@ -95,7 +95,7 @@ export interface LegendBullet { //or custom upload data
|
|
|
95
95
|
label: string
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
export type MSTLegend = Record<colorKey
|
|
98
|
+
export type MSTLegend = Partial<Record<colorKey|'beforeAndAfter'|'custom color', LegendBullet[]>> & Partial<Record<dateKey, 'date'>>;
|
|
99
99
|
// & { 'beforeAndAfter': [{ color: '#666666', label: 'Before ' }, { color: '#4a64aa', label: 'After ' }] }
|
|
100
100
|
|
|
101
101
|
|
|
@@ -150,3 +150,14 @@ export interface SnapshotType {
|
|
|
150
150
|
// module.exports = { MSTGraph, MSTLegend, NodeType,EdgeType,Hex, ColorField,LabelField}
|
|
151
151
|
// exports.unused = {};
|
|
152
152
|
|
|
153
|
+
|
|
154
|
+
interface clusterProps {
|
|
155
|
+
//theres 4 ways of calling this function
|
|
156
|
+
//1. through a BAQ involving iso and/or cluster fields
|
|
157
|
+
isolatesQuery?:Partial<Record<keyof typeof IsolateFields, MongoField<string>>>,
|
|
158
|
+
clusterQuery?:Partial<Record<keyof typeof ClusterFields, MongoField<string>>>, //2. selecting a cluster on /clusters (sending cluster _id)
|
|
159
|
+
fuzzy?:number, //3. by recalculating a previous query
|
|
160
|
+
neighbors?:number, // (fuzzy and neighbors are only available on recalc)
|
|
161
|
+
snapshotData?:SnapshotType //4. uploading a snapshot. (should i extrapolate ),
|
|
162
|
+
|
|
163
|
+
}
|