Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
lpatiny committed Apr 29, 2024
1 parent 4ccefe2 commit 36b2d7f
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 39 deletions.
5 changes: 3 additions & 2 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
extends: cheminfo
parserOptions:
sourceType: module
env:
jest: true
node: true
46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,40 +45,40 @@
},
"homepage": "https://github.com/cheminfo/chromatography#readme",
"devDependencies": {
"@babel/plugin-transform-modules-commonjs": "^7.16.8",
"@types/jest": "^27.4.1",
"cheminfo-build": "^1.1.11",
"convert-to-jcamp": "^5.2.0",
"eslint": "^8.10.0",
"eslint-config-cheminfo": "^7.3.0",
"@babel/plugin-transform-modules-commonjs": "^7.24.1",
"@types/jest": "^29.5.12",
"cheminfo-build": "^1.2.0",
"convert-to-jcamp": "^5.4.10",
"eslint": "^8.57.0",
"eslint-config-cheminfo": "^9.2.0",
"esm": "^3.2.25",
"jest": "^27.5.1",
"jest": "^29.7.0",
"jest-matcher-deep-close-to": "^3.0.2",
"prettier": "^2.5.1",
"rollup": "^2.70.0",
"spectrum-generator": "^8.0.0",
"typescript": "^4.6.2"
"prettier": "^3.2.5",
"rollup": "^4.17.1",
"spectrum-generator": "^8.0.11",
"typescript": "^5.4.5"
},
"dependencies": {
"binary-search": "^1.3.6",
"is-any-array": "^2.0.0",
"isotopic-distribution": "^1.4.9",
"jcampconverter": "^8.2.5",
"mf-generator": "^1.3.20",
"mf-parser": "^1.4.5",
"ml-airpls": "^1.0.0",
"is-any-array": "^2.0.1",
"isotopic-distribution": "^3.1.2",
"jcampconverter": "^9.6.4",
"mf-generator": "^3.2.0",
"mf-parser": "^3.1.0",
"ml-airpls": "^1.0.3",
"ml-array-max": "^1.2.4",
"ml-array-mean": "^1.1.6",
"ml-array-median": "^1.1.6",
"ml-array-sum": "^1.1.6",
"ml-gsd": "^10.2.0",
"ml-matrix": "^6.9.0",
"ml-gsd": "^12.1.6",
"ml-matrix": "^6.11.0",
"ml-ngmca": "^1.0.0",
"ml-pca": "^4.0.2",
"ml-regression-polynomial": "^2.2.0",
"ml-spectra-processing": "^11.0.0",
"ml-pca": "^4.1.1",
"ml-regression-polynomial": "^3.0.0",
"ml-spectra-processing": "^14.3.0",
"mzdata": "^2.3.1",
"netcdf-gcms": "^1.4.0",
"xy-parser": "^5.0.1"
"xy-parser": "^5.0.5"
}
}
File renamed without changes.
4 changes: 2 additions & 2 deletions src/ms/calculateForMF.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import IsotopicDistribution from 'isotopic-distribution';
import generateMFs from 'mf-generator';
import { IsotopicDistribution } from 'isotopic-distribution';
import { generateMFs } from 'mf-generator';
import { xyObjectSlotX } from 'ml-spectra-processing';
/**
* Calculate tic for specific molecular formula and ionizations
Expand Down
12 changes: 8 additions & 4 deletions src/ms/deconvolution.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ export function deconvolution(chromatogram, options = {}) {
scale: maxByRow.map((e) => 1 / e),
});

return Object.assign(
{ matrix, times, mzAxis, rank },
{ profile: result.A, component: result.S },
);
return {
matrix,
times,
mzAxis,
rank,
profile: result.A,
component: result.S,
};
}
4 changes: 2 additions & 2 deletions src/scaleAlignment.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import Regression from 'ml-regression-polynomial';
import { PolynomialRegression } from 'ml-regression-polynomial';

export function scaleAlignment(reference, sample, options = {}) {
const { computeQuality = false, polynomialDegree = 3 } = options;
let referenceTime = reference.map((val) => val.retentionTime);
let sampleTime = sample.map((val) => val.retentionTime);

const regression = new Regression(
const regression = new PolynomialRegression(
sampleTime,
referenceTime,
polynomialDegree,
Expand Down
4 changes: 2 additions & 2 deletions src/spectraComparison.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const defaultOptions = {
};

export function spectraComparison(chrom1, chrom2, options = {}) {
options = Object.assign({}, defaultOptions, options);
options = { ...defaultOptions, ...options };

// peak picking
let reference = preprocessing(chrom1, options);
Expand Down Expand Up @@ -107,6 +107,6 @@ export function spectraComparison(chrom1, chrom2, options = {}) {
return {
peaksFirst: peaksChrom1,
peaksSecond: peaksChrom2,
peaksSimilarity: peaksSimilarity,
peaksSimilarity,
};
}
6 changes: 2 additions & 4 deletions src/vectorify.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ export function vectorify(ranges, options = {}) {
};
for (let j = 0; j < len; ++j) {
vector[i].y[j] =
Math.pow(ranges[i].ms.x[j], massPower) *
Math.pow(ranges[i].ms.y[j], intPower);
ranges[i].ms.x[j] ** massPower * ranges[i].ms.y[j] ** intPower;
}

vector[i] = massFilter(vector[i], filterOptions);
Expand All @@ -36,8 +35,7 @@ export function vectorify(ranges, options = {}) {
};
for (let j = 0; j < len; ++j) {
vector[i].y[j] =
Math.pow(ranges[i].ms.x[j], massPower) *
Math.pow(ranges[i].ms.y[j], intPower);
ranges[i].ms.x[j] ** massPower * ranges[i].ms.y[j] ** intPower;
}
}
}
Expand Down

0 comments on commit 36b2d7f

Please sign in to comment.