import { LitElement } from 'lit'; /** * The object describing a Variant Collection. */ export type VariantCollection = { name: string; collectionName: string; synopsis: string; }; /** * Encoding for allele genotype display: VCF (e.g. 0/0, 1/1) or HapMap (e.g. TT, CC). */ export type AlleleEncoding = 'vcf' | 'hap'; /** * One variant from the alleles API with genotypes per sample. */ export type AlleleVariant = { position: number; ref: string; alt: string; genotypes: Record; }; /** * Response from the /vcf/alleles/ API. */ export type AlleleVariantsResponse = { region: { chromosome: string; start: number; end: number; }; encoding: AlleleEncoding; samples: string[]; invalid_samples?: string[]; variant_count: number; variants: AlleleVariant[]; }; /** * Data needed to search for genes to get coordinates. */ export type AlleleLocationSearchFunction = (identifier: string, abortSignal?: AbortSignal) => Promise<{ chromosome: string; start: number; end: number; }>; /** * Data needed to search for variants. */ export type AlleleVariantSearchFunction = (params: { collection: string; fileName: string; chromosome: string; start: number; end: number; strains?: string[]; encoding?: AlleleEncoding; }, abortSignal?: AbortSignal) => Promise; /** * Function to fetch strains for a collection. */ export type AlleleStrainSearchFunction = (params: { collection: string; fileName: string; }, abortSignal?: AbortSignal) => Promise<{ identifier: string; }[]>; export declare class LisAlleleSearchElement extends LitElement { /** @ignore */ static styles: import("lit").CSSResult; /** @ignore */ createRenderRoot(): this; connectedCallback(): void; /** * The list of available variant collections. */ collections: VariantCollection[]; /** * The list of available chromosome identifiers for region search. */ chromosomes: string[]; /** * The name of the collection to select by default. */ preSelectedCollection?: string; /** * Function to resolve a gene name to coordinates. */ locationSearchFunction: AlleleLocationSearchFunction; /** * Function to fetch variants. */ variantSearchFunction: AlleleVariantSearchFunction; /** * Function to fetch strains. */ strainSearchFunction: AlleleStrainSearchFunction; private selectedCollectionIdx; private strainMode; private availableStrains; private selectedStrains; private strainFilter; /** Display encoding: hap or vcf. Default hap. */ private encoding; private searchResults; private searchedRegion; private searchedTerm; private cancelPromiseController; private _strainLoadingRef; private _modalRef; private _resultsLoadingRef; willUpdate(changedProperties: Map): void; private _onCollectionChange; private _onStrainModeChange; private _onStrainFilter; private _onStrainSelect; private _onEncodingChange; private _fetchStrains; private _onSearchLocation; private _onSearchRegion; private _performVariantSearch; private _toggleModal; render(): import("lit-html").TemplateResult<1>; private _renderAlleleVariantsTable; private _renderStrainSelector; } declare global { interface HTMLElementTagNameMap { 'lis-allele-search-element': LisAlleleSearchElement; } } //# sourceMappingURL=lis-allele-search-element.d.ts.map