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

README.md missing usage #2

Open
ericearl opened this issue May 18, 2019 · 6 comments
Open

README.md missing usage #2

ericearl opened this issue May 18, 2019 · 6 comments

Comments

@ericearl
Copy link

Just noticing that the README.md is missing a usage section. It jumps right from "what is ..." to example inputs and outputs. The usage printed out by python nda_manfests.py -h is not in there. The README.md is also missing example command-line call usage examples.

I would assume this is a critical piece of information for less python-experienced folks and even some more experienced users.

@mschendel
Copy link

example command lines would be so helpful! I am currently stuck trying to figure this out

@ericearl
Copy link
Author

ericearl commented Jan 8, 2024

@mschendel Here's an example of my usage:

python nda_manifests.py -id outputs/sub-SUBJECT/ses-SESSION -of sub-SUBJECT_ses-SESSION_manifest.json

@mschendel
Copy link

Thank you! I wouldn't have thought to try this from terminal command line.

Is there a way to use this module within a python script?
Eg
import nda_manifests
nda_manifests('-id outputs/sub-SUBJECT/ses-SESSION', '-of sub-SUBJECT_ses-SESSION_manifest.json')

I can't get the syntax right and I have a bunch of subject directories I'd like to create manifests for. (I know I could create one manifest for the parent directory of the subjects, but the archive submission requires a separate manifest per each subject, as far as I understand).

@mschendel
Copy link

In case anyone ever comes looking for use inside a python terminal or script:

import nda_manifests
new_manifest = nda_manifests.Manifest() # initialize object
new_manifest.create_from_dir('/path/for_directory' ) # creates manifest data object
new_manifest.output_as_file('/path/filename_manifest.json') # writes manifest json outpu

@ericearl
Copy link
Author

ericearl commented Jan 8, 2024

If you are creating data to upload to the NDA, I recommend you maybe take a look at the NDA BIDS Upload tools we designed when I was in the DCAN Labs. I think they are still in use there and they wrap the file-mapper and this manifest-data repos together into a bigger tool.

@mschendel
Copy link

Thank you. I am working on prepping the MEG part of the upload. This looks extremely helpful!

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

2 participants