Skip to content

[BEP036] Tabular phenotype example datasets#465

Open
Arshitha wants to merge 45 commits into
bids-standard:masterfrom
Arshitha:master
Open

[BEP036] Tabular phenotype example datasets#465
Arshitha wants to merge 45 commits into
bids-standard:masterfrom
Arshitha:master

Conversation

@Arshitha

@Arshitha Arshitha commented Aug 29, 2024

Copy link
Copy Markdown

Added pheno001 and pheno002 example dataset inspired by ds004215 on OpenNeuro but significantly modified to keep it simple and easy to convey the various use cases proposed in BEP036.

Use cases covered (and to be added to this PR):

  • pheno001 - Single session with both phenotype and imaging data
  • pheno002 - Two sessions with one imaging data only session
  • pheno003 - Two sessions with one phenotype data only session
  • pheno004 - Two sets of sessions. One set of sessions (e.g. screening, baseline, followup, etc) for phenotype data and another set of sessions (e.g. 01, 02, etc) for imaging data.

Still in draft state but would appreciate any and all feedback.

Pinging co-contributors: @ericearl @SamGuay @surchs

@Arshitha Arshitha marked this pull request as draft August 29, 2024 21:20

@ericearl ericearl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks! I'm guessing you left it in draft state becausew of pheno001 and pheno002, right?

I think we should remove the age_at_visit column/field from all phenotype/ measurement tools and instead provide a root-level sessions file with that field. Should we maybe take that a step farther and RECOMMEND or say it's OPTIONAL to add age to the sessions file?

@Arshitha

Copy link
Copy Markdown
Author

I like that idea. It's redundant information that can be aggregated to sessions level, and can be a recommendation in the BEP.

@Arshitha

Copy link
Copy Markdown
Author

It's in Draft state because I haven't prepared pheno003 and pheno004 but yes, all four example datasets will violate the contribution guidelines.

Comment thread pheno001/phenotype/ace.tsv
Comment thread pheno001/participants.json Outdated
Comment thread pheno001/participants.tsv Outdated
Comment thread pheno002/sessions.json Outdated
Comment thread pheno002/sessions.tsv Outdated
Comment thread pheno003/sessions.json Outdated
Comment thread pheno003/sessions.tsv Outdated
Arshitha and others added 4 commits August 30, 2024 15:59
Co-authored-by: Eric Earl <eric.earl@nih.gov>
Co-authored-by: Eric Earl <eric.earl@nih.gov>
Co-authored-by: Eric Earl <eric.earl@nih.gov>
Co-authored-by: Eric Earl <eric.earl@nih.gov>
@christinerogers

christinerogers commented Oct 24, 2024

Copy link
Copy Markdown

Got a question from @dominikwelke --

Could this PR include an example showing how to represent multiple runs from one participant-session?

@ericearl mentioned today this is easily done by adding a run column in the .tsv, would be nice to see illustrated and mentioned here.

- All participants.tsv files have been simplified.
- pheno004 has become instead an example of some imaging-only, some phenotype-only, and some with both data
@ericearl

ericearl commented Feb 6, 2025

Copy link
Copy Markdown
Contributor

I hijacked the not yet created pheno004 for use with some current bids-validator testing needs at bids-standard/bids-specification#2044. Can we make this a non-draft PR and get it merged hopefully? @effigies @Arshitha @SamGuay @surchs

@effigies

effigies commented Feb 6, 2025

Copy link
Copy Markdown
Contributor

Please set the BIDS_SCHEMA environment variable to https://bids-specification--2044.org.readthedocs.build/en/2044/schema.json here:

run: echo BIDS_SCHEMA=https://bids-specification.readthedocs.io/en/latest/schema.json >> $GITHUB_ENV

Please also add pheno004 to be skipped on legacy and stable:

- name: Skip legacy validation for post-legacy datasets
run: for DS in mrs_* dwi_deriv; do touch $DS/.SKIP_VALIDATION; done
if: matrix.bids-validator == 'legacy'
shell: bash

- name: Skip stable validation for datasets with unreleased features
run: for DS in dwi_deriv; do touch $DS/.SKIP_VALIDATION; done
if: matrix.bids-validator != 'dev'
shell: bash

@ericearl

ericearl commented Feb 6, 2025

Copy link
Copy Markdown
Contributor

@effigies Is that comment just above here a note for me? I'm confused by most of it and don't feel safe editing those files as-is. If you need me to take care of that, can I sit with you, Ross, or Nell to figure it out or have it explained to me enough to be able to do the work?

@effigies

effigies commented Feb 6, 2025

Copy link
Copy Markdown
Contributor

Okay, I did what I asked. It looks like there are issues in the schema that need to be addressed, but also there are unrelated issues in pheno001-003: https://github.com/bids-standard/bids-examples/actions/runs/13188395001/job/36815880378?pr=465

@ericearl

ericearl commented Feb 7, 2025

Copy link
Copy Markdown
Contributor

This is super-helpful @effigies, thank you! I'm bringing the errors out of the logs here for us (@Arshitha @SamGuay @surchs):

# pheno001

	[ERROR] MISSING_DATASET_DESCRIPTION A dataset_description.json file is required in the root of the dataset
		

	Please visit https://neurostars.org/search?q=MISSING_DATASET_DESCRIPTION for existing conversations about this issue.

	[ERROR] JSON_INVALID Not a valid JSON file.
		/sub-01/anat/sub-01_T1w.json
		/sub-01/anat/sub-01_T1w.json

		2 more files with the same issue

	Please visit https://neurostars.org/search?q=JSON_INVALID for existing conversations about this issue.

# pheno002

	[ERROR] MISSING_DATASET_DESCRIPTION A dataset_description.json file is required in the root of the dataset
		

	Please visit https://neurostars.org/search?q=MISSING_DATASET_DESCRIPTION for existing conversations about this issue.

	[ERROR] TSV_COLUMN_ORDER_INCORRECT Some TSV columns are in the incorrect order
		session_id
		/sessions.tsv - Column 0 (starting from 0) found at index 1.

	Please visit https://neurostars.org/search?q=TSV_COLUMN_ORDER_INCORRECT for existing conversations about this issue.

	[ERROR] TSV_INDEX_VALUE_NOT_UNIQUE An index column(s) was specified for the tsv file and not all of the values for it are unique.
		/sessions.tsv - Row: 4, Value: 01
		/sessions.tsv - Row: 5, Value: 02

	Please visit https://neurostars.org/search?q=TSV_INDEX_VALUE_NOT_UNIQUE for existing conversations about this issue.

	[ERROR] JSON_INVALID Not a valid JSON file.
		/sub-01/ses-01/anat/sub-01_ses-01_T1w.json
		/sub-01/ses-01/anat/sub-01_ses-01_T1w.json

		6 more files with the same issue

	Please visit https://neurostars.org/search?q=JSON_INVALID for existing conversations about this issue.

# pheno003

	[ERROR] MISSING_DATASET_DESCRIPTION A dataset_description.json file is required in the root of the dataset
		

	Please visit https://neurostars.org/search?q=MISSING_DATASET_DESCRIPTION for existing conversations about this issue.

	[ERROR] TSV_COLUMN_ORDER_INCORRECT Some TSV columns are in the incorrect order
		session_id
		/sessions.tsv - Column 0 (starting from 0) found at index 1.

	Please visit https://neurostars.org/search?q=TSV_COLUMN_ORDER_INCORRECT for existing conversations about this issue.

	[ERROR] TSV_INDEX_VALUE_NOT_UNIQUE An index column(s) was specified for the tsv file and not all of the values for it are unique.
		/sessions.tsv - Row: 4, Value: baseline

	Please visit https://neurostars.org/search?q=TSV_INDEX_VALUE_NOT_UNIQUE for existing conversations about this issue.

	[ERROR] JSON_INVALID Not a valid JSON file.
		/sub-01/ses-baseline/anat/sub-01_ses-baseline_T1w.json
		/sub-01/ses-baseline/anat/sub-01_ses-baseline_T1w.json

		2 more files with the same issue

	Please visit https://neurostars.org/search?q=JSON_INVALID for existing conversations about this issue.

@Arshitha

Copy link
Copy Markdown
Author

@ericearl pheno006 example dataset is ready for your review! It's an example where a sessions file won't add any value.

Comment thread pheno006/README.md Outdated
Co-authored-by: Eric Earl <eric.earl@nih.gov>
@Arshitha

Copy link
Copy Markdown
Author

@ericearl I've committed the suggested change! do we need anything else for approval by a maintainer?

@ericearl

Copy link
Copy Markdown
Contributor

We need a couple more things:

  1. The bids-validator needs to be able to manage optional columns in the initial_columns list
  2. We need to try to trigger all of our bids-validator warnings and errors present in the schema upon AdditionalValidation

Perhaps we should draft a test plan doc and execute it?

@christinerogers

Copy link
Copy Markdown

can we add "phenotypic" or "pheno" in this PR title so that at a glance it's clear 🙏 @ericearl

@ericearl ericearl changed the title [BEP036] Example datasets [BEP036] Tabular phenotype example datasets Nov 20, 2025
@ericearl

Copy link
Copy Markdown
Contributor

can we add "phenotypic" or "pheno" in this PR title so that at a glance it's clear 🙏 @ericearl

Title changed. Thanks for the suggestion!

ericearl and others added 2 commits January 23, 2026 09:03
@yarikoptic

Copy link
Copy Markdown
Contributor

FTR -- I edited PR description to point to the BIDS PR to facilitate validation of the examples against that BEP. Note that there are conflicts now in that workflow (as one of the aspects -- no need to hardcode/patch for the BIDS PR now).

Comment thread .github/workflows/validate_datasets.yml Outdated
- name: Skip legacy validation for post-legacy datasets
run: for DS in mrs_* dwi_deriv pet006 pheno004 volume_timing; do touch $DS/.SKIP_VALIDATION; done
run: for DS in mrs_* dwi_deriv pet006 pheno00* volume_timing; do touch $DS/.SKIP_VALIDATION; done
if: matrix.bids-validator == 'legacy'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validation against legacy was dropped, so I guess all changes to the workflow could be just dropped

Comment thread pheno006/README.md Outdated
Comment thread pheno001/phenotype/tool-ACE_phenotype.json
Comment thread pheno002/phenotype/tool-ACE_phenotype.json
Comment thread pheno003/phenotype/tool-ACE_phenotype.json
Comment thread pheno005/phenotype/tool-ACE_phenotype.json
Comment thread pheno006/phenotype/tool-ACE_phenotype.json
ericearl and others added 2 commits February 24, 2026 13:42
Updates thanks to Ross taking a look at the AdditionalValidation vs the current bids-examples. Thanks Ross!
{
"MeasurementToolMetadata": {
"Description": "Adverse Childhood Experience Questionnaire for Adults"
},

@yarikoptic yarikoptic Apr 2, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we doing that fun dance again of mixing in description of columns and additional metadata?

All of that could be avoided if we followed somewhat established approach for any {entity} to have an {entity_plural}.tsv which would have description per each value of that entity. So here if it was e.g. pheno-ace.{tsv,json} and then phenotype.tsv (at top level of within phenotype/ folder -- doesn't matter due to Inheritance principle) with phenotype_id and description columns -- everything would have been nice and consistent.

I really do not get why there is ongoing brewing of some non-BIDS-like cocktail in BEP036.

Related issues backrefs:

ericearl and others added 2 commits June 23, 2026 11:27
Updated to satisfy the new IndexColumns requirement for tabular phenotypic and assessment data.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants