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

Repeated/missing contrast info when converting sleuth file to dict #799

Open
yifan0330 opened this issue May 8, 2023 · 5 comments
Open
Labels
bug Issues noting problems and PRs fixing those problems.

Comments

@yifan0330
Copy link
Contributor

yifan0330 commented May 8, 2023

Summary

When using nimare.io.convert_sleuth_to_dataset, I found that if there're repeated contrast info (or missing contrast info which is represented as \\ Auther here) for multiple contrasts, it's recognised as one contrast and repeatedly overwritten by the contrast appearing later. Personally, I think maybe appending data from repeated contrasts as one contrast might be a more reasonable option.

@yifan0330 yifan0330 added the bug Issues noting problems and PRs fixing those problems. label May 8, 2023
@tsalo
Copy link
Member

tsalo commented May 8, 2023

@yifan0330 can you share an example text snippet? Also, is this file directly from Sleuth, or curated manually in the Sleuth style?

@yifan0330
Copy link
Contributor Author

yifan0330 commented May 9, 2023

@tsalo I came across this issue with a dataset that Angie shared with me, the dataset doesn't contain any specific contrast info and refer it as \\Auther here, here's an example text snippet,

//Reference=Talairach
//Author here
//Subjects=9
-14.832100 -28.597500 -9.493200
-23.061100 -16.852500 -13.924800
10.146500 -31.521900 -9.347700
29.665700 -11.797800 -9.851400

//Author here
//Subjects=9
-28.634500 -11.495400 -10.809000
29.644100 -20.182200 -10.646100

//Author here
//Subjects=42
-25.801300 -2.864100 -12.645900
26.875700 -3.660300 -6.425100

//Author here
//Subjects=24
-23.060500 -3.139800 -9.923100
24.170300 -3.123300 -11.825100

//Author here
//Subjects=42
-25.801300 -2.864100 -12.645900
24.177500 -0.328500 -11.560200 ``

when converted into dataset, it was repeatedly overwritten and only data from the last contrast was kept.

@tsalo
Copy link
Member

tsalo commented May 9, 2023

TBH that seems more like a noncompliant Sleuth file, rather than an issue with NiMARE's ingestion, but I'll defer to others' opinions on this.

@yifan0330
Copy link
Contributor Author

I see! Just curious, is it possible to find repeated contrast info in a sleuth file?

@tsalo
Copy link
Member

tsalo commented May 9, 2023

In an official Sleuth file, I believe that different contrasts from the same study would have different metadata. Something like this:

//Reference=Talairach
//Author1 2023; Contrast 1 Name
//Subjects=9
-14.832100 -28.597500 -9.493200
-23.061100 -16.852500 -13.924800
10.146500 -31.521900 -9.347700
29.665700 -11.797800 -9.851400

//Author1 2023; Contrast 2 Name
//Subjects=9
-28.634500 -11.495400 -10.809000
29.644100 -20.182200 -10.646100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues noting problems and PRs fixing those problems.
Projects
None yet
Development

No branches or pull requests

2 participants