Commit cb6d2f56 authored by jgould's avatar jgould

field check

parent aa65a181
...@@ -135,6 +135,9 @@ morpheus.MafFileReader.prototype = { ...@@ -135,6 +135,9 @@ morpheus.MafFileReader.prototype = {
lc: true, lc: true,
remove: true remove: true
}); });
if (sampleField == null) {
throw new Error('Sample id column not found.');
}
var sampleColumnName = sampleField.name; var sampleColumnName = sampleField.name;
var sampleIdColumnIndex = sampleField.index; var sampleIdColumnIndex = sampleField.index;
var tumorFractionField = morpheus.MafFileReader.getField(['ccf_hat', var tumorFractionField = morpheus.MafFileReader.getField(['ccf_hat',
...@@ -157,6 +160,9 @@ morpheus.MafFileReader.prototype = { ...@@ -157,6 +160,9 @@ morpheus.MafFileReader.prototype = {
var proteinChangeColumn = fieldNameToIndex['Protein_Change' var proteinChangeColumn = fieldNameToIndex['Protein_Change'
.toLowerCase()]; .toLowerCase()];
var geneSymbolColumn = fieldNameToIndex['Hugo_Symbol'.toLowerCase()]; var geneSymbolColumn = fieldNameToIndex['Hugo_Symbol'.toLowerCase()];
if (geneSymbolColumn == null) {
throw new Error('Gene symbol column not found.');
}
var variantColumnIndex = headerToIndex['Variant_Classification' var variantColumnIndex = headerToIndex['Variant_Classification'
.toLowerCase()]; .toLowerCase()];
if (variantColumnIndex === undefined) { if (variantColumnIndex === undefined) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment