@gmod/vcf
Version:
High performance streaming Variant Call Format (VCF) parser in pure JavaScript
35 lines (34 loc) • 1.25 kB
TypeScript
import type { InfoValue, MetaMap } from './parseInfo.ts';
import type { GenotypeCallback } from './processGenotypes.ts';
export type SampleValue = (string | number | undefined)[] | undefined;
export type SampleData = Record<string, SampleValue>;
export type Samples = Record<string, SampleData>;
export declare class Variant {
CHROM: string | undefined;
POS: number;
ID: string[] | undefined;
REF: string | undefined;
ALT: string[] | undefined;
QUAL: number | undefined;
FILTER: string | string[] | undefined;
INFO: Record<string, InfoValue>;
FORMAT: string | undefined;
private formatMeta;
private rest;
private sampleNames;
constructor(line: string, infoMeta: MetaMap, formatMeta: MetaMap, sampleNames: string[], strict: boolean);
SAMPLES(): Samples;
GENOTYPES(): Record<string, string>;
processGenotypes(callback: GenotypeCallback): void;
toJSON(): {
CHROM: string | undefined;
POS: number;
ID: string[] | undefined;
REF: string | undefined;
ALT: string[] | undefined;
QUAL: number | undefined;
FILTER: string | string[] | undefined;
INFO: Record<string, InfoValue>;
FORMAT: string | undefined;
};
}