@jbrowse/core
Version:
JBrowse 2 core libraries used by plugins
49 lines (48 loc) • 1.44 kB
TypeScript
import type { SimpleFeatureSerialized } from '../util';
import type { SerializedFeat } from './types';
export interface Feat {
start: number;
end: number;
type?: string;
name?: string;
id?: string;
}
export interface ParentFeat extends Feat {
uniqueId: string;
strand?: number;
refName: string;
subfeatures?: Feat[];
parentId?: string;
}
export interface SeqState {
seq: string;
upstream?: string;
downstream?: string;
}
export interface ErrorState {
error: string;
}
export declare function stitch(subfeats: Feat[], sequence: string): string;
export declare function dedupe(list: Feat[]): Feat[];
export declare function revlist(list: Feat[], seqlen: number): {
start: number;
end: number;
type?: string;
name?: string;
id?: string;
}[];
export declare function calculateUTRs(cds: Feat[], exons: Feat[]): {
type: string;
start: number;
end: number;
name?: string;
id?: string;
}[];
export declare function calculateUTRs2(cds: Feat[], parentFeat: Feat): {
type: string;
start: number;
end: number;
}[];
export declare function ellipses(slug: string): string;
export declare function replaceUndefinedWithNull(obj: SimpleFeatureSerialized): any;
export declare function formatSubfeatures(obj: SerializedFeat, depth: number, parse: (obj: Record<string, unknown>) => void, currentDepth?: number, returnObj?: Record<string, unknown>): void;