Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty fields in participants.tsv #252

Closed
eurunuela opened this issue Jun 17, 2020 · 5 comments
Closed

Empty fields in participants.tsv #252

eurunuela opened this issue Jun 17, 2020 · 5 comments
Labels
Discussion Discussion of a concept or implementation. Need to stay always open.

Comments

@eurunuela
Copy link
Collaborator

This discussion is related to #244.

I'm opening this discussion because we should decide whether we want to have a "n/a" (not answered) field or if phys2bids should only write the subject id in participants.tsv. The "n/a" would "advice" the users they should be adding that info following BIDS guidelines.

So, there are two possible options here (feel free to add more):

  1. Only write subject ID and other fields provided in the YAML file.
  2. Write the three BIDS recommended fields as "n/a" when they're not provided in the YAML

I'd like to know what you think @smoia @vinferrer @tsalo @robertoostenveld

@eurunuela eurunuela added the Discussion Discussion of a concept or implementation. Need to stay always open. label Jun 17, 2020
@tsalo
Copy link
Member

tsalo commented Jun 17, 2020

I say we take our cue from heudiconv, which adds those columns (along with "group") and puts a n/a if the information is unavailable.

@smoia
Copy link
Member

smoia commented Jun 17, 2020

@marcelzwiers, what is the behaviour of BIDScoin?

@marcelzwiers
Copy link
Contributor

In Bidscoin I use the n/a value, like this (participants_table is a pandas dataframe):

    if participants_tsv.is_file():
        participants_table = pd.read_csv(participants_tsv, sep='\t')
        participants_table.set_index(['participant_id'], verify_integrity=True, inplace=True)
    else:
        participants_table = pd.DataFrame()
        participants_table.index.name = 'participant_id'

 [...]

participants_table.replace('','n/a').to_csv(participants_tsv, sep='\t', encoding='utf-8', na_rep='n/a')

@smoia
Copy link
Member

smoia commented Jul 2, 2020

Given that the two DICOM bidsifiers we're adopting as reference have a "n/a" value for missing field, I would do the same.
I think this is the current behaviour, right @eurunuela? If so, and there is no strong opinion against it, we can close this issue.

@eurunuela
Copy link
Collaborator Author

That's the current behavior. Closing the issue then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Discussion of a concept or implementation. Need to stay always open.
Projects
None yet
Development

No branches or pull requests

4 participants