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

Minor bug related to subject naming in GUID file #10

Open
mtnhuck opened this issue Jan 11, 2018 · 5 comments
Open

Minor bug related to subject naming in GUID file #10

mtnhuck opened this issue Jan 11, 2018 · 5 comments

Comments

@mtnhuck
Copy link
Contributor

mtnhuck commented Jan 11, 2018

The template suggests that files be formatted as SID - GUID. When I tried to do this (say for subject "sub-sid000001" and a file formatted as "sub-sid000001 - MYGUID", it won't find the subject, but if I remove the leading "sub-" it works just fine with a resulting file formatted as "sid000001 - MYGUID". Just a heads up if anyone else has the same problem.
Cheers
Jeremy

@chrisgorgo
Copy link
Contributor

That's surprising. How does your participants.tsv file look like? Does the dataset pass BIDS Validator https://github.com/INCF/bids-validator?

@mtnhuck
Copy link
Contributor Author

mtnhuck commented Jan 11, 2018

The only error I get is for 1 fieldmap file related to a missing "EchoTime1" and "EchoTime2", which may be corrupt, all other files check out. The participants.tsv is formatted as
participant_id age sex group
sub-sid000001 18 M control
...

@yarikoptic
Copy link
Collaborator

I think it is just reflection of a fact that SID is undefined in BIDS format. It has participant_label (e.g. sid000001) and participant_id (e.g. sub-sid000001). For the purpose of this mapping, it should be participant_label.

FWIW, this is how our constructed fake GUIDs mapping file looked (the one we with @mtnhuck used before) and the shell command we used to generate it. this one didn't cause any trouble to the script

(git)hopa:~datalad[master]NDA/uploads
$> head sid-to-GUID.map
sid000064 - GUID0000
sid000079 - GUID0001
sid000100 - GUID0002
sid000139 - GUID0003
sid000148 - GUID0004
sid000178 - GUID0005
sid000182 - GUID0006
sid000259 - GUID0007
sid000264 - GUID0008
sid000269 - GUID0009
2 18406.....................................:Thu 11 Jan 2018 05:27:04 PM EST:.
(git)hopa:~datalad[master]NDA/uploads
$> k=0; for f in */sub-sid000*; do echo $f | sed -e 's,.*-,,g'; done | uniq | while read sid; do echo "$sid - GUID000$k"; k=$(($k + 1)); done >| sid-to-GUID.map

@mtnhuck
Copy link
Contributor Author

mtnhuck commented Jan 11, 2018

Thanks to both of you on this. Its doesn't seem like a big deal given the easy workaround I had.
Cheers
J

@chrisgorgo
Copy link
Contributor

So I guess there is a mistake in the readme?

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

No branches or pull requests

3 participants