@adntro/raw-dna-dtc-parser
Advanced tools
Comparing version 0.0.8 to 0.0.9
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; |
@@ -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
44939
785