Creating a project off of a file system structure


A common pattern for uploading data is off of a file system structure which encodes the name of the key elements in the hierarchy. Using a basic bash script, you can use ls and curl to build the corresponding XNAT hierarchy.

sample.file.system.JPG
Using the file system, we can derive that the subjects should be named SUB1 and SUB2. Furthermore, we can derive that the sessions should be named SUB1_MR1, SUB1_MR2, and SUB2_MR2.

The example implementation also allows the executor to add users to the new project. User email addresses can be included as comma-separated values.

Example Implementation:
./load-project-data.sh TEST_PROJECT /data/test/brik_example/TEST1 user1@address.org,user2@address.org