I tried running csv2nidm on this tsv file and got the following output:
Variable participant_id age sex handedness automatically mapped to participant/subject idenfier
Label: participant_id age sex handedness
Description: subject/participant identifier
Source Variable: participant_id age sex handedness
---------------------------------------------------------------------------------------
Creating NIDM file...
1: participant_id age sex handedness
Please select the subject ID field from the list above:
which is not what I want (it's representing all column headers as a single column), but when I converted the file to a csv, csv2nidm worked as expected.
According to the bids specification, phenotypic data should be represented as a tsv, so I think the default behavior of csv2nidm should handle a tsv.
or maybe some additional logic to try to guess the appropriate separator (or add a command-line option),
Depending on how important it is to not make backward-incompatible changes.
I tried running
csv2nidm
on this tsv file and got the following output:which is not what I want (it's representing all column headers as a single column), but when I converted the file to a csv,
csv2nidm
worked as expected. According to the bids specification, phenotypic data should be represented as a tsv, so I think the default behavior ofcsv2nidm
should handle a tsv.To change this behavior, I believe all that is needed is changing this line https://github.com/incf-nidash/PyNIDM/blob/2f48a8b6b7f72cd01ae65cc88f454c35cb68d587/nidm/experiment/tools/csv2nidm.py#L104
to:
or maybe some additional logic to try to guess the appropriate separator (or add a command-line option), Depending on how important it is to not make backward-incompatible changes.