@rcsb/rcsb-saguaro
Version:
RCSB 1D Feature Viewer
68 lines (67 loc) • 2.76 kB
TypeScript
/**Interface to describe annotation gaps*/
export interface RcsbFvTrackDataElementGapInterface {
/**Start position of the gap*/
begin: number;
/**End position of the gap*/
end: number;
/**Flag to indicate if annotation regions are connected or not*/
isConnected: boolean;
}
/**Annotation Element Interface*/
export interface RcsbFvTrackDataElementInterface {
/**Annotation label. This information might be displayed in the annotation tooltip*/
label?: string;
/**Annotation local value. E.g. interface residue energy*/
value?: number;
/**Annotation local multidimensional value. E.g. Surface normal vector*/
values?: Array<number>;
/**Annotation start position*/
begin: number;
/**Annotation end position*/
end?: number;
/**Annotation displayed color*/
color?: string;
/**Annotation inner region should not be highlighted*/
isEmpty?: boolean;
/**Annotation object is not a real annotation but a selected area from the user*/
nonSpecific?: boolean;
/**Annotation gaps that should be displayed as a dashed line*/
gaps?: Array<RcsbFvTrackDataElementGapInterface>;
/**Draw a circle on the start side of blocks*/
openBegin?: boolean;
/**Draw a circle on the end side of blocks*/
openEnd?: boolean;
/**Callback when the annotation is clicked*/
elementClickCallback?: (x: RcsbFvTrackDataElementInterface, e?: MouseEvent) => void;
}
export interface RcsbFvColorGradient {
thresholds: Array<number>;
colors: Array<string> | string;
}
/**Array of annotation elements*/
export declare class RcsbFvTrackData<D extends {
[k: string]: any;
} = {
[k: string]: any;
}> extends Array<RcsbFvTrackDataElementInterface & D> {
}
/**Map of annotation elements*/
export declare class RcsbFvTrackDataMap extends Map<string, RcsbFvTrackData> {
}
/**Class to load, process and check for spatial overlapping annotation data*/
export declare class RcsbDataManager {
/**Join multiple arrays of annotation data elements into one
* @param dataList Array of annotation arrays
* @return RcsbFvTrackData Single array of annotations
* */
static joinTrackDataArray(dataList: Array<RcsbFvTrackData>): RcsbFvTrackData;
/**Check spatial overlapping between annotation elements and return an array with non-overlapping sets of annotations
* @param data Array of annotations
* @return Array Multiple array of non-overlapping annotations
* */
static getNonOverlappingData(data: RcsbFvTrackData): Array<RcsbFvTrackData>;
/**Check if twon annotation elements overlap in the space*/
private static doOverlap;
/**Checks annotation data*/
static processData(dataTrack: RcsbFvTrackData): RcsbFvTrackData;
}