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

csv2nidm -json_map #312

Open
maegancalvert opened this issue Apr 22, 2022 · 11 comments
Open

csv2nidm -json_map #312

maegancalvert opened this issue Apr 22, 2022 · 11 comments

Comments

@maegancalvert
Copy link

I am running into a problem using csv2nidm. I created a json file from a csv file. My python code to use csv2nidm:

os.system('csv2nidm -csv /workspace/code/2022project-semanticcbcl/SemanticCBCL/NDA_Dictionaries/abcd_cbcl01_definitions.csv
-json_map /workspace/code/2022project-semanticcbcl/SemanticCBCL/NDA_Dictionaries/abcd_cbcl01_definitions.json
-out /workspace/code/2022project-semanticcbcl/SemanticCBCL/NDA_Dictionaries/abcd_cbcl01_definitions_outfile.json')

I can't get it to read the json file so it will only ask me the necessary concept prompts - it reads the CSV file and tries to take me through all the prompts, but the json file has many of the answers to the prompts. I can not run csv2nidm without the -csv CSV FILE. Does anyone have any thoughts?

@satra
Copy link
Contributor

satra commented Apr 26, 2022

@dbkeator - any thoughts on this?

@dbkeator
Copy link
Contributor

Hi, I would need to see the json file and the csv files if possible.
Thanks

@dnkennedy
Copy link

The csv would be like the one at https://github.com/ReproNim/SemanticCBCL/blob/main/fake_Data/abcd_cbcl01_simdata.txt. Will let someone else provide the example json file...

@satra
Copy link
Contributor

satra commented Apr 26, 2022

@dbkeator
Copy link
Contributor

@satra That JSON file isn't of the supported pynidm or BIDS forms. It's something else so if it's used directly in csv2nidm it don't recognize it....

@maegancalvert
Copy link
Author

maegancalvert commented Apr 27, 2022 via email

@dnkennedy
Copy link

So, how do we proceed with this? Convery satra's json to pynidm json? Or teach pynidm to read another json version?

@satra
Copy link
Contributor

satra commented Apr 27, 2022

i suggest we write a few headings using csv2nidm and mimic it when we merge all our items.

@satra
Copy link
Contributor

satra commented Apr 27, 2022

more generally, pynidm should inform the user why the json file is not being used. i.e. something like couldn't find appropriate keys or keys containing appropriate fields.

@dnkennedy
Copy link

Regarding an 'example run' to generate json we can mimic, if someone gets to that before me, please post it in the SemanticCBCL Slack!

@dbkeator
Copy link
Contributor

Will add a message to both csv2nidm and bidsmri2nidm to indicate the JSON file supplied isn't of the appropriate format...

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

4 participants