cluster-file_transfer
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| cluster-file_transfer [2026/09/03 10:54] โ gabriele | cluster-file_transfer [2026/09/03 12:58] (current) โ gabriele | ||
|---|---|---|---|
| Line 27: | Line 27: | ||
| - | ==== Examples: ==== | + | ==== Example 1: ==== |
| Suppose you need to download a dataset from a website that does not require a data sharing agreement and is a simple browser-based download, like [[https:// | Suppose you need to download a dataset from a website that does not require a data sharing agreement and is a simple browser-based download, like [[https:// | ||
| Line 35: | Line 35: | ||
| - Enter your username: gabriele (for your it's the name Jonas gave you, most likely first letter of your name + your surname) | - Enter your username: gabriele (for your it's the name Jonas gave you, most likely first letter of your name + your surname) | ||
| - Enter your password: **** (the one Jonas gave you to connect the first time, which need to be changed at first login) | - Enter your password: **** (the one Jonas gave you to connect the first time, which need to be changed at first login) | ||
| - | - Once connected, click on the World on the bar at the bottom of the screen. This will open a Firefox webpage | + | - Once connected, click on the World icon on the bar at the bottom of the screen. This will open a Firefox webpage |
| - Search your dataset page like you'd do it normally on your browser | - Search your dataset page like you'd do it normally on your browser | ||
| - Locate your dataset. | - Locate your dataset. | ||
| Line 57: | Line 57: | ||
| Once you have downloaded all your data, created your folder structure and potentially tested some analyses, you can pull the data from psychp01 for storage and additional analyses. | Once you have downloaded all your data, created your folder structure and potentially tested some analyses, you can pull the data from psychp01 for storage and additional analyses. | ||
| - | === To move the data from the " | + | == To move the data from the " |
| Suppose you have saved all your data on the " | Suppose you have saved all your data on the " | ||
| - Establish an ssh connection with pyshcp01 via the terminal (see [[cluster-access# | - Establish an ssh connection with pyshcp01 via the terminal (see [[cluster-access# | ||
| Line 69: | Line 69: | ||
| - | **Warning** | + | **WARNING** |
| Remember: the " | Remember: the " | ||
| + | |||
| + | |||
| + | |||
| + | ==== Example 2: ==== | ||
| + | |||
| + | Suppose you need to download a dataset that **cannot** be downloaded by simply clicking a link in the browser, because it is hosted on a repository that uses '' | ||
| + | |||
| + | Repositories like GIN do not store the data in one downloadable archive. Instead, you first download a small " | ||
| + | |||
| + | Everything below is done **on the " | ||
| + | |||
| + | == Before you start == | ||
| + | |||
| + | Three things to know, because none of them are obvious and none of them are in GIN's own documentation: | ||
| + | |||
| + | * You **cannot** download this dataset over HTTPS. GIN serves the folder structure over HTTPS, but the actual imaging files only over '' | ||
| + | * The '' | ||
| + | * '' | ||
| + | |||
| + | == 1. Set your git identity == | ||
| + | |||
| + | '' | ||
| + | |||
| + | < | ||
| + | git config --global user.name "Your Name" | ||
| + | git config --global user.email " | ||
| + | </ | ||
| + | |||
| + | These are only labels written into your local copy. They are not checked against anything, and they do not give anyone access to anything. | ||
| + | |||
| + | == 2. Register a GIN account == | ||
| + | |||
| + | This step is done in the browser (click on the World icon at the bottom of the screen to open Firefox). | ||
| + | |||
| + | - Go to [[https:// | ||
| + | - Click '' | ||
| + | - Choose a username, enter your RHUL email and a password | ||
| + | - Confirm your account by clicking the link in the email you receive | ||
| + | |||
| + | Registration is free and immediate; there is no approval process and no data sharing agreement for this dataset. | ||
| + | |||
| + | == 3. Create an '' | ||
| + | |||
| + | An '' | ||
| + | |||
| + | First check whether you already have one: | ||
| + | |||
| + | < | ||
| + | ls ~/ | ||
| + | </ | ||
| + | |||
| + | If nothing is listed, create one: | ||
| + | |||
| + | < | ||
| + | ssh-keygen -t ed25519 -C " | ||
| + | </ | ||
| + | |||
| + | Press Enter to accept the default file name. You can leave the passphrase empty; if you set one, you will be asked for it every time, which is inconvenient for downloads that run for hours. | ||
| + | |||
| + | Now print the **public** key (note the '' | ||
| + | |||
| + | < | ||
| + | cat ~/ | ||
| + | </ | ||
| + | |||
| + | You will see a single long line starting with '' | ||
| + | |||
| + | Then, in the browser, logged into GIN: | ||
| + | |||
| + | - Click your avatar (top right) and choose '' | ||
| + | - Choose '' | ||
| + | - Click '' | ||
| + | - Give it a name, e.g. '' | ||
| + | - Paste the line into the '' | ||
| + | |||
| + | Check that it worked: | ||
| + | |||
| + | < | ||
| + | ssh -T git@gin.g-node.org | ||
| + | </ | ||
| + | |||
| + | The first time, you will be asked whether you trust the server. Type '' | ||
| + | |||
| + | < | ||
| + | Hi there, You've successfully authenticated, | ||
| + | </ | ||
| + | |||
| + | This message means **success**. GIN only allows '' | ||
| + | |||
| + | == 4. Choose where the data will go == | ||
| + | |||
| + | **Do not download into your home directory.** Use '' | ||
| + | |||
| + | Check the free space before you start: | ||
| + | |||
| + | < | ||
| + | df -h / | ||
| + | cd / | ||
| + | </ | ||
| + | |||
| + | Note that ''/ | ||
| + | |||
| + | == 5. Download the dataset skeleton == | ||
| + | |||
| + | < | ||
| + | git clone git@gin.g-node.org:/ | ||
| + | cd WAND | ||
| + | git annex init " | ||
| + | </ | ||
| + | |||
| + | **Note the slash** immediately after the colon, before '' | ||
| + | |||
| + | This step is quick and small. You now have the complete folder structure with the real file names, all the metadata files ('' | ||
| + | |||
| + | You can check the overall picture with: | ||
| + | |||
| + | < | ||
| + | git annex info | ||
| + | </ | ||
| + | |||
| + | which reports the total size of the dataset, how much you currently have locally (zero at this point), and how much disk space is available. | ||
| + | |||
| + | == 6. Check how big your request is, before downloading == | ||
| + | |||
| + | '' | ||
| + | |||
| + | < | ||
| + | for s in 02 03 06; do | ||
| + | printf " | ||
| + | git annex find sub-*/ | ||
| + | | awk ' | ||
| + | done | ||
| + | </ | ||
| + | |||
| + | Change the list '' | ||
| + | |||
| + | == 7. Download the data you need == | ||
| + | |||
| + | Always test with a single participant first, so you can see how much one subject costs: | ||
| + | |||
| + | < | ||
| + | git annex get sub-00395/ | ||
| + | du -sh . | ||
| + | </ | ||
| + | |||
| + | Then start the real download. Use '' | ||
| + | |||
| + | < | ||
| + | screen -S wand | ||
| + | git annex get -J4 sub-*/ | ||
| + | </ | ||
| + | |||
| + | '' | ||
| + | |||
| + | If the transfer is interrupted, | ||
| + | |||
| + | You will see error messages for participants who do not have a given session. This is normal: not every volunteer took part in every session (the 7 T and TMS sessions in particular had much smaller sub-samples). | ||
| + | |||
| + | To download only some participants, | ||
| + | |||
| + | < | ||
| + | while read s; do | ||
| + | git annex get -J4 " | ||
| + | done < subjects.txt | ||
| + | </ | ||
| + | |||
| + | == 8. Move the data onto psychp01 == | ||
| + | |||
| + | Once the download is finished and you are happy with your folder structure, move the data to ''/ | ||
| + | |||
| + | Note that the downloaded dataset contains a hidden '' | ||
| + | |||
| + | == Structure of the WAND dataset == | ||
| + | |||
| + | The data follow the [[https:// | ||
| + | |||
| + | ^ Session ^ Content ^ | ||
| + | | ses-01 | MEG (CTF '' | ||
| + | | ses-02 | Connectom 3 T, ultra-strong gradients: diffusion and quantitative MRI | | ||
| + | | ses-03 | Prisma 3 T: structural, functional, perfusion | | ||
| + | | ses-04 | 7 T spectroscopy | | ||
| + | | ses-05 | 3 T GABA-edited spectroscopy (MEGA-PRESS) | | ||
| + | | ses-06 | 7 T structural and functional | | ||
| + | | ses-07 | 3 T metabolic (subset, about 39 participants) | | ||
| + | | ses-08 | TMS (subset, about 40 participants) | | ||
| + | |||
| + | '' | ||
| + | |||
| + | == Common pitfalls == | ||
| + | |||
| + | * **The files look like they are already there, but they are not.** After cloning, you can see and browse every file name, including the MEG '' | ||
| + | * **Never run '' | ||
| + | * **The download links on the GIN wiki are dead.** The '' | ||
| + | * **Remember the warning above**: the " | ||
| + | |||
cluster-file_transfer.1788432844.txt.gz ยท Last modified: 2026/09/03 10:54 by gabriele