{this.dataFormatToggler()}
Copy and paste your own mutation data
Upload your own mutation file
);
} else {
return (
);
}
}
protected dataFormatToggler() {
return (
Data Format
{this.dataFormatCollapsed ? (
) : (
)}
{this.essentialColumnsInfo()}
List of valid input headers:
{this.inputFormatDesc()}
);
}
protected essentialColumnsInfo() {
return (
You can either copy and paste your input into the text field
below or select a file with mutation data for upload.
Mutation files should be tab delimited, and should at least
have the genomic location headers in the first line for a
successful annotation. Note that all variants have to be
reported for genome build GRCh37 (hg19).
Chromosome
Start_Position
End_Position
Reference_Allele
Variant_Allele
If your mutation input doesn't contain the genomic location
headers, but you still want to visualize your data, your
input should at least have the following headers:
Hugo_Symbol
Protein_Change
);
}
protected inputFormatDesc() {
// TODO add & support more columns
return (
Column Header
Description
Example
Hugo_Symbol
HUGO symbol for the gene
TP53
Protein_Change
Amino acid change
V600E
Sample_ID
Tumor sample ID
TCGA-B5-A11E
Mutation_Type
Translational effect of variant allele
Missense_Mutation, Nonsense_Mutation, etc.
Chromosome
Chromosome number
X, Y, M, 1, 2, etc.
Start_Position
Lowest numeric position of the reported variant on
the genomic reference sequence
666
End_Position
Highest numeric position of the reported variant on
the genomic reference sequence
667
Reference_Allele
The plus strand reference allele at this position
A
Variant_Allele
Tumor sequencing (discovery) allele
C
Validation_Status
Second pass results from orthogonal technology
Valid
Mutation_Status
Mutation status
Somatic, Germline, etc.
Center
Center/Institute reporting the variant
mskcc.org
);
}
@computed get referenceGenomeSelector() {
// show reference genome selector if "show_mutation_mapper_tool_grch38" is true
if (getServerConfig().show_mutation_mapper_tool_grch38) {
return (
The annotations are based on genome build GRCh37 (hg19).
);
}
}
protected generateTabs(genes: string[]) {
const tabs: JSX.Element[] = [];
genes.forEach((gene: string) => {
const mutationMapperStore = this.store.getMutationMapperStore(gene);
if (mutationMapperStore) {
tabs.push(
);
}
});
return tabs;
}
@action.bound
protected handleFileSelect(e: any) {
const reader = new FileReader();
reader.addEventListener('loadend', this.fileLoadEndHandler);
if (e.target.files && e.target.files[0]) {
// this will fire a "loadend" event
reader.readAsText(e.target.files[0]);
} else {
// reset input file content if no file is selected
this.inputFileContent = '';
}
}
@action.bound
protected fileLoadEndHandler(e: any) {
if (e.srcElement && e.srcElement.result) {
// update input file content
this.inputFileContent = e.srcElement.result;
// reset input text to avoid confusion
this.inputText = '';
}
}
@action.bound
protected handleInputChange(e: any) {
this.inputText = e.target.value;
}
@action.bound
protected handleTabChange(id: string | undefined) {
// update the hash if routing exits
if (this.props.routing) {
this.props.routing.updateRoute({
standaloneMutationMapperGeneTab: id,
});
}
// update the observable if no routing
else {
this.standaloneMutationMapperGeneTab = id;
}
}
@action.bound
protected handleModifyInput() {
// clear previous critical errors
this.store.clearCriticalErrors();
// show input controls
this.inputControlsVisible = true;
}
@action.bound
protected handleVisualize() {
// clear previous critical errors
this.store.clearCriticalErrors();
this.store.mutationData = parseInput(this.inputContent);
// save to keep input content after user makes changes
this.lastParsedInputContent = this.inputContent;
// hide input controls
this.inputControlsVisible = false;
}
@action.bound
protected handleDataFormatToggle() {
this.dataFormatCollapsed = !this.dataFormatCollapsed;
}
@action.bound
protected handleLoadExamplePartiallyAnnotated() {
if (this.referenceGenomeSelection === REFERENCE_GENOME.grch37.NCBI) {
this.inputText = require('raw-loader!./resources/standaloneMutationDataExampleGrch37.txt');
} else {
this.inputText = require('raw-loader!./resources/standaloneMutationDataExampleGrch38.txt');
}
}
@action.bound
protected handleLoadExampleGenomicCoordinates() {
if (this.referenceGenomeSelection === REFERENCE_GENOME.grch37.NCBI) {
this.inputText = require('raw-loader!./resources/standaloneMutationDataExampleWithGenomicCoordinatesOnlyGrch37.txt');
} else {
this.inputText = require('raw-loader!./resources/standaloneMutationDataExampleWithGenomicCoordinatesOnlyGrch38.txt');
}
}
@action.bound
protected handleLoadExampleGeneAndProteinChange() {
this.inputText = require('raw-loader!./resources/standaloneMutationDataExampleWithGeneAndProteinChangeOnly.txt');
}
@action.bound
protected handleReferenceGenomeSelectionChange(selection: string) {
// store the reference genome selection to localStorage
getBrowserWindow().localStorage.setItem('referenceGenomeId', selection);
// reload the page to initialize genome nexus api instance with correct url
getBrowserWindow().location.reload();
}
@action.bound
protected handleOncoKbIconToggle(mergeIcons: boolean) {
this.userSelectionStore.mergeOncoKbIcons = mergeIcons;
updateOncoKbIconStyle({ mergeIcons });
}
@computed get grch38Warning() {
return (
Genome build GRCh38 is currently in beta. Several annotation
sources displayed on the page might not have official GRCh38
support i.e.
OncoKB™,
CIViC,
Cancer Hotspots,
My Cancer Genome and
3D structures. Although
most of the time the canonical transcript for a gene will be the
same between GRCh37 and GRCh38 be sure to look at the results
from these annotation sources carefully.