validate

sidecarValueHasHed(sidecarValue)

Determine whether a sidecar value has HED data.

Arguments:
  • sidecarValue (object) – A BIDS sidecar value.

Returns:

boolean – Whether the sidecar value has HED data.

validateBidsDataset(dataset, schemaDefinition)

Validate a BIDS dataset.

Arguments:
  • dataset (BidsDataset) – The BIDS dataset.

  • schemaDefinition (object) – The version spec for the schema to be loaded.

Returns:

Promise.<Array.<BidsIssue>> – Any issues found.

validateFullDataset(dataset, hedSchemas)

Validate a full BIDS dataset using a HED schema collection.

Arguments:
  • dataset (BidsDataset) – A BIDS dataset.

  • hedSchemas (Schemas) – A HED schema collection.

Returns:

Promise.<Array.<BidsIssue>>|Promise.<never> – Any issues found.

validateBidsTsvFile(tsvFileData, hedSchemas)

Validate a BIDS TSV file.

Arguments:
  • tsvFileData (BidsTsvFile) – A BIDS TSV file.

  • hedSchemas (Schemas) – A HED schema collection.

Returns:

Array.<BidsIssue> – Any issues found.

validateSidecars(sidecarData, hedSchemas)

Validate a collection of BIDS sidecars.

Arguments:
  • sidecarData (Array.<BidsSidecar>) – A collection of BIDS sidecars.

  • hedSchemas (Schemas) – A HED schema collection.

Returns:

validateHedColumn(eventData, hedSchemas)

Validate the HED columns of a collection of BIDS event TSV files.

Arguments:
  • eventData (Array.<BidsEventFile>) – A collection of BIDS event TSV files.

  • hedSchemas (Schemas) – A HED schema collection.

Returns:

parseTsvHed(tsvFileData)

Combine the BIDS sidecar HED data into a BIDS TSV file’s HED data.

Arguments:
Returns:

validateCombinedDataset(hedStrings, hedSchemas, tsvFileData)

Validate the HED data in a combined event TSV file/sidecar BIDS data collection.

Arguments:
  • 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.

Returns:

Array.<BidsHedIssue> – Any issues found.

validateStrings(hedStrings, hedSchemas, fileObject, settings)

Validate a set of HED strings.

Arguments:
  • 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 {@link BidsHedIssue} objects.

  • settings (Object) – Options to pass to {@link validateHedString}.

Returns:

Array.<BidsHedIssue> – Any issues found.

convertHedIssuesToBidsIssues(hedIssues, file)

Convert one or more HED issues into BIDS-compatible issues.

Arguments:
  • hedIssues (IssueError|Array.<Issue>) – One or more HED-format issues.

  • file (Object) – A BIDS-format file object used to generate {@link BidsHedIssue} objects.

Returns:

Array.<BidsHedIssue> – The passed issue(s) in BIDS-compatible format.