DataExport: Difference between revisions
From SpinozaWiki
Line 58: | Line 58: | ||
=== Remote access === | === Remote access === | ||
[[File: | [[File:FileZilla connect.png|600px|frameless|right|FileZilla connection window]] | ||
At this point, you will have access to the PAR-REC files over sFTP (connect to host sftp://minerva.spinozacentre.nl with your Spinoza credentials), and can download them to your own computer for further processing. We recommend using [https://filezilla-project.org FileZilla] for this. After downloading and installing it, fill out '''Host''' (sftp.spinozacentre.nl), '''Username'''. '''Pasword''' and '''Port''' (22). A window will open, in which you can enter the minerva URL and your credentials, including the ssh key file you use to connect to the spinoza servers using ssh (sftp is file transfer over ssh). You can click these user interface pictures for a larger view. | At this point, you will have access to the PAR-REC files over sFTP (connect to host sftp://minerva.spinozacentre.nl with your Spinoza credentials), and can download them to your own computer for further processing. We recommend using [https://filezilla-project.org FileZilla] for this. After downloading and installing it, fill out '''Host''' (sftp.spinozacentre.nl), '''Username'''. '''Pasword''' and '''Port''' (22). A window will open, in which you can enter the minerva URL and your credentials, including the ssh key file you use to connect to the spinoza servers using ssh (sftp is file transfer over ssh). You can click these user interface pictures for a larger view. | ||
After FileZilla has connected to Minerva, you will see the following window, with your own system on the left and the remote Minerva files on the right. You will be able to find your files on Minerva at <code>/chroot/projects/PI_project_name</code>. Downloads can be initiated by selecting files/folders in the bottom, right panel and dragging them to a location on your own computer, listed on the left. | After FileZilla has connected to Minerva, you will see the following window, with your own system on the left and the remote Minerva files on the right. You will be able to find your files on Minerva at <code>/chroot/projects/PI_project_name</code>. Downloads can be initiated by selecting files/folders in the bottom, right panel and dragging them to a location on your own computer, listed on the left. | ||
Revision as of 15:26, 8 November 2022
About data export
Imaging data acquired on the MRI scanners at the Spinoza Centre are transferred to a local ftp-server in the par/rec format. The data can subsequently be accessed (from within and outside the Centre).
If you use standard fMRI sequences (Standard_sequences_@_3T), data will be automatically converted to Nifti, formatted in BIDS, and a standard quality assessment will be run. These processes will run automatically every night.
If you start a new protocol and are interested in using these standard sequences (or minor variations thereof) and the automatic processing pipelines, please contact Tomas Knapen. For this, please adhere to the naming conventions described in the Naming acquisitions page.
Exporting data
Using PAR/REC files
The standard Philips format for exporting MRI images is the PAR/REC file pair. The pair consists of a PAR file (a plain text file that contains the parameters/metadata of the scan), and the REC file (a binary file that contains the raw image data). This format is different from the DICOM file format in several ways;
- It is a single file pair even for fMRI acquisitions, not many separate files as in DICOM files,
- It contains slightly less meta-data than dicom files, and importantly for Spinoza,
- Its export is implemented much more robustly on Philips, and important for this wiki page:
- It is not exported (reaped) automatically like DICOM files, meaning that this has to be done manually.
This page shows you how to perform this manual export of your data.
When you go this route, please disable the "autopush to workstation" in your sessions, as simultaneous export of PAR/REC and DICOMs will slow your exports to a craw.
Where to store your data
First, you export your files to a local drive, and then copy the exported files to the server. On both these drives you will have access to a project folder, and this folder is named according to the project under which you are scanning at Spinoza. The workflow is as follows:
Export to local drive project folder -> Copy to server project folder

Inside these projects folder, we propose you follow the following structure to ensure easy conversion and archiving of your data. In the example below the project is called knapen_FAM, and this folder would exist both on W:\ (local export drive), and Z:\projects (spinoza server drive)
The folder structure you would follow inside your project folder would look like so:
The sub-folders for bids and mriqc are there for the data after it's converted to BIDS format (see below), and for the standard quality-control we'll be running on all of your data automatically.
The present document centers on MRI data, and a similar route can be taken for physiology (cardiac and breathing signals). If you simultaneously acquire behavioral, eye tracking, or other experimental data such as dataglove outputs, you can copy these directly to the session's folder on the server, next to the PAR/REC files.
Exporting your data
In the scanner software interface, select ‘Administration’ from the File menu up top. This will pop up the interface window in the figure. It contains a list of folders, one for each session. You can click the sessions to expand the view, and have it show the different acquisitions, as shown in the example screenshot. In this interface, you select the acquisitions you want to export – in the example, acquisitions 4 to 8 are selected for subsequent export. Now, click the ‘Disk Files’ button at the bottom, in the middle, here outlined with a green rectangle.

This will pop up an interface from which you can export data to disk, shown here in 3 iterations from left to right. This window will open to a “Dicom Export” tab (left), but we want “Non Dicom Export”. Click that tab.

First, select where you want to save your data. Click “Browse”. If the required folder (according to the folder structure outlined above) doesn’t exist yet, create it in the right place. Select the folder in which your PAR/REC data should be put. Then, select how and which data format to export. Select the “Use Scan Name” and the “Sort” tick options. Deselect the “XML-REC” and “Nifti” options, and select the “PAR-REC” option. Click Proceed to export the data to the selected folder. You can follow the progress of your export by clicking the “Manage Job Queue” button, outlined in red above.
Copying your data to the projects folder on the server
After the PAR/REC export has finished (and it will finish much, much faster than equivalent DICOM exports!), you’ll need to copy the new folder/files to your project folder on the server. The easiest way to do this is to use the Windows file explorer, to copy-paste the new folder from the W:\ drive to the Z:\projects folder. Make sure to maintain the same folder structure in the projects folder on the server as exists on the local export drive W:\.
Remote access
At this point, you will have access to the PAR-REC files over sFTP (connect to host sftp://minerva.spinozacentre.nl with your Spinoza credentials), and can download them to your own computer for further processing. We recommend using FileZilla for this. After downloading and installing it, fill out Host (sftp.spinozacentre.nl), Username. Pasword and Port (22). A window will open, in which you can enter the minerva URL and your credentials, including the ssh key file you use to connect to the spinoza servers using ssh (sftp is file transfer over ssh). You can click these user interface pictures for a larger view.
After FileZilla has connected to Minerva, you will see the following window, with your own system on the left and the remote Minerva files on the right. You will be able to find your files on Minerva at /chroot/projects/PI_project_name
. Downloads can be initiated by selecting files/folders in the bottom, right panel and dragging them to a location on your own computer, listed on the left.
But we also provide an automatic data conversion and quality control service. For that, see below.
Automatic processing at Spinoza
Setup
The conversion is flexible, so when you start a project you should get in touch with Tomas to set up the conversion for your specific project.
The conversion is specified by a .yml file, a plain text file that contains the text bidsify should search for to identify certain types of scans, and the rules bidsify should use to convert those scans to valid BIDS data.
This .yml file will be stored in the root of your project folder on the server.
During the night after your scans, our server will go through your project folder and identify newly acquired data. It will then attempt to automatically convert your data to BIDS format. The goal is to also automatically run quality control analyses on all acquired data in the near future.
BIDS conversion
We are implementing a system that automatically converts Spinoza-acquired data to BIDS format. This format allows easy archiving and preprocessing of your Spinoza data. To learn more about the BIDS format, see the BIDS website.
We'll be using the automatic conversion tool bidscoin, developed at the Donders Centre. Its successful use depends on your using specific names for your runs in the scanner console (see the Naming acquisitions page page), and on using the standard (f)MRI sequences we provide at Spinoza. Please contact Tomas over email or Zulip for setting up your project and its automatic conversion to BIDS.
Quality Assessments
Once your automatic conversion has been set up, it will be run every night and followed up with a standard quality control using a tool called MRIQC. To learn more about interpreting its outputs, please follow this link.