Skip to main content

Relabel Container Gear

Overview

Usage

FAQ

Summary

This gear offers a simple way to modify subject, session, and acquisition labels. It was originally created to help make a project compatible with a BIDS project curation template such as reproin.json. Running relabel-container should be done at the project level. This will generate CSV files that will be populated with a unique list of subject, session and acquisition labels. These CSV files need to be downloaded and modified to provide new container names. Edited CSV files are then uploaded to the project as an attachment and provided as input to another run of this same gear to modify container names. This gear can also be run on an individual subject, but cannot be run at the session level. This gear is not capable of merging subjects or sessions (changing multiple subject or session labels to the same label).

Note: this gear used to be called "bids-pre-curate"

License

License: MIT

Classification

Category: Analysis

Gear Level:

  • Project
  • Subject
  • Session
  • Acquisition
  • Analysis

[[TOC]]


Inputs

  • acquisitions
    • Type: File
    • Optional: True
    • Description: CSV file containing corrected information
  • sessions
    • Type: File
    • Optional: True
    • Description: CSV file containing corrected session information
  • subjects
    • Type: File
    • Optional: True
    • Description: CSV file containing corrected subject information

Note: These files are created as an output of the initial gear run and then used as an inputs for second run. At least one of these files must be provided as input for the second run.

Config

  • debug
    • Type: boolean
    • Description: Log debug messages.
    • Default: false
  • dry_run
    • Type: boolean
    • Description: Whether to perform a dry run, logging what would be changed without actually changing it.
    • Default: false

Outputs

Files

For initial run (without providing any input files):

  • acquisitions.csv
    • Existing unique acquisition labels for the entire project
  • sessions.csv
    • Existing unique session labels for the entire project
  • subjects.csv
    • Existing unique subject labels for the entire project

For second run (providing input files):

  • no outputs are produced.

Metadata

No metadata is created or modified by this gear.

Pre-requisites

This gear is designed to change acquisition labels so that they match what is expected by a project curation template such as reproin.json. Therefore, the expected labels for anatomical, functional, diffusion acquisitions, etc. need to be known. Subject and session labels can also be changed if desired.

Prerequisite Gear Runs

No gears need to be run before this gear but the usual gears for extracting metadata, classification, and dcm2niix will likely be run by gear rules in preparation for running the BIDS curation gear.

Usage

This gear is run twice. The first time, it gathers the labels of all subjects, sessions, and acquisitions and returns only the unique strings. Three csv files are produced as output. These files need to be edited to add new labels as necessary. Usually only acquisition labels need to be changed.

The second run uses the modified csv files to change the labels. After editing the csv files by adding new labels, the csv files should be attached to the project where they can be used as inputs to the second gear run. If subject and session labels do not need to be changed, those files to not need to be attached.

FAQ

FAQ.md

Contributing

For information about how to develop this gear, see CONTRIBUTING.md.

Metadata

Release files for fw-gear-relabel-container 0.5.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for fw-gear-relabel-container 0.5.3
File Interpreter ABI Platform
fw_gear_relabel_container-0.5.3-py3-none-any.whl Python 3 none any Details

Release files / fw_gear_relabel_container-0.5.3-py3-none-any.whl

Download URL fw_gear_relabel_container-0.5.3-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fcc603855cb3c226d1bdf6966eb86d33ec8e41d055128af02f72d341bb9db6c0
BLAKE2b-256 checksum
How to use checksums
1c4e7a6851e96d5d76af4ea6be7da841a082edbf0211352ad1b9951564fd1aad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.9 Linux/5.15.154+

Release history Release notifications | RSS feed

This release

0.5.3 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page