Global

Members

(constant) fallbackDatasetDescription :BidsJsonFile

Fallback default dataset_description.json file.
Type:
Deprecated:
  • Will be removed in v4.0.0.
Source:

(constant) sidecarValueHasHed

Determine whether a sidecar value has HED data.
Source:

Methods

convertHedIssuesToBidsIssues(hedIssues, file) → {Array.<BidsHedIssue>}

Convert one or more HED issues into BIDS-compatible issues.
Parameters:
Name Type Description
hedIssues IssueError | Array.<Issue> One or more HED-format issues.
file Object A BIDS-format file object used to generate BidsHedIssue objects.
Source:
Returns:
The passed issue(s) in BIDS-compatible format.
Type
Array.<BidsHedIssue>

parseTSV(contents) → {Object}

Parse a TSV file.
Parameters:
Name Type Description
contents string The contents of a TSV file.
Source:
Returns:
The parsed contents of the TSV file.
Type
Object

parseTsvHed(tsvFileData) → {CombinedResult}

Combine the BIDS sidecar HED data into a BIDS TSV file's HED data.
Parameters:
Name Type Description
tsvFileData BidsTsvFile A BIDS TSV file.
Source:
Returns:
The combined HED strings for this BIDS TSV file, and all issues found during the combination.
Type
CombinedResult

stripBOM()

Module for parsing TSV files. Copied from https://github.com/bids-standard/bids-validator/blob/6fc6d152b52266934575442e61f1477ba18f42ec/bids-validator/validators/tsv/tsvParser.js
Source:

validateBidsDataset(dataset, schemaDefinition) → {Promise.<Array.<BidsIssue>>}

Validate a BIDS dataset.
Parameters:
Name Type Description
dataset BidsDataset The BIDS dataset.
schemaDefinition object The version spec for the schema to be loaded.
Source:
Returns:
Any issues found.
Type
Promise.<Array.<BidsIssue>>

validateBidsTsvFile(tsvFileData, hedSchemas) → {Array.<BidsIssue>}

Validate a BIDS TSV file.
Parameters:
Name Type Description
tsvFileData BidsTsvFile A BIDS TSV file.
hedSchemas Schemas A HED schema collection.
Source:
Returns:
Any issues found.
Type
Array.<BidsIssue>

validateCombinedDataset(hedStrings, hedSchemas, tsvFileData) → {Array.<BidsHedIssue>}

Validate the HED data in a combined event TSV file/sidecar BIDS data collection.
Parameters:
Name Type Description
hedStrings Array.<string> The HED strings in the data collection.
hedSchemas Schemas The HED schema collection to validate against.
tsvFileData BidsTsvFile The BIDS event TSV file being validated.
Source:
Returns:
Any issues found.
Type
Array.<BidsHedIssue>

validateFullDataset(dataset, hedSchemas) → {Promise.<Array.<BidsIssue>>|Promise.<never>}

Validate a full BIDS dataset using a HED schema collection.
Parameters:
Name Type Description
dataset BidsDataset A BIDS dataset.
hedSchemas Schemas A HED schema collection.
Source:
Returns:
Any issues found.
Type
Promise.<Array.<BidsIssue>> | Promise.<never>

validateHedColumn(eventData, hedSchemas) → {ValidationResult}

Validate the HED columns of a collection of BIDS event TSV files.
Parameters:
Name Type Description
eventData Array.<BidsEventFile> A collection of BIDS event TSV files.
hedSchemas Schemas A HED schema collection.
Source:
Returns:
Whether errors (as opposed to warnings) were founds, and all issues found.
Type
ValidationResult

validateSidecars(sidecarData, hedSchemas) → {ValidationResult}

Validate a collection of BIDS sidecars.
Parameters:
Name Type Description
sidecarData Array.<BidsSidecar> A collection of BIDS sidecars.
hedSchemas Schemas A HED schema collection.
Source:
Returns:
Whether errors (as opposed to warnings) were founds, and all issues found.
Type
ValidationResult

validateStrings(hedStrings, hedSchemas, fileObject, settings) → {Array.<BidsHedIssue>}

Validate a set of HED strings.
Parameters:
Name Type Description
hedStrings Array.<string> The HED strings to validate.
hedSchemas Schemas The HED schema collection to validate against.
fileObject Object A BIDS-format file object used to generate BidsHedIssue objects.
settings Object Options to pass to validateHedString.
Source:
Returns:
Any issues found.
Type
Array.<BidsHedIssue>

Type Definitions

CombinedResult

Type:
  • Object
Properties:
Name Type Description
hedStrings Array.<string> The combined HED strings for this BIDS TSV file.
issues Array.<BidsIssue> All issues found during the combination.
Source:

ValidationResult

Type:
  • Object
Properties:
Name Type Description
isError boolean Whether errors (as opposed to warnings) were found.
issues Array.<BidsHedIssue> All issues found.
Source: