Browse Source

first commit

Thomas 3 years ago
commit
d748d1a3c7
6 changed files with 560 additions and 0 deletions
  1. 0 0
      README.md
  2. 157 0
      index.js
  3. 157 0
      index.ts
  4. 21 0
      package.json
  5. 101 0
      tsconfig.json
  6. 124 0
      yarn.lock

+ 0 - 0
README.md


+ 157 - 0
index.js

@@ -0,0 +1,157 @@
+"use strict";
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+    return new (P || (P = Promise))(function (resolve, reject) {
+        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+        step((generator = generator.apply(thisArg, _arguments || [])).next());
+    });
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+    return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const child_process_1 = require("child_process");
+const gbffparser_1 = require("gbffparser");
+const fs_1 = __importDefault(require("fs"));
+const os_1 = __importDefault(require("os"));
+const path_1 = __importDefault(require("path"));
+const async_exec = (prog, args, onData) => {
+    return new Promise((resolve, reject) => {
+        const child = (0, child_process_1.spawn)(prog, args, { shell: true });
+        child.stdout.on('data', data => onData(data.toString().trim()));
+        child.stderr.on('data', data => console.log(data.toString().trim()));
+        child.on('error', err => reject(err));
+        child.on('exit', code => resolve(code));
+    });
+};
+const openSam = (filePaths, restraintTo, count) => __awaiter(void 0, void 0, void 0, function* () {
+    let accum = '';
+    let jsonLines = [];
+    filePaths = Array.isArray(filePaths) ? filePaths : [filePaths];
+    for (let filePath of filePaths) {
+        let args = ['view'];
+        if (filePath.match(/\.sam$/)) {
+            if (restraintTo) {
+                if (!fs_1.default.existsSync(filePath.split(/\.sam$/)[0] + '.bam')) {
+                    const tmpBam = path_1.default.join(os_1.default.tmpdir(), Math.random() + '.bam');
+                    yield async_exec('sambamba', ['view', '-S', filePath, '-f', 'bam', '>', tmpBam], () => { });
+                    filePath = filePath.split(/\.sam$/)[0] + '.bam';
+                    yield async_exec('sambamba', ['sort', tmpBam, '-o', filePath], () => { });
+                    yield fs_1.default.promises.unlink(tmpBam);
+                }
+                else {
+                    filePath = filePath.split(/\.sam$/)[0] + '.bam';
+                }
+            }
+            else {
+                args.push('-S');
+            }
+        }
+        if (!count) {
+            args = [...args, '-f', 'json'];
+        }
+        else {
+            if (restraintTo) {
+                args.push('-c');
+            }
+        }
+        args.push(filePath);
+        if (restraintTo)
+            args.push(restraintTo);
+        console.log(['sambamba', ...args].join(' '));
+        yield async_exec('sambamba', args, (m) => {
+            accum += m;
+            accum = accum.replace('}{', '}\n{');
+            if (accum.match('\n')) {
+                accum.split('\n').map((e, i, a) => {
+                    if (i !== a.length - 1) {
+                        try {
+                            jsonLines.push(JSON.parse(e));
+                        }
+                        catch (error) {
+                            console.log(error);
+                        }
+                    }
+                    else {
+                        accum = e;
+                    }
+                });
+            }
+        });
+        if (accum !== '') {
+            accum = accum.replace('}{', '}\n{');
+            accum.split('\n').map((e, i, a) => {
+                try {
+                    jsonLines.push(JSON.parse(e));
+                }
+                catch (error) {
+                    console.log(error);
+                }
+            });
+        }
+    }
+    return jsonLines;
+});
+(() => __awaiter(void 0, void 0, void 0, function* () {
+    // await asyncBwaMem('/home/thomas/NGS/ref/ncbi/RNA/human_NM.fa', 
+    // ['/Turbine-pool/LAL-T_RNAseq/fastq_fastp/58_MAS/R1.fq.gz','/Turbine-pool/LAL-T_RNAseq/fastq_fastp/58_MAS/R2.fq.gz'],
+    // 'TEST', 'TEST', 'test/', console.log)
+    const symbol = 'MYC';
+    const LRGPath = '/home/thomas/NGS/ref/ncbi/LRG_RefSeqGene';
+    const tablePath = '/home/thomas/NGS/ref/ncbi/GCF_000001405.39_GRCh38.p13_feature_table.txt';
+    const rnaDBPath = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map(n => '/home/thomas/NGS/ref/ncbi/RNA/human.' + n + '.rna.gbff');
+    const geneDBPath = [1, 2, 3, 4, 5, 6, 7].map(n => '/home/thomas/NGS/ref/ncbi/GENES/refseqgene.' + n + '.genomic.gbff');
+    const geneInfo = yield (0, gbffparser_1.getSymbol)(symbol, LRGPath, tablePath, geneDBPath, rnaDBPath);
+    yield fs_1.default.promises.writeFile('test/geneInfo.json', JSON.stringify(geneInfo.filter((entry) => entry.feature === 'mRNA'), null, 4));
+    const transcripts = geneInfo.filter((entry) => entry.feature === 'mRNA')
+        .map((entry) => (Object.assign(Object.assign({}, entry), { sequence: entry.data.sequence, data: entry.data.features.filter((feature) => feature.type === 'exon') })))
+        .map((entry) => ({
+        accession: entry.product_accession,
+        genomic_accession: entry.genomic_accession,
+        start: entry.start,
+        end: entry.end,
+        sequence: entry.sequence,
+        exons: [...entry.data.map((d) => ({ start: d.start, end: d.end }))]
+    }))
+        .map((entry) => (Object.assign(Object.assign({}, entry), { exons: entry.exons.map((exon) => (Object.assign(Object.assign({}, exon), { sequence: entry.sequence.substring(exon.start - 1, exon.end) }))) })));
+    yield fs_1.default.promises.writeFile('test/sub.json', JSON.stringify(transcripts, null, 4));
+    for (let index = 0; index < transcripts.length; index++) {
+        const transcript = transcripts[index];
+        transcripts[index].count = {
+            all: yield openSam('test/bwa_mem_properly_on_human_NM.sorted.bam', transcript.accession, true),
+            splitters: yield openSam('test/bwa_mem_splitters_on_human_NM.sam', transcript.accession, true),
+            discordants: yield openSam('test/bwa_mem_discordants_on_human_NM.sam', transcript.accession, true),
+        };
+        const samJSON = yield openSam([
+            'test/bwa_mem_splitters_on_human_NM.sam',
+            'test/bwa_mem_discordants_on_human_NM.sam'
+        ], transcript.accession);
+        const byRead = {};
+        samJSON.map((entry) => ({
+            qname: entry.qname.split('_')[0],
+            pos: entry.pos,
+            exon: transcript.exons.flatMap((exon, i) => (exon.start <= entry.pos && exon.end >= entry.pos) ? i + 1 : [])[0]
+        }))
+            .map((entry) => {
+            if (typeof byRead[entry.qname] === 'undefined')
+                byRead[entry.qname] = [];
+            byRead[entry.qname] = [...new Set([...byRead[entry.qname], entry.exon])].sort((a, b) => a - b);
+        });
+        const byAltern = {};
+        Object.keys(byRead).map(qname => {
+            const bridges = byRead[qname].flatMap((e, i) => byRead[qname]
+                .flatMap((ee, ii) => i === ii || i >= ii ? [] : e + '-' + ee));
+            for (const bridge of bridges) {
+                if (typeof byAltern[bridge] === 'undefined')
+                    byAltern[bridge] = [];
+                byAltern[bridge].push(qname);
+            }
+        });
+        transcripts[index].altTranscripts = Object.keys(byAltern)
+            .map(bridge => ({ bridge, reads: byAltern[bridge] }))
+            .sort((a, b) => b.reads.length - a.reads.length);
+        yield fs_1.default.promises.writeFile('test/altTranscripts-' + transcript.accession + '.json', JSON.stringify(transcripts[index], null, 4));
+    }
+}))();

+ 157 - 0
index.ts

@@ -0,0 +1,157 @@
+import { spawn } from 'child_process';
+import { getSymbol } from "gbffparser"
+import { asyncBwaMem, makeReference } from 'aligner'
+import fs from 'fs'
+import os from 'os'
+import path from 'path';
+
+const async_exec = (prog: string, args: string[], onData: Function) => {
+    return new Promise((resolve, reject) => {
+        const child = spawn(prog, args, {shell: true})
+
+        child.stdout.on('data', data => onData(data.toString().trim()))
+        child.stderr.on('data', data => console.log(data.toString().trim()))
+
+        child.on('error', err => reject(err))
+        child.on('exit', code => resolve(code))
+    })
+}
+
+const openSam = async (
+    filePaths: string | string[],
+    restraintTo ?: string,
+    count?: boolean
+) => {
+    let accum = ''
+    let jsonLines: any[] = []
+    filePaths = Array.isArray(filePaths) ? filePaths : [filePaths]
+    for (let filePath of filePaths) {
+        let args = ['view']
+        if (filePath.match(/\.sam$/)) {
+            if(restraintTo) {
+                if(!fs.existsSync(filePath.split(/\.sam$/)[0] + '.bam')) {
+                    const tmpBam = path.join(os.tmpdir(), Math.random() + '.bam')
+                    await async_exec('sambamba', ['view', '-S', filePath, '-f', 'bam', '>', tmpBam], () => {})
+                    filePath = filePath.split(/\.sam$/)[0] + '.bam'
+                    await async_exec('sambamba', ['sort', tmpBam, '-o', filePath], () => {})
+                    await fs.promises.unlink(tmpBam)
+                } else {
+                    filePath = filePath.split(/\.sam$/)[0] + '.bam'
+                }
+            } else {
+                args.push('-S')
+            }
+        }
+
+        if(!count) {
+            args = [...args, '-f', 'json']
+        } else {
+            if(restraintTo) {
+                args.push('-c')
+            }
+        }
+        args.push(filePath)
+        if(restraintTo) args.push(restraintTo)
+        console.log(['sambamba', ...args].join(' '));
+        
+        await async_exec('sambamba', args, (m: string) => {
+            accum+=m
+            accum = accum.replace('}{','}\n{')
+            if(accum.match('\n')) {
+                accum.split('\n').map((e,i,a) => {
+                    if (i !== a.length -1) {
+                        try {
+                            jsonLines.push(JSON.parse(e))
+                        } catch (error) {
+                            console.log(error);
+                        }
+                    } else {
+                        accum = e
+                    }
+                })
+            }
+        })
+        if(accum !== '') {
+            accum = accum.replace('}{','}\n{')
+            accum.split('\n').map((e,i,a) => {
+                try {
+                    jsonLines.push(JSON.parse(e))
+                } catch (error) {
+                    console.log(error);
+                }
+            })
+        }
+    }
+    return jsonLines
+}
+
+(async()=>{
+    // await asyncBwaMem('/home/thomas/NGS/ref/ncbi/RNA/human_NM.fa', 
+    // ['/Turbine-pool/LAL-T_RNAseq/fastq_fastp/58_MAS/R1.fq.gz','/Turbine-pool/LAL-T_RNAseq/fastq_fastp/58_MAS/R2.fq.gz'],
+    // 'TEST', 'TEST', 'test/', console.log)
+    
+    const symbol = 'MYC'
+
+    const LRGPath = '/home/thomas/NGS/ref/ncbi/LRG_RefSeqGene'
+    const tablePath = '/home/thomas/NGS/ref/ncbi/GCF_000001405.39_GRCh38.p13_feature_table.txt'
+
+    const rnaDBPath  = [1,2,3,4,5,6,7,8,9,10].map(n => '/home/thomas/NGS/ref/ncbi/RNA/human.' + n + '.rna.gbff')
+    const geneDBPath = [1,2,3,4,5,6,7].map(n => '/home/thomas/NGS/ref/ncbi/GENES/refseqgene.' + n + '.genomic.gbff')
+    
+    const geneInfo = await getSymbol(symbol, LRGPath, tablePath, geneDBPath, rnaDBPath)
+    await fs.promises.writeFile('test/geneInfo.json', JSON.stringify(geneInfo.filter((entry:any) => entry.feature === 'mRNA'), null, 4))
+    const transcripts = geneInfo.filter((entry:any) => entry.feature === 'mRNA')
+    .map((entry:any) => ({...entry, sequence: entry.data.sequence, data:entry.data.features.filter((feature:any) => feature.type === 'exon')}))
+    .map((entry:any) => ({
+        accession: entry.product_accession, 
+        genomic_accession: entry.genomic_accession, 
+        start: entry.start,
+        end: entry.end,
+        sequence: entry.sequence, 
+        exons: [...entry.data.map((d:any) => ({start: d.start, end: d.end}))]
+    }))
+    .map((entry:any) => ({...entry, exons: entry.exons.map((exon:any) => ({...exon, sequence: entry.sequence.substring(exon.start-1,exon.end)}))}))
+    await fs.promises.writeFile('test/sub.json', JSON.stringify(transcripts, null, 4))
+    
+    for (let index = 0; index < transcripts.length; index++) {
+        const transcript = transcripts[index]
+        
+        transcripts[index].count = {
+            all        : await openSam('test/bwa_mem_properly_on_human_NM.sorted.bam', transcript.accession, true),
+            splitters  : await openSam('test/bwa_mem_splitters_on_human_NM.sam', transcript.accession, true),
+            discordants: await openSam('test/bwa_mem_discordants_on_human_NM.sam', transcript.accession, true),
+        }
+
+        const samJSON = await openSam([
+            'test/bwa_mem_splitters_on_human_NM.sam', 
+            'test/bwa_mem_discordants_on_human_NM.sam'],
+            transcript.accession)
+
+        const byRead = {} as {[key:string]: number[]}
+        samJSON.map((entry:any) => ({
+            qname: entry.qname.split('_')[0],
+            pos: entry.pos,
+            exon: transcript.exons.flatMap((exon:any, i:any) => (exon.start <= entry.pos && exon.end >= entry.pos) ? i + 1 : [])[0]
+        }))
+        .map((entry:any) => {
+            if(typeof byRead[entry.qname] === 'undefined') byRead[entry.qname] = []
+            byRead[entry.qname] = [...new Set([...byRead[entry.qname], entry.exon])].sort((a,b) => a - b)
+        })
+
+        const byAltern = {} as {[key:string]: string[]}
+        Object.keys(byRead).map(qname => {
+            const bridges = byRead[qname].flatMap((e,i) => byRead[qname]
+            .flatMap((ee,ii) => i === ii || i >= ii ? []: e + '-' + ee))
+            for (const bridge of bridges) {
+                if(typeof byAltern[bridge] === 'undefined') byAltern[bridge] = []
+                byAltern[bridge].push(qname)
+            }
+        })
+
+        transcripts[index].altTranscripts = Object.keys(byAltern)
+        .map(bridge => ({bridge, reads: byAltern[bridge]}))
+        .sort((a,b) => b.reads.length - a.reads.length)
+
+        await fs.promises.writeFile('test/altTranscripts-' + transcript.accession + '.json', JSON.stringify(transcripts[index], null, 4))
+    }    
+})()

+ 21 - 0
package.json

@@ -0,0 +1,21 @@
+{
+  "name": "alttranscripts",
+  "version": "1.0.0",
+  "description": "",
+  "main": "index.js",
+  "scripts": {
+    "build": "tsc",
+    "test": "echo \"Error: no test specified\" && exit 1"
+  },
+  "keywords": [],
+  "author": "",
+  "license": "ISC",
+  "devDependencies": {
+    "@types/node": "^17.0.21",
+    "typescript": "^4.6.2"
+  },
+  "dependencies": {
+    "aligner": "http://git.t0m4.fr/Thomas/aligner.git",
+    "gbffparser": "http://git.t0m4.fr/Thomas/gbffParser.git"
+  }
+}

+ 101 - 0
tsconfig.json

@@ -0,0 +1,101 @@
+{
+  "compilerOptions": {
+    /* Visit https://aka.ms/tsconfig.json to read more about this file */
+
+    /* Projects */
+    // "incremental": true,                              /* Enable incremental compilation */
+    // "composite": true,                                /* Enable constraints that allow a TypeScript project to be used with project references. */
+    // "tsBuildInfoFile": "./",                          /* Specify the folder for .tsbuildinfo incremental compilation files. */
+    // "disableSourceOfProjectReferenceRedirect": true,  /* Disable preferring source files instead of declaration files when referencing composite projects */
+    // "disableSolutionSearching": true,                 /* Opt a project out of multi-project reference checking when editing. */
+    // "disableReferencedProjectLoad": true,             /* Reduce the number of projects loaded automatically by TypeScript. */
+
+    /* Language and Environment */
+    "target": "es2016",                                  /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
+    // "lib": [],                                        /* Specify a set of bundled library declaration files that describe the target runtime environment. */
+    // "jsx": "preserve",                                /* Specify what JSX code is generated. */
+    // "experimentalDecorators": true,                   /* Enable experimental support for TC39 stage 2 draft decorators. */
+    // "emitDecoratorMetadata": true,                    /* Emit design-type metadata for decorated declarations in source files. */
+    // "jsxFactory": "",                                 /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */
+    // "jsxFragmentFactory": "",                         /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
+    // "jsxImportSource": "",                            /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */
+    // "reactNamespace": "",                             /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */
+    // "noLib": true,                                    /* Disable including any library files, including the default lib.d.ts. */
+    // "useDefineForClassFields": true,                  /* Emit ECMAScript-standard-compliant class fields. */
+
+    /* Modules */
+    "module": "commonjs",                                /* Specify what module code is generated. */
+    // "rootDir": "./",                                  /* Specify the root folder within your source files. */
+    // "moduleResolution": "node",                       /* Specify how TypeScript looks up a file from a given module specifier. */
+    // "baseUrl": "./",                                  /* Specify the base directory to resolve non-relative module names. */
+    // "paths": {},                                      /* Specify a set of entries that re-map imports to additional lookup locations. */
+    // "rootDirs": [],                                   /* Allow multiple folders to be treated as one when resolving modules. */
+    // "typeRoots": [],                                  /* Specify multiple folders that act like `./node_modules/@types`. */
+    // "types": [],                                      /* Specify type package names to be included without being referenced in a source file. */
+    // "allowUmdGlobalAccess": true,                     /* Allow accessing UMD globals from modules. */
+    // "resolveJsonModule": true,                        /* Enable importing .json files */
+    // "noResolve": true,                                /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */
+
+    /* JavaScript Support */
+    // "allowJs": true,                                  /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */
+    // "checkJs": true,                                  /* Enable error reporting in type-checked JavaScript files. */
+    // "maxNodeModuleJsDepth": 1,                        /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */
+
+    /* Emit */
+    // "declaration": true,                              /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
+    // "declarationMap": true,                           /* Create sourcemaps for d.ts files. */
+    // "emitDeclarationOnly": true,                      /* Only output d.ts files and not JavaScript files. */
+    // "sourceMap": true,                                /* Create source map files for emitted JavaScript files. */
+    // "outFile": "./",                                  /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
+    // "outDir": "./",                                   /* Specify an output folder for all emitted files. */
+    // "removeComments": true,                           /* Disable emitting comments. */
+    // "noEmit": true,                                   /* Disable emitting files from a compilation. */
+    // "importHelpers": true,                            /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
+    // "importsNotUsedAsValues": "remove",               /* Specify emit/checking behavior for imports that are only used for types */
+    // "downlevelIteration": true,                       /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
+    // "sourceRoot": "",                                 /* Specify the root path for debuggers to find the reference source code. */
+    // "mapRoot": "",                                    /* Specify the location where debugger should locate map files instead of generated locations. */
+    // "inlineSourceMap": true,                          /* Include sourcemap files inside the emitted JavaScript. */
+    // "inlineSources": true,                            /* Include source code in the sourcemaps inside the emitted JavaScript. */
+    // "emitBOM": true,                                  /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
+    // "newLine": "crlf",                                /* Set the newline character for emitting files. */
+    // "stripInternal": true,                            /* Disable emitting declarations that have `@internal` in their JSDoc comments. */
+    // "noEmitHelpers": true,                            /* Disable generating custom helper functions like `__extends` in compiled output. */
+    // "noEmitOnError": true,                            /* Disable emitting files if any type checking errors are reported. */
+    // "preserveConstEnums": true,                       /* Disable erasing `const enum` declarations in generated code. */
+    // "declarationDir": "./",                           /* Specify the output directory for generated declaration files. */
+    // "preserveValueImports": true,                     /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
+
+    /* Interop Constraints */
+    // "isolatedModules": true,                          /* Ensure that each file can be safely transpiled without relying on other imports. */
+    // "allowSyntheticDefaultImports": true,             /* Allow 'import x from y' when a module doesn't have a default export. */
+    "esModuleInterop": true,                             /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */
+    // "preserveSymlinks": true,                         /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
+    "forceConsistentCasingInFileNames": true,            /* Ensure that casing is correct in imports. */
+
+    /* Type Checking */
+    "strict": true,                                      /* Enable all strict type-checking options. */
+    // "noImplicitAny": true,                            /* Enable error reporting for expressions and declarations with an implied `any` type.. */
+    // "strictNullChecks": true,                         /* When type checking, take into account `null` and `undefined`. */
+    // "strictFunctionTypes": true,                      /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
+    // "strictBindCallApply": true,                      /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */
+    // "strictPropertyInitialization": true,             /* Check for class properties that are declared but not set in the constructor. */
+    // "noImplicitThis": true,                           /* Enable error reporting when `this` is given the type `any`. */
+    // "useUnknownInCatchVariables": true,               /* Type catch clause variables as 'unknown' instead of 'any'. */
+    // "alwaysStrict": true,                             /* Ensure 'use strict' is always emitted. */
+    // "noUnusedLocals": true,                           /* Enable error reporting when a local variables aren't read. */
+    // "noUnusedParameters": true,                       /* Raise an error when a function parameter isn't read */
+    // "exactOptionalPropertyTypes": true,               /* Interpret optional property types as written, rather than adding 'undefined'. */
+    // "noImplicitReturns": true,                        /* Enable error reporting for codepaths that do not explicitly return in a function. */
+    // "noFallthroughCasesInSwitch": true,               /* Enable error reporting for fallthrough cases in switch statements. */
+    // "noUncheckedIndexedAccess": true,                 /* Include 'undefined' in index signature results */
+    // "noImplicitOverride": true,                       /* Ensure overriding members in derived classes are marked with an override modifier. */
+    // "noPropertyAccessFromIndexSignature": true,       /* Enforces using indexed accessors for keys declared using an indexed type */
+    // "allowUnusedLabels": true,                        /* Disable error reporting for unused labels. */
+    // "allowUnreachableCode": true,                     /* Disable error reporting for unreachable code. */
+
+    /* Completeness */
+    // "skipDefaultLibCheck": true,                      /* Skip type checking .d.ts files that are included with TypeScript. */
+    "skipLibCheck": true                                 /* Skip type checking all .d.ts files. */
+  }
+}

+ 124 - 0
yarn.lock

@@ -0,0 +1,124 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+"@gmod/bgzf-filehandle@^1.4.2":
+  version "1.4.2"
+  resolved "https://registry.yarnpkg.com/@gmod/bgzf-filehandle/-/bgzf-filehandle-1.4.2.tgz#2523e50cebedfdcb49c7c040365bcb22de3ad964"
+  integrity sha512-eJBFPvH4fqIjVtJtFXw2DKiJYqL/9bOz/cLu5Xn+nGGve2avQ62Bl5aa20SNHSZyoL1QsgY5tGzJwH0IKUtvHg==
+  dependencies:
+    es6-promisify "^7.0.0"
+    generic-filehandle "^2.2.1"
+    long "^5.1.0"
+    pako "^1.0.11"
+
+"@types/node@^17.0.21":
+  version "17.0.21"
+  resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.21.tgz#864b987c0c68d07b4345845c3e63b75edd143644"
+  integrity sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==
+
+"aligner@http://git.t0m4.fr/Thomas/aligner.git":
+  version "1.0.0"
+  resolved "http://git.t0m4.fr/Thomas/aligner.git#9cb0ddd203ae903b6d1efdbe3c166c979aefefa6"
+
+ansi-styles@^4.1.0:
+  version "4.3.0"
+  resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
+  integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
+  dependencies:
+    color-convert "^2.0.1"
+
+blessed@^0.1.81:
+  version "0.1.81"
+  resolved "https://registry.yarnpkg.com/blessed/-/blessed-0.1.81.tgz#f962d687ec2c369570ae71af843256e6d0ca1129"
+  integrity sha1-+WLWh+wsNpVwrnGvhDJW5tDKESk=
+
+chalk@^4.1.2:
+  version "4.1.2"
+  resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
+  integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
+  dependencies:
+    ansi-styles "^4.1.0"
+    supports-color "^7.1.0"
+
+color-convert@^2.0.1:
+  version "2.0.1"
+  resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
+  integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
+  dependencies:
+    color-name "~1.1.4"
+
+color-name@~1.1.4:
+  version "1.1.4"
+  resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
+  integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
+
+es6-promisify@^6.1.1:
+  version "6.1.1"
+  resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-6.1.1.tgz#46837651b7b06bf6fff893d03f29393668d01621"
+  integrity sha512-HBL8I3mIki5C1Cc9QjKUenHtnG0A5/xA8Q/AllRcfiwl2CZFXGK7ddBiCoRwAix4i2KxcQfjtIVcrVbB3vbmwg==
+
+es6-promisify@^7.0.0:
+  version "7.0.0"
+  resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-7.0.0.tgz#9a710008dd6a4ab75a89e280bad787bfb749927b"
+  integrity sha512-ginqzK3J90Rd4/Yz7qRrqUeIpe3TwSXTPPZtPne7tGBPeAaQiU8qt4fpKApnxHcq1AwtUdHVg5P77x/yrggG8Q==
+
+figlet@^1.5.2:
+  version "1.5.2"
+  resolved "https://registry.yarnpkg.com/figlet/-/figlet-1.5.2.tgz#dda34ff233c9a48e36fcff6741aeb5bafe49b634"
+  integrity sha512-WOn21V8AhyE1QqVfPIVxe3tupJacq1xGkPTB4iagT6o+P2cAgEOOwIxMftr4+ZCTI6d551ij9j61DFr0nsP2uQ==
+
+file-uri-to-path@^2.0.0:
+  version "2.0.0"
+  resolved "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-2.0.0.tgz#7b415aeba227d575851e0a5b0c640d7656403fba"
+  integrity sha512-hjPFI8oE/2iQPVe4gbrJ73Pp+Xfub2+WI2LlXDbsaJBwT5wuMh35WNWVYYTpnz895shtwfyutMFLFywpQAFdLg==
+
+"gbffparser@http://git.t0m4.fr/Thomas/gbffParser.git":
+  version "1.0.0"
+  resolved "http://git.t0m4.fr/Thomas/gbffParser.git#377cecaa854c8857c700a6a93cfd36d51786ef98"
+  dependencies:
+    "@gmod/bgzf-filehandle" "^1.4.2"
+    blessed "^0.1.81"
+    chalk "^4.1.2"
+    figlet "^1.5.2"
+    genbank-parser "^1.2.4"
+
+genbank-parser@^1.2.4:
+  version "1.2.4"
+  resolved "https://registry.yarnpkg.com/genbank-parser/-/genbank-parser-1.2.4.tgz#ee2f9c32f66875024af0c09ee0ec5e10fb231802"
+  integrity sha512-r3pTgKHZx/rol90v2cezrNhfMhq3yHWCnBYyETNIJkvnJk+cwx/D/ZVgAy1SX8zwtnfvYQmFbqlpbh2f4t0h2w==
+
+generic-filehandle@^2.2.1:
+  version "2.2.2"
+  resolved "https://registry.yarnpkg.com/generic-filehandle/-/generic-filehandle-2.2.2.tgz#6493f4e8c0f9fc26d4086fbfa5d51879d0046f40"
+  integrity sha512-/YRwruMy53YNTNISJa7YWYVCKqSUzx1v+17xi/bYFX9TjBKNm4otuXZ8eXXeaf4S48ncufU8ihmsvHoi0RzJHA==
+  dependencies:
+    es6-promisify "^6.1.1"
+    file-uri-to-path "^2.0.0"
+
+has-flag@^4.0.0:
+  version "4.0.0"
+  resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
+  integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
+
+long@^5.1.0:
+  version "5.2.0"
+  resolved "https://registry.yarnpkg.com/long/-/long-5.2.0.tgz#2696dadf4b4da2ce3f6f6b89186085d94d52fd61"
+  integrity sha512-9RTUNjK60eJbx3uz+TEGF7fUr29ZDxR5QzXcyDpeSfeH28S9ycINflOgOlppit5U+4kNTe83KQnMEerw7GmE8w==
+
+pako@^1.0.11:
+  version "1.0.11"
+  resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf"
+  integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==
+
+supports-color@^7.1.0:
+  version "7.2.0"
+  resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da"
+  integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==
+  dependencies:
+    has-flag "^4.0.0"
+
+typescript@^4.6.2:
+  version "4.6.2"
+  resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.2.tgz#fe12d2727b708f4eef40f51598b3398baa9611d4"
+  integrity sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==