diff --git a/.ncurc b/.ncurc new file mode 100644 index 0000000..5f9d7f9 --- /dev/null +++ b/.ncurc @@ -0,0 +1,5 @@ +{ + "reject": [ + "ml-gsd", + ] +} \ No newline at end of file diff --git a/package.json b/package.json index 0758f54..71b0852 100644 --- a/package.json +++ b/package.json @@ -48,38 +48,39 @@ }, "homepage": "https://github.com/cheminfo/chromatography#readme", "devDependencies": { - "@babel/plugin-transform-modules-commonjs": "^7.15.4", - "@types/jest": "^27.0.1", + "@babel/plugin-transform-modules-commonjs": "^7.16.8", + "@types/jest": "^27.4.0", "cheminfo-build": "^1.1.11", - "eslint": "^7.32.0", - "eslint-config-cheminfo": "^5.4.0", + "convert-to-jcamp": "^5.1.1", + "eslint": "^8.6.0", + "eslint-config-cheminfo": "^7.2.1", "esm": "^3.2.25", - "jest": "^27.1.0", - "jest-matcher-deep-close-to": "^2.0.1", - "prettier": "^2.3.2", - "rollup": "^2.56.3", - "spectrum-generator": "^5.1.0", - "typescript": "^4.4.2" + "jest": "^27.4.7", + "jest-matcher-deep-close-to": "^3.0.2", + "prettier": "^2.5.1", + "rollup": "^2.63.0", + "spectrum-generator": "^6.0.2", + "typescript": "^4.5.4" }, "dependencies": { "binary-search": "^1.3.6", - "is-any-array": "^1.0.1", - "isotopic-distribution": "^1.2.1", - "jcampconverter": "^8.1.5", - "mf-generator": "^1.3.6", - "mf-parser": "^1.3.3", + "is-any-array": "^2.0.0", + "isotopic-distribution": "^1.4.0", + "jcampconverter": "^8.2.4", + "mf-generator": "^1.3.8", + "mf-parser": "^1.4.0", "ml-array-max": "^1.2.3", "ml-array-mean": "^1.1.5", "ml-array-median": "^1.1.5", "ml-array-sum": "^1.1.5", - "ml-gsd": "^6.7.0", - "ml-matrix": "^6.8.0", + "ml-gsd": "^6.9.2", + "ml-matrix": "^6.8.2", "ml-ngmca": "^1.0.0", "ml-pca": "^4.0.2", "ml-regression-polynomial": "^2.2.0", - "ml-spectra-processing": "^6.8.0", + "ml-spectra-processing": "^8.0.3", "mzdata": "^2.3.1", "netcdf-gcms": "^1.4.0", - "xy-parser": "^3.2.0" + "xy-parser": "^4.0.1" } } diff --git a/src/Chromatogram.js b/src/Chromatogram.js index 28d6c7d..f0bb487 100644 --- a/src/Chromatogram.js +++ b/src/Chromatogram.js @@ -1,4 +1,4 @@ -import isAnyArray from 'is-any-array'; +import { isAnyArray } from 'is-any-array'; import { xFindClosestIndex } from 'ml-spectra-processing'; import { meanFilter } from './filter/meanFilter'; diff --git a/src/peaks/__tests__/appendMass.test.js b/src/peaks/__tests__/appendMass.test.js index c948230..55c3d93 100644 --- a/src/peaks/__tests__/appendMass.test.js +++ b/src/peaks/__tests__/appendMass.test.js @@ -89,7 +89,10 @@ describe('appendMass', () => { let result = appendMass(simple4, peaks, { mergeThreshold: 2, })[0]; - expect(Array.from(result.ms.x)).toBeDeepCloseTo([102, 202, 302], 1); + expect(Array.from(result.ms.x)).toBeDeepCloseTo( + [102.05, 202.03, 302.02], + 1, + ); expect(Array.from(result.ms.y)).toStrictEqual([36, 66, 96]); }); }); diff --git a/src/peaks/appendMass.js b/src/peaks/appendMass.js index d4843b7..c1553f5 100644 --- a/src/peaks/appendMass.js +++ b/src/peaks/appendMass.js @@ -5,7 +5,7 @@ import { merge } from '../ms/merge'; * @param {Chromatogram} chromatogram * @param {Array} peaks - Array of range {from:, to:} * @param {object} [options={}] - Options for the integral filtering - * @param {number} [options.mergeThreshold=0.3] - Peaks that are under this value (in Da) will be merged + * @param {number} [options.mergeThreshold=0.3] - Peaks that are closer than this value (in Da) will be merged * @param {number} [options.seriesName='ms'] - Maximum number of peaks for each mass spectra (when is Number.MAX_VALUE there's no filter) * @return {Array} - A copy of ranges with ms appended */ diff --git a/src/seriesFromArray.js b/src/seriesFromArray.js index ff78a8b..f825930 100644 --- a/src/seriesFromArray.js +++ b/src/seriesFromArray.js @@ -1,4 +1,4 @@ -import isAnyArray from 'is-any-array'; +import { isAnyArray } from 'is-any-array'; import { Series1D } from './Series1D'; import { Series2D } from './Series2D';