> For the complete documentation index, see [llms.txt](https://docs.ccv.brown.edu/bnc-user-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ccv.brown.edu/bnc-user-manual/xnat-to-bids-intro/bids-validation/oscar-legacy-validator.md).

# Oscar - legacy validator

⚠️ BIDS has [switched to a new BIDS Schema Validator 2.0](https://bids.neuroimaging.io/blog/2024/11/13/bids-validator-2.html), so these instructions are maintained for historical reasons only. You can find updated instructions for the new validator [in this previous section. ](/bnc-user-manual/xnat-to-bids-intro/bids-validation/oscar.md).

## 0. Summary of commands

```bash
version=v1.15.0
bids_directory=${HOME}/xnat-exports/bnc/study-demodat2/bids
simg=/oscar/data/bnc/simgs/bids/validator-${version}.sif
singularity exec --bind ${bids_directory}:${bids_directory}:ro ${simg} \bids-validator ${bids_directory}
```

## 1. Log into oscar and start an interactive section

If you are using the [Desktop app on Open OnDemand](https://docs.ccv.brown.edu/bnc-user-manual/xnat-to-bids-intro/bids-validation/pages/HF8lWyKP9liCNShWrkU7#id-1.-start-an-interactive-session), then you are already inside an interactive session and you just need to open the terminal. Otherwise, you can start an interactive job of 1 hour with

```bash
interact -n 2 -t 01:00:00 -m 8g
```

## 2. Define variables

### Specify the version of the validator you want to use.

```bash
version=v1.15.0
```

This is the last version of the validator before they switched to the new BIDS Schema Validator 2.0.

### Set up paths

Specify your **bids directory.** This is where `dataset_description.json` file lives

```bash
bids_directory=${HOME}/xnat-exports/bnc/study-demodat2/bids
```

Path to Singularity Image for the bids-validator (maintained by bnc)

```bash
simg=/oscar/data/bnc/simgs/bids/validator-${version}.sif
```

## 3. Run the main executable via singularity

The following command runs the `bids-validator` executable (via singularity) to test if a directory is BIDS compliant. The command tells singularity to launch the `validator-${version}.sif` image and execute the `bids-validator` command. The bids validator expects a directory as an input, which in this case corresponds to `${bids_directory}`. The `--bind ${bids_directory}:${bids_directory}:ro` makes the `${HOME}/xnat-exports/bnc/study-demodat/bids` available read-only inside the container at the same path.

```bash
singularity exec --bind ${bids_directory}:${bids_directory}:ro ${simg} \bids-validator ${bids_directory}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ccv.brown.edu/bnc-user-manual/xnat-to-bids-intro/bids-validation/oscar-legacy-validator.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
