Skip to content

Commit

Permalink
improve help for missing subject /task (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-Gau authored Aug 5, 2024
1 parent 11943d1 commit 3ed83e5
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
4 changes: 4 additions & 0 deletions bidsmreye/bids_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,13 @@ def check_layout(cfg: Config, layout: BIDSLayout, for_file: str = "bold") -> Non
)

if bf == []:
subjects = layout.get(return_type="id", target="subject", suffix="bold")
tasks = layout.get(return_type="id", target="task", suffix="bold")
raise RuntimeError(
f"Input dataset {layout.root} does not have "
f"any data to process for filter\n{this_filter}.\n"
f"This dataset contains subjects: {subjects}."
f"This dataset contains tasks: {tasks}."
"Is your dataset a BIDS derivative dataset?\n"
"Check the FAQ for more information: "
"https://bidsmreye.readthedocs.io/en/latest/FAQ.html"
Expand Down
19 changes: 19 additions & 0 deletions docs/questions/missing_data.question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: "bidsmreye can not find subject / task"
alt_titles:
- bidsmreye process only one task in the bids_dir
- No Subject Found in Layout
---

Check the following things:

- Have you passed the correct path to your BIDS dataset?

This is one the most common errors,
that can very easily happen when working with a containerized version of bidsmreye

- Is your dataset a valid preprocessed fMRI BIDS dataset?

See [How I should structure my input data?](./faq.md#how-i-should-structure-my-input-data)

- Try to rerun your command with the `--reset-database` option for force bidsmreye to reindex your input dataset.
21 changes: 19 additions & 2 deletions docs/source/FAQ.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@

# Frequently Asked Questions
- [bidsmreye can not find subject / task](#bidsmreye-can-not-find-subject--task)
- [How I should structure my input data?](#how-i-should-structure-my-input-data)
- [Is the "prepare" only suitable for the datasets that have eye-tracking info?](#is-the-"prepare"-only-suitable-for-the-datasets-that-have-eye-tracking-info)
- [Is the "prepare" only suitable for the datasets that have eye-tracking info?](#is-the-prepare-only-suitable-for-the-datasets-that-have-eye-tracking-info)
- [Should I use the automatically generated methods section?](#should-i-use-the-automatically-generated-methods-section)

<a name="bidsmreye-can-not-find-subject--task"></a>
## bidsmreye can not find subject / task

Check the following things:

- Have you passed the correct path to your BIDS dataset?

This is one the most common errors,
that can very easily happen when working with a containerized version of bidsmreye

- Is your dataset a valid preprocessed fMRI BIDS dataset?

See [How I should structure my input data?](./faq.md#how-i-should-structure-my-input-data)

- Try to rerun your command with the `--reset-database` option for force bidsmreye to reindex your input dataset.

<a name="how-i-should-structure-my-input-data"></a>
## How I should structure my input data?

Expand Down Expand Up @@ -49,7 +66,7 @@ that the input dataset is a derivative dataset:
}
```

<a name="is-the-"prepare"-only-suitable-for-the-datasets-that-have-eye-tracking-info"></a>
<a name="is-the-prepare-only-suitable-for-the-datasets-that-have-eye-tracking-info"></a>
## Is the "prepare" only suitable for the datasets that have eye-tracking info?

No the `prepare` action is necessary for all datasets,
Expand Down

0 comments on commit 3ed83e5

Please sign in to comment.