Repository navigation
Tutorial 2 NeuroData
Forgejo is a platform for hosting and managing Git repositories, similar to GitHub and GitLab. It allows users to collaborate on projects, track changes, and manage code efficiently. It is particularly useful for research projects that involve code development, version control, and collaborative work, ensuring that all team members have access to the latest updates and can contribute effectively. The NeuroPoly lab hosts its own Forgejo instance, NeuroData, which contains many datasets organized following the BIDS standard.
sequenceDiagram
actor User
participant Browser as NeuroData website
participant Git as git client
participant Server as NeuroData repository
participant Annex as git-annex
User->>Browser: Sign in on VPN and browse datasets
Browser-->>User: Repository URL and BIDS tree
User->>Git: Clone repository
Git->>Server: Fetch metadata and annex pointers
Server-->>Git: Repository files
User->>Annex: git annex init; git annex get
Annex->>Server: Request selected content
Server-->>Annex: Imaging data
Annex-->>User: Local BIDS dataset
NeuroData hosts both the imaging data and its associated metadata. While the git protocol can handle the lightweight metadata files efficiently, it is not suitable for large imaging data. Instead, it uses git-annex to index those.
-
Install git.
-
Install git-annex.
-
If not done already, set up your NeuroData account and SSH key: follow Get access (or the intranet initial setup).
-
Navigate to data.neuro.polymtl.ca (VPN required) and log in with your GE credentials.
-
Select the
datasetsorganization and browse its content. -
Select the
whole-spinedataset. -
Peruse through the dataset content to familiarize yourself with its structure and files.
-
Go back to the main page of the
whole-spinerepository. -
Click on the
Clonebutton to copy the repository URL. -
Open a terminal on your local machine and navigate to the directory where you want to clone the repository.
-
Clone the repository using the URL you copied earlier. For example:
git clone <repository_url> cd whole-spine
-
Navigate to a specific subject and session within the dataset and open the
anatfolder. -
Open a metadata file (e.g.,
sub-01/ses-01/anat/sub-01_ses-01_T1w.json) to inspect its contents. You should see a JSON structure containing various metadata fields related to the imaging session. -
In the same folder, open an imaging file (e.g.,
sub-01/ses-01/anat/sub-01_ses-01_T1w.nii.gz) to inspect its contents. The file should contain a single line, a reference to the actual data stored bygit-annex. -
Navigate back to the root of the
whole-spinerepository. -
Run the following block of
git-annexcommands to retrieve the actual imaging data :git annex init git annex dead here git annex get
Using data
Tutorials
Infrastructure