Parser for BAM and SAM alignment files.
Requires the native addon — BAM/SAM parsing is not available in pure TypeScript mode. Format detection is automatic.
const parser = new AlignmentParser();for await (const record of parser.parseFile("alignments.bam")) { console.log(`${record.id} -> ${record.referenceSequence}:${record.position}`);} Copy
const parser = new AlignmentParser();for await (const record of parser.parseFile("alignments.bam")) { console.log(`${record.id} -> ${record.referenceSequence}:${record.position}`);}
const results = await seqops(new AlignmentParser().parseFile("reads.bam")) .filter({ minLength: 100 }) .unique({ by: "sequence" }) .collect(); Copy
const results = await seqops(new AlignmentParser().parseFile("reads.bam")) .filter({ minLength: 100 }) .unique({ by: "sequence" }) .collect();
Parser for BAM and SAM alignment files.
Requires the native addon — BAM/SAM parsing is not available in pure TypeScript mode. Format detection is automatic.
Example: Basic usage
Example: With seqops pipeline