@adntro/raw-dna-dtc-parser
Advanced tools
Comparing version 0.0.11 to 0.0.12
export * from './raw.errors'; | ||
export * from './raw.models'; | ||
export { convertLocalDtcFile } from './raw.converter'; | ||
export { RawFormatNormalizerTransform, EVENTS } from './raw.normalizer'; |
@@ -13,5 +13,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.EVENTS = exports.RawFormatNormalizerTransform = void 0; | ||
exports.EVENTS = exports.RawFormatNormalizerTransform = exports.convertLocalDtcFile = void 0; | ||
__exportStar(require("./raw.errors"), exports); | ||
__exportStar(require("./raw.models"), exports); | ||
var raw_converter_1 = require("./raw.converter"); | ||
Object.defineProperty(exports, "convertLocalDtcFile", { enumerable: true, get: function () { return raw_converter_1.convertLocalDtcFile; } }); | ||
var raw_normalizer_1 = require("./raw.normalizer"); | ||
@@ -18,0 +20,0 @@ Object.defineProperty(exports, "RawFormatNormalizerTransform", { enumerable: true, get: function () { return raw_normalizer_1.RawFormatNormalizerTransform; } }); |
@@ -17,2 +17,5 @@ /// <reference types="node" /> | ||
export declare function guessFormat(header: string): rawFormat; | ||
export interface RawFormatNormalizerTransformOptions extends TransformOptions { | ||
debug: boolean; | ||
} | ||
export declare class RawFormatNormalizerTransform extends Transform { | ||
@@ -22,2 +25,3 @@ genotypeStarted: boolean; | ||
format: rawFormat; | ||
debug: boolean; | ||
warnings: Set<string>; | ||
@@ -27,3 +31,3 @@ lineCount: number; | ||
chromosomes: Set<chr>; | ||
constructor(opts?: TransformOptions); | ||
constructor(opts?: RawFormatNormalizerTransformOptions); | ||
private log; | ||
@@ -30,0 +34,0 @@ private warn; |
@@ -49,2 +49,3 @@ "use strict"; | ||
this.format = 'other'; | ||
this.debug = false; | ||
this.warnings = new Set(); | ||
@@ -66,2 +67,4 @@ this.lineCount = 0; | ||
this.chromosomes = new Set(); | ||
if ((opts === null || opts === void 0 ? void 0 : opts.debug) === true) | ||
this.debug = true; | ||
this.on(exports.EVENTS.HEADER, header => { | ||
@@ -72,3 +75,4 @@ this.format = guessFormat(header); | ||
log(...msg) { | ||
console.log(...['DEBUG -> ', ...msg]); | ||
if (this.debug) | ||
console.log(...['DEBUG -> ', ...msg]); | ||
} | ||
@@ -75,0 +79,0 @@ warn(msg) { |
@@ -55,8 +55,14 @@ "use strict"; | ||
} | ||
if ('' + a1 === '0') { | ||
a1 = '-'; | ||
} | ||
const nocall = a1 === '-'; | ||
if (nocall) { | ||
if (chr === 'Y' || chr === 'XY' || chr === 'MT') { | ||
a2 = undefined; | ||
} | ||
else if (nocall) { | ||
a2 = '-'; | ||
} | ||
else if (chr === 'Y' || chr === 'XY' || chr === 'MT') { | ||
a2 = undefined; | ||
else if (a2 && a1 > a2) { | ||
[a1, a2] = [a2, a1]; | ||
} | ||
@@ -63,0 +69,0 @@ return { |
{ | ||
"name": "@adntro/raw-dna-dtc-parser", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "DNA file reader (in DTC formats) and parser", | ||
@@ -34,2 +34,3 @@ "author": "Adntro Genetics SL", | ||
"@types/node": "^14.11.2", | ||
"@types/split2": "^3.2.1", | ||
"c8": "^7.7.3", | ||
@@ -39,3 +40,6 @@ "gts": "^3.1.0", | ||
"typescript": "^4.0.3" | ||
}, | ||
"dependencies": { | ||
"split2": "^4.0.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
53694
30
907
1
7
1
+ Addedsplit2@^4.0.0
+ Addedsplit2@4.2.0(transitive)