UNPKG

sequaljs

Version:

JavaScript/TypeScript library for parsing and manipulating ProForma peptide sequence notation

89 lines 2.58 kB
/** * Base class for biochemical building blocks with position and mass properties. * * This abstract base class provides core functionality for blocks such as * amino acids, modifications, and other biochemical components. */ export declare class BaseBlock { protected _value: string; private _position?; private _branch; private _mass?; private _extra?; /** * Initializes a BaseBlock object. * * @param value - The identifier of the block. * @param position - The position of the block within a chain. * @param branch - Indicates whether this block is a branch of another block. * @param mass - The mass of the block in Daltons. */ constructor(value: string, position?: number | null, branch?: boolean, mass?: number | null); /** * Gets the identifier of the block. */ get value(): string; /** * Sets the identifier of the block. * @param value - The new identifier. */ set value(value: string); /** * Gets the position of the block. */ get position(): number | null; /** * Sets the position of the block. * @param position - The new position. */ set position(position: number | null); /** * Checks if the block is a branch. */ get branch(): boolean; /** * Gets the mass of the block. */ get mass(): number | null; /** * Sets the mass of the block. * @param mass - The new mass. */ set mass(mass: number | null); /** * Gets extra information associated with the block. */ get extra(): any; /** * Sets extra information for the block. * @param value - The extra information. */ set extra(value: any); /** * Converts the block to a dictionary representation. * @returns A dictionary containing the block's attributes. */ toDict(): Record<string, any>; /** * Checks if two blocks are equal. * @param other - The other block to compare with. * @returns True if the blocks are equal, false otherwise. */ equals(other: BaseBlock): boolean; /** * Generates a hash for the block. * @returns The hash code. */ hashCode(): number; /** * Returns a string representation of the block. * @returns The string representation. */ toString(): string; /** * Returns a detailed string representation of the block. * @returns The detailed string representation. */ toRepr(): string; } //# sourceMappingURL=base_block.d.ts.map