Behavior and Neuroimaging Core User Manual
  • About
  • Infrastructure Overview
  • XNAT
    • Getting Started
    • Accessing XNAT
    • BIDS Ready Protocols
    • New XNAT projects
    • Uploading Data
    • Downloading Data
  • Demo Dataset
    • Introduction
    • How to access it
    • Protocol Information
    • Basic analysis example: checks task
  • XNAT to BIDS
    • Getting Started
    • XNAT2BIDS Software
    • Exporting to BIDS using Oscar
      • Oscar Utility Script
        • Running xnat2bids using default configuration
        • Running xnat2bids with a custom configuration
        • Syncing your XNAT project & Oscar data directory
        • Extra tools & features
      • Step-wise via Interact Session
    • BIDS Validation
      • Oscar
      • Docker
    • Converting non-MR data
      • Physiological data
      • EEG data
  • XNAT TO BIDS (Legacy)
    • Oscar SBATCH Scripts
  • BIDS and BIDS Containers
    • Introduction to BIDS
    • mriqc
    • fmriprep
    • BIDS to NIMH Data Archive (NDA)
  • Analysis Pipelines
    • Freesurfer
    • 🚧CONN Toolbox
    • FSL topup and eddy
    • Tractography: DSI Studio
    • Brown University MRS Data Collection and Preprocessing Protocol
    • LC Model
      • Installation
      • Example Run
      • Running LCModel on your own data
    • Quantitative Susceptibility Mapping (QSM)
  • Standalone Tools
    • Multi-session spectroscopy with voxalign
    • dicomsort: a tool to organize DICOM files
    • ironmap
    • convert enhanced multi-frame DICOMs to legacy single-frame
    • DICOM anonymization
  • MRF GUIDES
    • MRI simulator room
      • Motion Trainer: Balloon Task
      • Simulating scanner triggers
    • Stimulus display & response collection
    • Eyetracking at the scanner
    • Exporting data via scannershare
    • EEG in the scanner
    • Exporting spectroscopy RDA files
  • Community
    • MRF/BNC user community meetings
Powered by GitBook
On this page
  • Diff: Identify data on XNAT that is not yet on Oscar
  • Sync: export new XNAT data to a project on Oscar

Was this helpful?

  1. XNAT to BIDS
  2. Exporting to BIDS using Oscar
  3. Oscar Utility Script

Syncing your XNAT project & Oscar data directory

PreviousRunning xnat2bids with a custom configurationNextExtra tools & features

Last updated 8 months ago

Was this helpful?

This feature automates the export process by analyzing the existing projects in your data directory along with their associated subjects and sessions, and then identifies and fetches missing sessions that exist remotely on XNAT. The script will check the insertion date and time for every session in your XNAT project. If you have data on XNAT that is newer than the sessions in your project directory on Oscar, we can assume that the XNAT data needs to be pulled over to Oscar.

Diff: Identify data on XNAT that is not yet on Oscar

To get a report of any project data on XNAT that is not present in your data directory, use the --diff flag alongside the path to the root of your BIDS directory. This option will only produce a report, not perform the sync.

If you are passing in a configuration file where bids_root is defined, or if your data directory is ~/bids-export, there is no need to pass <BIDS_ROOT> as an argument alongside --diff.

python /oscar/data/bnc/scripts/run_xnat2bids.py --diff <BIDS_ROOT> 

Sync: export new XNAT data to a project on Oscar

To sync your data directory, use --update alongside the path to the root of your BIDS directory.

If you are passing in a configuration file where bids_root is defined, or if your data directory is ~/bids-export, there is no need to pass <BIDS_ROOT> as an argument alongside --update.

python /oscar/data/bnc/scripts/run_xnat2bids.py --update <BIDS_ROOT> 

NOTE: If you manually add resources or scan data to your project, XNAT will not automatically update the insertion date/time, so it will not be identified as new data that needs to be synced. If you would like to use the "sync" functionality on manually added data, you will need to update the date field in XNAT for the given session that you want to sync.

To do this:

  1. Open XNAT and navigate to the session page you would like to sync

  2. Select Edit from the Actions panel

  1. Update the "Date" field to the current date, or the date of manual change.

  1. Select "Submit" at the bottom of the page.