@@ -18,12 +18,12 @@ import {
1818 getParsedHeaderLines , parseLine , ParseException ,
1919 validateUniqueCellNamesWithinFile , validateMetadataLabelMatches ,
2020 validateGroupColumnCounts , timeOutCSFV , validateUnique ,
21- validateRequiredMetadataColumns , validateAlphanumericAndUnderscores
21+ validateRequiredMetadataColumns , validateAlphanumericAndUnderscores ,
22+ getOntologyShortNameLc , getLabelSuffixForOntology , fixTaxonIdIssues
2223} from './shared-validation'
2324import { parseDifferentialExpressionFile } from './validate-differential-expression'
2425import { parseAnnDataFile } from './validate-anndata'
2526import { fetchOntologies , getOntologyBasedProps } from '~/lib/validation/ontology-validation'
26- import { getOntologyShortNameLc , getLabelSuffixForOntology } from './shared-validation'
2727
2828/**
2929 * Gzip decompression requires reading the whole file, given the current
@@ -243,7 +243,8 @@ export async function parseMetadataFile(chunker, mimeType, fileOptions) {
243243 // add other line-by-line validations here
244244 }
245245 } )
246- return { issues, delimiter, numColumns : headers [ 0 ] . length }
246+ const filteredIssues = await fixTaxonIdIssues ( issues )
247+ return { issues : filteredIssues , delimiter, numColumns : headers [ 0 ] . length }
247248}
248249
249250/** validate all ontology-based convention terms in a given line */
@@ -293,7 +294,7 @@ export function validateOntologyTerm(prop, ontologyId, label, ontologies, knownE
293294 errorIdentifier = `${ ontologyId } -invalid-id`
294295 issue = [
295296 'error' , 'ontology:label-lookup-error' , msg ,
296- { subtype : 'ontology:invalid-id' }
297+ { subtype : 'ontology:invalid-id' , id : ontologyId , label }
297298 ]
298299 } else {
299300 const validLabels = ontology [ ontologyId ]
0 commit comments