react-mutation-mapper
Version:
Generic Mutation Mapper
220 lines (219 loc) • 6.63 kB
TypeScript
import { Mutation } from 'cbioportal-utils';
import { Column } from 'react-table';
import { proteinChangeSortMethod } from '../column/ProteinChange';
import { annotationSortMethod } from '../column/Annotation';
import { gnomadSortMethod } from '../column/Gnomad';
import { clinvarSortMethod } from '../column/ClinvarInterpretation';
import { dbsnpSortMethod } from '../column/Dbsnp';
import { hgvscSortMethod } from '../column/Hgvsc';
import { hgvsgSortMethod } from '../column/Hgvsg';
import { signalSortMethod } from '../column/Signal';
export declare enum MutationColumn {
PROTEIN_CHANGE = "proteinChange",
ANNOTATION = "annotation",
MUTATION_STATUS = "mutationStatus",
MUTATION_TYPE = "mutationType",
CHROMOSOME = "chromosome",
START_POSITION = "startPosition",
END_POSITION = "endPosition",
REFERENCE_ALLELE = "referenceAllele",
VARIANT_ALLELE = "variantAllele",
HGVSG = "hgvsg",
HGVSC = "hgvsc",
GNOMAD = "gnomad",
CLINVAR = "clinvar",
DBSNP = "dbsnp",
SIGNAL = "signal"
}
export declare enum MutationColumnName {
PROTEIN_CHANGE = "Protein Change",
ANNOTATION = "Annotation",
MUTATION_STATUS = "Mutation Status",
MUTATION_TYPE = "Mutation Type",
CHROMOSOME = "Chromosome",
START_POSITION = "Start Pos",
END_POSITION = "End Pos",
REFERENCE_ALLELE = "Ref",
VARIANT_ALLELE = "Var",
HGVSG = "HGVSg",
HGVSC = "HGVSc",
GNOMAD = "gnomAD",
CLINVAR = "ClinVar",
DBSNP = "dbSNP",
SIGNAL = "SIGNAL"
}
export declare function rightAlignedCell(cellProps: any): JSX.Element;
export declare const MUTATION_COLUMN_HEADERS: {
proteinChange: JSX.Element;
annotation: JSX.Element;
mutationStatus: JSX.Element;
mutationType: JSX.Element;
chromosome: JSX.Element;
startPosition: JSX.Element;
endPosition: JSX.Element;
referenceAllele: JSX.Element;
variantAllele: JSX.Element;
hgvsg: JSX.Element;
hgvsc: JSX.Element;
gnomad: JSX.Element;
clinvar: JSX.Element;
dbsnp: JSX.Element;
signal: JSX.Element;
};
/**
* These default columns only include static props.
* So, for some columns, like Annotation, no default accessor or Cell (render) properties included.
*/
export declare const MUTATION_COLUMNS_DEFINITION: {
proteinChange: {
id: MutationColumn;
name: MutationColumnName;
accessor: MutationColumn;
searchable: boolean;
Cell: (column: any) => JSX.Element;
Header: JSX.Element;
sortMethod: typeof proteinChangeSortMethod;
};
annotation: {
id: MutationColumn;
name: MutationColumnName;
Header: JSX.Element;
sortMethod: typeof annotationSortMethod;
};
mutationType: {
id: MutationColumn;
name: MutationColumnName;
accessor: MutationColumn;
searchable: boolean;
Cell: (column: any) => JSX.Element;
Header: JSX.Element;
};
mutationStatus: {
id: MutationColumn;
name: MutationColumnName;
accessor: MutationColumn;
searchable: boolean;
Cell: (column: any) => JSX.Element;
Header: JSX.Element;
};
chromosome: {
id: MutationColumn;
name: MutationColumnName;
accessor: MutationColumn;
searchable: boolean;
Cell: typeof rightAlignedCell;
Header: JSX.Element;
show: boolean;
};
startPosition: {
id: MutationColumn;
name: MutationColumnName;
accessor: MutationColumn;
searchable: boolean;
Cell: typeof rightAlignedCell;
Header: JSX.Element;
show: boolean;
};
endPosition: {
id: MutationColumn;
name: MutationColumnName;
accessor: MutationColumn;
searchable: boolean;
Cell: typeof rightAlignedCell;
Header: JSX.Element;
show: boolean;
};
referenceAllele: {
id: MutationColumn;
name: MutationColumnName;
accessor: MutationColumn;
searchable: boolean;
Header: JSX.Element;
show: boolean;
};
variantAllele: {
id: MutationColumn;
name: MutationColumnName;
accessor: MutationColumn;
searchable: boolean;
Header: JSX.Element;
show: boolean;
};
hgvsg: {
id: MutationColumn;
name: MutationColumnName;
Header: JSX.Element;
sortMethod: typeof hgvsgSortMethod;
};
hgvsc: {
id: MutationColumn;
name: MutationColumnName;
Header: JSX.Element;
sortMethod: typeof hgvscSortMethod;
};
gnomad: {
id: MutationColumn;
name: MutationColumnName;
Header: JSX.Element;
sortMethod: typeof gnomadSortMethod;
};
clinvar: {
id: MutationColumn;
name: MutationColumnName;
Header: JSX.Element;
sortMethod: typeof clinvarSortMethod;
show: boolean;
};
dbsnp: {
id: MutationColumn;
name: MutationColumnName;
Header: JSX.Element;
sortMethod: typeof dbsnpSortMethod;
show: boolean;
};
signal: {
id: MutationColumn;
name: MutationColumnName;
Header: JSX.Element;
sortMethod: typeof signalSortMethod;
show: boolean;
};
};
export declare const DEFAULT_MUTATION_COLUMNS: ({
id: MutationColumn;
name: MutationColumnName;
accessor: MutationColumn;
searchable: boolean;
Cell: (column: any) => JSX.Element;
Header: JSX.Element;
} | {
id: MutationColumn;
name: MutationColumnName;
accessor: MutationColumn;
searchable: boolean;
Header: JSX.Element;
show: boolean;
} | {
id: MutationColumn;
name: MutationColumnName;
Header: JSX.Element;
sortMethod: typeof hgvsgSortMethod;
} | {
id: MutationColumn;
name: MutationColumnName;
Header: JSX.Element;
sortMethod: typeof gnomadSortMethod;
} | {
id: MutationColumn;
name: MutationColumnName;
Header: JSX.Element;
sortMethod: typeof clinvarSortMethod;
show: boolean;
} | {
id: MutationColumn;
name: MutationColumnName;
Header: JSX.Element;
sortMethod: typeof signalSortMethod;
show: boolean;
})[];
export declare function mergeColumns(defaultColumns: Column<Partial<Mutation>>[], customColumns: Column<Partial<Mutation>>[]): Column<Partial<Mutation>>[];