netcdf-gcms
Advanced tools
Comparing version 1.3.1 to 1.4.0
@@ -0,1 +1,10 @@ | ||
# [1.4.0](https://github.com/cheminfo-js/netcdf-gcms/compare/v1.3.1...v1.4.0) (2020-03-03) | ||
### Features | ||
* add advion format ([8f866ee](https://github.com/cheminfo-js/netcdf-gcms/commit/8f866ee88e5116165c35b7f72a9f29084d9daa87)) | ||
<a name="1.0.0"></a> | ||
@@ -2,0 +11,0 @@ # 1.0.0 (2016-11-23) |
{ | ||
"name": "netcdf-gcms", | ||
"version": "1.3.1", | ||
"version": "1.4.0", | ||
"description": "Parser from NetCDF files to JSON usable for GCMS", | ||
@@ -34,13 +34,15 @@ "main": "./src/index.js", | ||
"devDependencies": { | ||
"cheminfo-tools": "^1.22.4", | ||
"eslint": "^5.15.1", | ||
"eslint-config-cheminfo": "^1.20.0", | ||
"eslint-plugin-import": "^2.16.0", | ||
"eslint-plugin-jest": "^22.3.2", | ||
"eslint-plugin-no-only-tests": "^2.1.0", | ||
"jest": "^24.5.0" | ||
"cheminfo-tools": "^1.23.3", | ||
"eslint": "^6.8.0", | ||
"eslint-config-cheminfo": "^2.0.4", | ||
"eslint-plugin-import": "^2.20.1", | ||
"eslint-plugin-jest": "^23.8.1", | ||
"eslint-plugin-no-only-tests": "^2.4.0", | ||
"eslint-plugin-prettier": "^3.1.2", | ||
"jest": "^25.1.0", | ||
"prettier": "^1.19.1" | ||
}, | ||
"dependencies": { | ||
"netcdfjs": "^0.7.0" | ||
"netcdfjs": "^1.0.0" | ||
} | ||
} |
@@ -74,9 +74,9 @@ 'use strict'; | ||
var ms = new Array(pointCount.length); | ||
var index = 0; | ||
for (var i = 0; i < ms.length; i++) { | ||
var size = pointCount[i]; | ||
let ms = new Array(pointCount.length); | ||
let index = 0; | ||
for (let i = 0; i < ms.length; i++) { | ||
let size = pointCount[i]; | ||
ms[i] = [new Array(size), new Array(size)]; | ||
for (var j = 0; j < size; j++) { | ||
for (let j = 0; j < size; j++) { | ||
ms[i][0][j] = massValues[index]; | ||
@@ -93,3 +93,3 @@ ms[i][1][j] = intensityValues[index++]; | ||
dimension: 1, | ||
data: tic | ||
data: tic, | ||
}, | ||
@@ -99,5 +99,5 @@ { | ||
dimension: 2, | ||
data: ms | ||
} | ||
] | ||
data: ms, | ||
}, | ||
], | ||
}; | ||
@@ -104,0 +104,0 @@ } |
@@ -71,3 +71,3 @@ 'use strict'; | ||
throw new Error( | ||
'The expected last time does not correspond to the runtimeLength' | ||
'The expected last time does not correspond to the runtimeLength', | ||
); | ||
@@ -92,5 +92,5 @@ } | ||
dimension: 1, | ||
data: intensities | ||
} | ||
] | ||
data: intensities, | ||
}, | ||
], | ||
}; | ||
@@ -97,0 +97,0 @@ } |
'use strict'; | ||
function aiaTemplate(reader) { | ||
var time = []; | ||
let time = []; | ||
const tic = reader.getDataVariable('ordinate_values'); | ||
@@ -11,4 +11,4 @@ | ||
var currentTime = delayTime; | ||
for (var i = 0; i < tic.length; i++) { | ||
let currentTime = delayTime; | ||
for (let i = 0; i < tic.length; i++) { | ||
time.push(currentTime); | ||
@@ -24,5 +24,5 @@ currentTime += interval; | ||
dimension: 1, | ||
data: tic | ||
} | ||
] | ||
data: tic, | ||
}, | ||
], | ||
}; | ||
@@ -29,0 +29,0 @@ } |
@@ -76,9 +76,9 @@ 'use strict'; | ||
var ms = new Array(time.length); | ||
var index = 0; | ||
for (var i = 0; i < ms.length; i++) { | ||
var size = scanIndex[i + 1] - scanIndex[i]; | ||
let ms = new Array(time.length); | ||
let index = 0; | ||
for (let i = 0; i < ms.length; i++) { | ||
let size = scanIndex[i + 1] - scanIndex[i]; | ||
ms[i] = [new Array(size), new Array(size)]; | ||
for (var j = 0; j < size; j++) { | ||
for (let j = 0; j < size; j++) { | ||
ms[i][0][j] = massValues[index]; | ||
@@ -95,3 +95,3 @@ ms[i][1][j] = intensityValues[index++]; | ||
dimension: 1, | ||
data: tic | ||
data: tic, | ||
}, | ||
@@ -101,5 +101,5 @@ { | ||
dimension: 2, | ||
data: ms | ||
} | ||
] | ||
data: ms, | ||
}, | ||
], | ||
}; | ||
@@ -106,0 +106,0 @@ } |
@@ -77,9 +77,9 @@ 'use strict'; | ||
var ms = new Array(time.length); | ||
var index = 0; | ||
for (var i = 0; i < ms.length; i++) { | ||
var size = scanIndex[i + 1] - scanIndex[i]; | ||
let ms = new Array(time.length); | ||
let index = 0; | ||
for (let i = 0; i < ms.length; i++) { | ||
let size = scanIndex[i + 1] - scanIndex[i]; | ||
ms[i] = [new Array(size), new Array(size)]; | ||
for (var j = 0; j < size; j++) { | ||
for (let j = 0; j < size; j++) { | ||
ms[i][0][j] = massValues[index]; | ||
@@ -96,3 +96,3 @@ ms[i][1][j] = intensityValues[index++]; | ||
dimension: 1, | ||
data: tic | ||
data: tic, | ||
}, | ||
@@ -102,5 +102,5 @@ { | ||
dimension: 2, | ||
data: ms | ||
} | ||
] | ||
data: ms, | ||
}, | ||
], | ||
}; | ||
@@ -107,0 +107,0 @@ } |
@@ -10,2 +10,3 @@ 'use strict'; | ||
const shimadzuGCMS = require('./shimadzuGCMS'); | ||
const advionGCMS = require('./advionGCMS'); | ||
const aiaTemplate = require('./aiaTemplate'); | ||
@@ -25,3 +26,5 @@ | ||
let instrument_mfr = reader.getDataVariableAsString('instrument_mfr'); | ||
let instrument_mfr = | ||
reader.dataVariableExists('instrument_mfr') && | ||
reader.getDataVariableAsString('instrument_mfr'); | ||
let dataset_origin = reader.attributeExists('dataset_origin'); | ||
@@ -45,2 +48,4 @@ let mass_values = reader.dataVariableExists('mass_values'); | ||
ans = brukerGCMS(reader); | ||
} else if (mass_values && instrument_mfr && instrument_mfr.match(/bruker/i)) { | ||
ans = brukerGCMS(reader); | ||
} else if ( | ||
@@ -52,2 +57,8 @@ mass_values && | ||
ans = shimadzuGCMS(reader); | ||
} else if ( | ||
mass_values && | ||
source_file_format && | ||
source_file_format.match(/advion/i) | ||
) { | ||
ans = advionGCMS(reader); | ||
} else if (detector_name && detector_name.match(/(dad|tic)/i)) { | ||
@@ -105,3 +116,3 @@ // diode array agilent HPLC | ||
function addMeta(globalAttributes) { | ||
var ans = {}; | ||
let ans = {}; | ||
for (const item of globalAttributes) { | ||
@@ -108,0 +119,0 @@ ans[item.name] = item.value; |
@@ -84,9 +84,9 @@ 'use strict'; | ||
var ms = new Array(time.length); | ||
var index = 0; | ||
for (var i = 0; i < ms.length; i++) { | ||
var size = scanIndex[i + 1] - scanIndex[i]; | ||
let ms = new Array(time.length); | ||
let index = 0; | ||
for (let i = 0; i < ms.length; i++) { | ||
let size = scanIndex[i + 1] - scanIndex[i]; | ||
ms[i] = [new Array(size), new Array(size)]; | ||
for (var j = 0; j < size; j++) { | ||
for (let j = 0; j < size; j++) { | ||
ms[i][0][j] = massValues[index]; | ||
@@ -103,3 +103,3 @@ ms[i][1][j] = intensityValues[index++]; | ||
dimension: 1, | ||
data: tic | ||
data: tic, | ||
}, | ||
@@ -109,5 +109,5 @@ { | ||
dimension: 2, | ||
data: ms | ||
} | ||
] | ||
data: ms, | ||
}, | ||
], | ||
}; | ||
@@ -114,0 +114,0 @@ } |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
40807
12
717
9
2
+ Added@types/utf8@2.1.6(transitive)
+ Addediobuffer@4.0.1(transitive)
+ Addednetcdfjs@1.0.0(transitive)
+ Addedutf8@3.0.0(transitive)
- Removediobuffer@3.2.0(transitive)
- Removednetcdfjs@0.7.0(transitive)
- Removedutf8@2.1.2(transitive)
Updatednetcdfjs@^1.0.0