Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nucleotide

Package Overview
Dependencies
Maintainers
2
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nucleotide - npm Package Compare versions

Comparing version 1.3.0 to 2.0.0

lib/index.js

18

package.json

@@ -11,7 +11,9 @@ {

"description": "Deal with nucleotides and molecular formula",
"main": "src/index.js",
"main": "lib/index.js",
"module": "src/index.js",
"files": [
"src"
"src",
"lib"
],
"homepage": "https://github.com/cheminfo/mass-tools/tree/master/packages/nucleotide#readme",
"homepage": "https://github.com/cheminfo/mass-tools/tree/main/packages/nucleotide#readme",
"keywords": [],

@@ -24,11 +26,11 @@ "license": "MIT",

},
"version": "1.3.0",
"version": "2.0.0",
"devDependencies": {
"mf-parser": "^1.5.0"
"mf-parser": "^2.0.0"
},
"dependencies": {
"chemical-groups": "^1.3.0",
"mf-utilities": "^1.5.0"
"chemical-groups": "^2.0.0",
"mf-utilities": "^2.0.0"
},
"gitHead": "ade929b07af4e2f0f8b3fe1aaf0df70c50f4b2db"
"gitHead": "c6ebfbd64c711f8839a02a43c5708e71a379885b"
}

@@ -1,5 +0,3 @@

'use strict';
import { generateFragments } from '../generateFragments';
const generateFragments = require('../generateFragments');
describe('addFiveTermBaseLoss', () => {

@@ -6,0 +4,0 @@ it('nucleotide to sequence of HODampDtmpDcmpH', () => {

@@ -1,5 +0,3 @@

'use strict';
import { generateFragments } from '../generateFragments';
const generateFragments = require('../generateFragments');
describe('addFiveTermBaseLoss', () => {

@@ -6,0 +4,0 @@ it('nucleotide to sequence of HODampDtmpDcmpH', () => {

@@ -1,5 +0,3 @@

'use strict';
import { baseLoss } from '..';
const { baseLoss } = require('..');
describe('baseLoss', () => {

@@ -6,0 +4,0 @@ it('Base loss of HAlaDampDtmpDcmpDcmpOH', () => {

@@ -1,5 +0,3 @@

'use strict';
import { baseLossExhaustive } from '../baseLossExhaustive';
const baseLossExhaustive = require('../baseLossExhaustive');
describe('test base loss', () => {

@@ -6,0 +4,0 @@ it('Base loss of HAlaDampDtmpDcmpDcmpOH', () => {

@@ -1,5 +0,3 @@

'use strict';
import { ensureUppercaseSequence } from '../ensureUppercaseSequence';
const ensureUppercaseSequence = require('../ensureUppercaseSequence');
describe('ensureUppercaseSequence', () => {

@@ -6,0 +4,0 @@ it('aattccgg', () => {

@@ -1,7 +0,5 @@

'use strict';
import { MF } from 'mf-parser';
const { MF } = require('mf-parser');
import { furanThreeTerm } from '..';
const { furanThreeTerm } = require('..');
describe('test nucleotide', () => {

@@ -8,0 +6,0 @@ it('remove base of three terminal of HDampDtmpDcmp', () => {

@@ -1,5 +0,3 @@

'use strict';
import { generateFragments } from '..';
const { generateFragments } = require('..');
describe('test generate internal fragments', () => {

@@ -6,0 +4,0 @@ it('nucleotide HODampDtmpDcmpDgmpDampH internal abw fragments', () => {

@@ -1,5 +0,3 @@

'use strict';
import { generateFragments } from '..';
const { generateFragments } = require('..');
describe('test generate fragments', () => {

@@ -6,0 +4,0 @@ it('nucleotide to sequence of HODampDtmpDcmpH', () => {

@@ -1,7 +0,5 @@

'use strict';
import { MF } from 'mf-parser';
const MF = require('mf-parser').MF;
import { sequenceToMF } from '../sequenceToMF.js';
const sequenceToMF = require('../sequenceToMF');
describe('sequenceToMF', () => {

@@ -8,0 +6,0 @@ it('emtpy string', () => {

@@ -1,6 +0,4 @@

'use strict';
import { furanThreeTerm } from './furanThreeTerm.js';
const furanThreeTerm = require('./furanThreeTerm');
function addFiveTerm(mfs, fiveTerm, i, options) {
export function addFiveTerm(mfs, fiveTerm, i, options) {
if (options.a) mfs.push(`${fiveTerm}O-1H-1$a${i}`); // neutral ok

@@ -13,3 +11,1 @@ if (options.ab && i > 1) mfs.push(`${furanThreeTerm(fiveTerm)}$a${i}-B`); // A minus base

}
module.exports = addFiveTerm;

@@ -1,6 +0,4 @@

'use strict';
import { baseLoss } from './baseLoss.js';
const baseLoss = require('./baseLoss');
function addFiveTermBaseLoss(mfs, fiveTerm, i, options) {
export function addFiveTermBaseLoss(mfs, fiveTerm, i, options) {
if (!options.abcdBaseLoss) return;

@@ -24,3 +22,1 @@ let loss = baseLoss(fiveTerm);

}
module.exports = addFiveTermBaseLoss;

@@ -1,8 +0,6 @@

'use strict';
import { furanThreeTerm } from './furanThreeTerm.js';
const furanThreeTerm = require('./furanThreeTerm');
// https://books.google.ch/books?id=B57e37bJjqAC&pg=PA172&lpg=PA172&dq=oligonucleotide+b+fragmentation&source=bl&ots=mRr29Pexx2&sig=1NUQcWV-wuj6o9q81my86AVoRto&hl=fr&sa=X&ved=2ahUKEwjI5M3yn-7fAhUJMewKHQR6Bcs4ChDoATADegQIBhAB#v=onepage&q=oligonucleotide%20b%20fragmentation&f=false
function addInternalTerm(mfs, internal, ter3, ter5, options = {}) {
export function addInternalTerm(mfs, internal, ter3, ter5, options = {}) {
if (options.aw) {

@@ -30,3 +28,1 @@ // without base loss

}
module.exports = addInternalTerm;

@@ -1,4 +0,2 @@

'use strict';
function addThreeTerm(mfs, threeTerm, i, options) {
export function addThreeTerm(mfs, threeTerm, i, options) {
if (options.w) mfs.push(`HO${threeTerm}$w${i}`); // neutral ok

@@ -10,3 +8,1 @@ if (options.x) mfs.push(`H-1${threeTerm}$x${i}`); // neutral ok

}
module.exports = addThreeTerm;

@@ -1,6 +0,4 @@

'use strict';
import { baseLoss } from './baseLoss.js';
const baseLoss = require('./baseLoss');
function addThreeTermBaseLoss(mfs, threeTerm, i, options) {
export function addThreeTermBaseLoss(mfs, threeTerm, i, options) {
if (!options.wxyzBaseLoss) return;

@@ -24,3 +22,1 @@ let loss = baseLoss(threeTerm);

}
module.exports = addThreeTermBaseLoss;

@@ -1,5 +0,3 @@

'use strict';
import { mfDiff } from 'mf-utilities';
const mfDiff = require('mf-utilities/src/mfDiff');
const mfLosses = {};

@@ -20,3 +18,3 @@ ['Amp', 'Tmp', 'Cmp', 'Gmp', 'Ump'].forEach((nucleotide) => {

function baseLoss(nucleotide) {
export function baseLoss(nucleotide) {
// any residue can loose a base

@@ -34,3 +32,1 @@ let results = [];

}
module.exports = baseLoss;

@@ -1,4 +0,2 @@

'use strict';
function baseLossExhaustive(nucleotide) {
export function baseLossExhaustive(nucleotide) {
// any residue can loose a base

@@ -31,3 +29,1 @@ let results = [];

}
module.exports = baseLossExhaustive;

@@ -1,3 +0,1 @@

'use strict';
/**

@@ -8,3 +6,3 @@ * Ensure that the sequence is in uppercase taking into account possible modifications

function ensureUppercaseSequence(sequence) {
export function ensureUppercaseSequence(sequence) {
let parenthesisCounter = 0;

@@ -35,3 +33,1 @@ let parts = [];

}
module.exports = ensureUppercaseSequence;

@@ -1,4 +0,2 @@

'use strict';
function furanThreeTerm(nucleotide) {
export function furanThreeTerm(nucleotide) {
// last residue should become a furan

@@ -19,3 +17,1 @@ let parts = nucleotide

}
module.exports = furanThreeTerm;

@@ -1,10 +0,8 @@

'use strict';
import { addFiveTerm } from './addFiveTerm';
import { addFiveTermBaseLoss } from './addFiveTermBaseLoss';
import { addInternalTerm } from './addInternalTerm';
import { addThreeTerm } from './addThreeTerm';
import { addThreeTermBaseLoss } from './addThreeTermBaseLoss';
const addFiveTerm = require('./addFiveTerm');
const addFiveTermBaseLoss = require('./addFiveTermBaseLoss');
const addInternalTerm = require('./addInternalTerm');
const addThreeTerm = require('./addThreeTerm');
const addThreeTermBaseLoss = require('./addThreeTermBaseLoss');
module.exports = function generateFragments(mf, options) {
export function generateFragments(mf, options) {
if (options === undefined) {

@@ -75,2 +73,2 @@ options = {

return mfs;
};
}

@@ -1,8 +0,4 @@

'use strict';
module.exports = {
sequenceToMF: require('./sequenceToMF'),
generateFragments: require('./generateFragments'),
furanThreeTerm: require('./furanThreeTerm'),
baseLoss: require('./baseLoss'),
};
export * from './sequenceToMF.js';
export * from './generateFragments.js';
export * from './furanThreeTerm.js';
export * from './baseLoss.js';

@@ -1,7 +0,5 @@

'use strict';
import { groups } from 'chemical-groups';
const { groups } = require('chemical-groups');
import { ensureUppercaseSequence } from './ensureUppercaseSequence';
const ensureUppercaseSequence = require('./ensureUppercaseSequence');
/**

@@ -16,3 +14,3 @@ * Convert a nucleic sequence to a MF

function sequenceToMF(sequence, options = {}) {
export function sequenceToMF(sequence, options = {}) {
let fivePrimeTerminal = 'HO';

@@ -129,4 +127,2 @@ let threePrimeTerminal = 'H';

module.exports = sequenceToMF;
const complementary = {

@@ -133,0 +129,0 @@ A: 'T',

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc