Skip to content

Configuration File

toujames edited this page Sep 2, 2020 · 6 revisions

config.json

Use the config.json to set configurations relating to your redcap project. The various configurations can be set as you desired.`

Example config.json file

{
    "bids_root": "/path/to/bids/root",
    "records"  : "",
    "events": {
        "event_1_arm_1" : "ses-t0"
    },
    "forms": {
        "anxiety_sensitivity_index_asi3" : {
            "label": "asi3"
        },
        "overall_anxiety_severity_and_impairment_scale_oasi": {
            "label": "oasis"
        },
        "inbody_test": {
            "label": "inbody"
        },
    }
}

"bids_root"

Setting this is where the script will store your output files.

"bids_root": "/path/to/bids/root",

The script will create a "phenotype" directory if it doesn't exists, and place, the configured tsv forms in this path. Using "phenotype" is bids compliant structure. SSee here

"records"

Sets the records to pull from.

"records"  : ["AAA", "BBB", "CCC"]

These records should match what is stored in the redcap project. If it is blank: "records" : "",, then it will export all subjects.

"events"

Events in the redcap project where it will only export.

"events": {
        "event_1_arm_1" : "ses-t0"
    }

Each event's key is the redcap_event_name. The value of the events is the session directory for bids output.

For example, all event_1_arm_1 related redcap event will be placed under 'ses-t0' directory in the bids dataset.

"forms"

The instrument id in the redcap project.

"forms": {
        "anxiety_sensitivity_index_asi3" : {
            "label": "asi3"
        },
        "overall_anxiety_severity_and_impairment_scale_oasi": {
            "label": "oasis"
        },
        "inbody_test": {
            "label": "inbody"
        },
    }

Each element is the unique forms id on the redcap project. And Element can have a "label" element that corresponds to how it will be saved in the phenotype directory. e.g label of "asi3" will be saved under /phenotype/asi3.tsv and the side car as: /phenotype/asi3.json

If it does not have a label, the original unique form id will be used.

If forms is blank:: e.g. "forms": "" than, it will export all forms in the redcap project. Labels will be the unqiue name and MeasurementToolMetadata Description will be the Instrument Name

Clone this wiki locally