sequaljs
Version:
JavaScript/TypeScript library for parsing and manipulating ProForma peptide sequence notation
142 lines • 5.21 kB
TypeScript
import { BaseBlock } from "./base_block";
declare class PipeValue {
static SYNONYM: string;
static INFO_TAG: string;
static MASS: string;
static OBSERVED_MASS: string;
static CROSSLINK: string;
static BRANCH: string;
static AMBIGUITY: string;
static GLYCAN: string;
static GAP: string;
static FORMULA: string;
value: string;
private _type;
crosslinkId: string | null;
isBranch: boolean;
isBranchRef: boolean;
isCrosslinkRef: boolean;
ambiguityGroup: string | null;
isAmbiguityRef: boolean;
localizationScore: number | null;
source: string | null;
originalValue: string | null;
mass: number | null;
observedMass: number | null;
isValidGlycan: boolean;
isValidFormula: boolean;
assignedTypes: string[];
constructor(value: string, valueType: string, originalValue?: string | null);
private _extractProperties;
toString(): string;
get type(): string;
set type(value: string);
assignType(value: string): void;
}
export declare class ModificationValue {
private static KNOWN_SOURCES;
private _primaryValue;
private _source;
private _mass;
private _pipeValues;
constructor(value: string, mass?: number | null);
static validateGlycan(glycan: string): boolean;
static validateFormula(formula: string): boolean;
get localizationScore(): number | null;
private _parseValue;
private _processPrimaryValue;
private static _validateGlycan;
private static _validateFormula;
private _processPipeComponent;
get source(): string | null;
get primaryValue(): string;
get mass(): number | null;
get pipeValues(): PipeValue[];
get infoTags(): string[];
get synonyms(): string[];
get observedMass(): number | null;
get ambiguityGroup(): string | null;
get isAmbiguityRef(): boolean;
get isCrosslinkRef(): boolean;
get isBranchRef(): boolean;
get isBranch(): boolean;
get crossLinkId(): string | null;
}
export declare class Modification extends BaseBlock {
static readonly KNOWN_SOURCES: Set<string>;
private _source;
private _originalValue;
private _crosslinkId;
private _isCrosslinkRef;
private _isBranchRef;
private _isBranch;
private _isAmbiguityRef;
private _ambiguityGroup;
private _regex;
private _modType;
private _labile;
private _labileNumber;
private _fullName;
private _allFilled;
private _modValue;
inRange: boolean;
rangeStart: number | null;
rangeEnd: number | null;
localizationScore: number | null;
constructor(value: string, position?: number, regexPattern?: string, fullName?: string, modType?: string, labile?: boolean, labilNumber?: number, mass?: number, allFilled?: boolean, crosslinkId?: string, isCrosslinkRef?: boolean, isBranchRef?: boolean, isBranch?: boolean, ambiguityGroup?: string, isAmbiguityRef?: boolean, inRange?: boolean, rangeStart?: number, rangeEnd?: number, localizationScore?: number, modValue?: ModificationValue);
get value(): string;
set value(val: string);
get mass(): number;
set mass(val: number);
get observedMass(): number | null;
get ambiguityGroup(): string | null;
get isAmbiguityRef(): boolean;
get synonyms(): string[];
get modValue(): ModificationValue;
set modValue(val: ModificationValue);
get infoTags(): string[];
get crosslinkId(): string | null;
get isCrosslinkRef(): boolean;
get source(): string | null;
get originalValue(): string;
get regex(): RegExp | null;
get modType(): string;
get labile(): boolean;
get labileNumber(): number;
get fullName(): string | null;
get allFilled(): boolean;
findPositions(seq: string): Generator<[number, number], void, unknown>;
toDict(): Record<string, any>;
equals(other: any): boolean;
hashCode(): number;
toString(): string;
static validateGlycan(glycan: string): boolean;
static validateFormula(formula: string): boolean;
get isBranchRef(): boolean;
get isBranch(): boolean;
toProforma(): string;
get hasAmbiguity(): boolean;
}
export declare class GlobalModification extends Modification {
targetResidues: string[] | null;
globalModType: string;
constructor(value: string, target_residues?: string[] | null, mod_type?: string);
toProforma(): string;
toString(): string;
}
export declare class ModificationMap {
seq: string;
ignorePositions: Set<number>;
modDictByName: Record<string, Modification>;
modPositionDict: Record<string, number[]>;
positionToMods: Map<number, Modification[]>;
constructor(seq: string, mods?: Modification[], ignore_positions?: Set<number>, parse_position?: boolean, mod_position_dict?: Record<string, number[]>);
_buildMappings(mods: Modification[], parse_position: boolean): void;
getModPositions(mod_name: string): number[] | null;
getMod(mod_name: string): Modification | null;
getModsAtPosition(position: number): Modification[];
hasModAtPosition(position: number, mod_name?: string): boolean;
toDict(): Record<string, any>;
}
export {};
//# sourceMappingURL=modification.d.ts.map