MRI’s database benchmark 18.09.2019 ALMG
Downloading OASIS-3 (OASIS Brains Datasets) from Xnat Step 1: Click on the following link to open Xnat
https://central.xnat.org/app/template/XDATScreen_report_xnat_projectData.vm/search_element/xnat:projectData/s earch_field/xnat:projectData.ID/search_value/OASIS3
Step 2: Register in Xnat
https://central.xnat.org/app/template/Register.vm
Step 3: Request access to all of the OASIS-Brains datasets and agree to all of their terms
https://www.oasis-brains.org/
Wait a day or two for your approval :)
Downloading OASIS-3 (OASIS Brains Datasets) from Xnat Now you can log in! :)
Downloading OASIS-3 (OASIS Brains Datasets) from Xnat Step 4: Enter Oasis-brains.org, scroll down and click under the Get Data subtheme on “Scripted Download Instructions” (SDS). Click on the Github link.
https://www.oasis-brains.org/
https://github.com/NrgXnat/oasis-scripts
Step 4.1: Creating a Spreadsheet CSV from XNAT Central: a.) Click on Browse Oasis Data.
https://central.xnat.org/app/template/XDATScreen_report_xnat_projectData.vm/search_element/x nat:projectData/search_field/xnat:projectData.ID/search_value/OASIS3
Downloading OASIS-3 (OASIS Brains Datasets) from Xnat b.)Click on OASIS3 → “Add Tab” → MR Sessions (in our case) → then click on options → Spreadsheet and download the CSV file (In Windows it will be downloaded as an Excel file).
https://central.xnat.org/app/template/XDATScreen_report_xnat_projectData.vm/search_element/xnat:project Data/search_field/xnat:projectData.ID/search_value/OASIS3
Downloading OASIS-3 (OASIS Brains Datasets) from Xnat c.) Delete all the columns, but the one with the MR ID’s. Delete the titles as well! :)
Before :)
Midway :) Save it with any name you like :). In my case it will be: D.csv
Almost final document :)
Downloading OASIS-3 (OASIS Brains Datasets) from Xnat
We are going to do this step later, after installing and setting MobaXTerm. *For Windows users.
Downloading OASIS-3 (OASIS Brains Datasets) from Xnat Step 4.2: Download the Github Oasis script and Unzip it! :) (I downloaded it to a folder called “Defying gravity” on my Desktop).
https://github.com/NrgXnat/oasis-scripts
Folder or directory break!
The OASIS github repository includes the following scripts:
You should save your CSV file (in my case the D.csv) in the same folder where the script is. E.g., both download_oasis_scans_wget.sh and D.csv should be in the same folder. My path is: C:\Users\admin\Desktop\DefyingGravity\ OASIS\oasis-scripts-master
Downloading OASIS-3 (OASIS Brains Datasets) from Xnat Scripts time!
https://github.com/NrgXnat/oasis-scripts
download_oasis_scans.sh → works on Linux or Mac; you should have the zip program installed. download_oasis_scans_tar.sh → works with MobaXTerm (Windows if you do not have the zip program installed on your machine). download_oasis_scans_wget.sh → Both, Windows and Linux, in case you start getting the “curl” error.
Step 5: Open a terminal window (on Mac) or Command line (on PC/Linux) ● For Mac: You can use Terminal. ● For Windows: download the MobaXTerm terminal system. MobaXTerm: I downloaded the Portable Home Edition (MobaXterm Home Edition v10.9), and saved it and unzipped it in my Downloads Folder.
https://mobaxterm.mobatek.net/download.htm
Downloading OASIS-3 (OASIS Brains Datasets) from Xnat 5.1 Open MobaXterm and click on Settings
5.2 Add your Persistent home directory In my case: _DesktopDir_\DefyingGr avity\OASIS\oasis-script s-master
5.3 Start your local terminal
5.4 Write your commands! :) 5.4 a.) Formatting your .csv file. 5.4 b.) Downloading the OASIS-3 scans.
5.4a This step will add the Unix format to your .csv file ● ●
tr -d '\r' < myfile.csv > myfile_unix.csv tr -d '\r' D1.csv *This is the name I wanted to give to the new formatted .csv file. Do not delete the “” signs.
5.4b ./download_oasis_scans_wget.sh ./download_oasis_scans_wget.sh D1.csv muriel Anafab93 T1w *I chose the wget script because of the curl error; my input file is the D1.csv; in directory name I wrote the name of the folder I wanted to create to save the files, in this case “muriel”; Anafab93 is my username + I only wanted to download T1w scans.
A brief review of inputs and scan types Required inputs: ./download_oasis_scans.sh
● ●
https://github.com/NrgXnat/oasis-scripts#downloading-mr-and-pet-scan-files https://github.com/NrgXnat/oasis-scripts#download_oasis_scanssh
●
- A Unix formatted, comma-separated file containing a column for experiment_id (e.g. OAS30001_MR_d0129) → D.csv
●
- A directory path (relative or absolute) to save the scan files to. If this directory doesn't exist when you run the script, it will be created automatically. → muriel
● - Your XNAT Central username used for accessing OASIS data on central.xnat.org (you will be prompted for your password before downloading) → Anafab93 ●
- (Optional) The scan type of the scan you want to download. (e.g. T1w, angio, bold, fieldmap, FLAIR) You can also enter multiple scan types separated by a comma with no whitespace (e.g. T2w,swi,bold). Without this argument, all scans for the given experiment_id will be downloaded. → T1w
https://github.com/NrgXnat/oasis-scripts#list-of-available-scan-type-names List of available scan type names
When entering scan_type into your script, use any of the following names: angio, asl, bold, dwi, fieldmap, FLAIR, GRE, minIP, swi, T1w, T2star, T2w For more information on these scan types, see the OASIS Imaging Data Dictionary
Main references GitHub NrgXnat/oasis-scripts. (2018, September 7). NrgXnat/oasis-scripts. Retrieved September 18, 2018, from https://github.com/NrgXnat/oasis-scripts#list-of-available-scan-type-names Mobatek. (n.d.). MobaXterm free Xserver and tabbed SSH client for Windows. Retrieved September 18, 2018, from https://mobaxterm.mobatek.net/ Open Access Series of Imaging Studies. (n.d.). OASIS Brains. Retrieved September 18, 2018, from https://www.oasis-brains.org/ XNAT. (n.d.). CENTRAL. Retrieved September 18, 2018, from https://central.xnat.org/app/template/XDATScreen_report_xnat_projectData.vm/search_element/xnat:projectData/search_field/xnat:pr ojectData.ID/search_value/OASIS3
I hope this little tutorial may help you :) Ana Further questions:
[email protected] Thank you for your help and suggestions: Diego, Angus, Astrid, Jorge, Gris and Lars.