UNPKG

bioseq-ts

Version:

Biological Sequence in Javascript, written in Typescript.

85 lines (84 loc) 2.08 kB
import { BioSeq } from './BioSeq'; declare type IPartition = [number, number]; declare class BioSeqSet { /** * Contains the list of BioSeq Objects * * @private * @type {BioSeq[]} * @memberof BioSeqSet */ private readonly set; private readonly hash; private hashString; /** * Contains the partition table of the set * * @private * @type {IPartition[]} * @memberof BioSeqSet */ private partitionTable; constructor(set?: BioSeq[], partitionTable?: IPartition[]); /** * Creates a unique identifier based on the content of the dataset * * @returns {string} * @memberof BioSeqSet */ getHash(): string; /** * Returns the set of BioSeqs. * * @returns * @memberof BioSeqSet */ getBioSeqs(): BioSeq[]; /** * Returns the partition of the set * * @returns * @memberof BioSeqSet */ getPartitions(): IPartition[]; /** * Concatenate the sequences of two BioSeqSets. Keep header of the current set. * * @param {BioSeqSet} newset * @memberof BioSeqSet */ concatSequences(newBioSeqSet: BioSeqSet): BioSeqSet; /** * Return the length of the longest sequence in the set (with or without gaps). * * @param {boolean} [gapless=false] * @returns {number} * @memberof BioSeqSet */ maxLength(gapless?: boolean): number; /** * Returns a boolean if all sequences are aligned, or if they all have the same length * * @returns {boolean} * @memberof BioSeqSet */ isAligned(): boolean; /** * Returns the partition of the dataset. [start, end] * * @private * @returns * @memberof BioSeqSet */ private calcPartitionTable; /** * Minimal sanity check to see if it is a valid partition table * * @private * @param {IPartition[]} partitionTable * @returns {boolean} * @memberof BioSeqSet */ private isValidPartitionTable; } export { BioSeqSet };