New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@adntro/raw-dna-dtc-parser

Package Overview
Dependencies
Maintainers
4
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adntro/raw-dna-dtc-parser - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

6

build/src/utils/raw-line-parser.d.ts
import { Snp } from '../raw.models';
export declare function cleanGenotypeLine(line: string): string;
/**
* mapper['X'] = 23
mapper['Y'] = 24
mapper['XY'] = 25
mapper['MT'] = 26
*/
export declare function convertLine2Snp(line: string): Snp;

25

build/src/utils/raw-line-parser.js

@@ -9,2 +9,8 @@ "use strict";

exports.cleanGenotypeLine = cleanGenotypeLine;
/**
* mapper['X'] = 23
mapper['Y'] = 24
mapper['XY'] = 25
mapper['MT'] = 26
*/
function convertLine2Snp(line) {

@@ -15,11 +21,9 @@ if (('' + line).length > 60)

const chrNum = parseInt(chrStr, 10);
const chr = chrNum === 23
? 'X'
: chrNum === 24
? 'Y'
: chrNum === 25
? 'MT'
: !isNaN(chrNum) && chrNum > 0
? chrNum.toFixed(0)
: chrStr;
const chr = chrNum === 23 ? 'X'
: chrNum === 24 ? 'Y'
: chrNum === 25 ? 'XY'
: chrNum === 26 ? 'MT'
: !isNaN(chrNum) && chrNum > 0
? chrNum.toFixed(0)
: chrStr;
const position = parseInt(posStr, 10);

@@ -57,2 +61,5 @@ let warn = undefined;

}
else if (chr === 'Y' || chr === 'XY' || chr === 'MT') {
a2 = undefined;
}
return {

@@ -59,0 +66,0 @@ rsid,

{
"name": "@adntro/raw-dna-dtc-parser",
"version": "0.0.8",
"version": "0.0.9",
"description": "DNA file reader (in DTC formats) and parser",

@@ -5,0 +5,0 @@ "author": "Adntro Genetics SL",

Sorry, the diff of this file is not supported yet

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