@jbrowse/core
Version:
JBrowse 2 core libraries used by plugins
56 lines (55 loc) • 2.62 kB
TypeScript
import type { FileLocation, PreFileLocation } from './types';
import type { AnyConfigurationModel } from '../configuration';
import type { IAnyStateTreeNode } from 'mobx-state-tree';
export declare function getTrackAssemblyNames(track: IAnyStateTreeNode & {
configuration: AnyConfigurationModel;
}): string[];
export declare function getConfAssemblyNames(conf: AnyConfigurationModel): string[];
export declare function getRpcSessionId(thisNode: IAnyStateTreeNode): string;
export declare function getParentRenderProps(node: IAnyStateTreeNode): any;
export declare const UNKNOWN = "UNKNOWN";
export declare const UNSUPPORTED = "UNSUPPORTED";
export declare function getBlob(id: string): File | undefined;
export declare function getBlobMap(): Record<string, File>;
export declare function setBlobMap(map: Record<string, File>): void;
export declare function storeBlobLocation(location: PreFileLocation): import("./types").PreUriLocation | import("./types").PreLocalPathLocation | {
name: string;
blobId: string;
locationType: string;
};
export declare function makeIndex(location: FileLocation, suffix: string): import("./types").BlobLocation | {
uri: string;
locationType: string;
localPath?: undefined;
} | {
localPath: string;
locationType: string;
uri?: undefined;
};
export declare function makeIndexType(name: string | undefined, typeA: string, typeB: string): string;
export interface AdapterConfig {
type: string;
[key: string]: unknown;
}
export type AdapterGuesser = (file: FileLocation, index?: FileLocation, adapterHint?: string) => AdapterConfig | undefined;
export type TrackTypeGuesser = (adapterName: string) => string | undefined;
export declare function getFileName(track: FileLocation): string;
export declare function guessAdapter(file: FileLocation, index: FileLocation | undefined, adapterHint?: string, model?: IAnyStateTreeNode): AdapterConfig;
export declare function guessTrackType(adapterType: string, model?: IAnyStateTreeNode): string;
export declare function generateUnsupportedTrackConf(trackName: string, trackUrl: string, categories: string[] | undefined): {
type: string;
name: string;
description: string;
category: string[] | undefined;
trackId: string;
};
export declare function generateUnknownTrackConf(trackName: string, trackUrl: string, categories?: string[]): {
type: string;
name: string;
description: string;
category: string[] | undefined;
trackId: string;
};
export declare function getTrackName(conf: AnyConfigurationModel, session: {
assemblies: AnyConfigurationModel[];
}): string;