fw-gear-relabel-container


Namefw-gear-relabel-container JSON
Version 0.5.3 PyPI version JSON
download
home_pagehttps://gitlab.com/flywheel-io/scientific-solutions/gears/relabel-container
SummaryChange container labels in preparation for curate-bids gear
upload_time2024-08-13 21:04:24
maintainerNone
docs_urlNone
authorFlywheel
requires_python<4.0,>=3.11
licenseMIT
keywords flywheel gears
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Relabel Container Gear

## Overview

*[Usage](#usage)*

*[FAQ](#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:*

- [X] Project
- [X] 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](FAQ.md)

## Contributing

For information about how to develop this gear, see [CONTRIBUTING.md](CONTRIBUTING.md).
<!-- markdownlint-disable-file -->

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/flywheel-io/scientific-solutions/gears/relabel-container",
    "name": "fw-gear-relabel-container",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": null,
    "keywords": "Flywheel, Gears",
    "author": "Flywheel",
    "author_email": "support@flywheel.io",
    "download_url": null,
    "platform": null,
    "description": "# Relabel Container Gear\n\n## Overview\n\n*[Usage](#usage)*\n\n*[FAQ](#faq)*\n\n### Summary\n\nThis 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).\n\nNote: this gear used to be called \"bids-pre-curate\"\n\n### License \n\n*License:* MIT\n\n### Classification\n\n*Category:* Analysis\n\n*Gear Level:*\n\n- [X] Project\n- [X] Subject\n- [ ] Session\n- [ ] Acquisition\n- [ ] Analysis\n\n----\n\n[[_TOC_]]\n\n----\n\n### Inputs\n\n* *acquisitions*\n    - **Type**: File\n    - **Optional**: True\n    - **Description**: CSV file containing corrected information\n* *sessions*\n    - **Type**: File\n    - **Optional**: True\n    - **Description**: CSV file containing corrected session information\n* *subjects*\n    - **Type**: File\n    - **Optional**: True\n    - **Description**: CSV file containing corrected subject information\n\n**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.\n\n### Config\n\n* debug\n    - **Type**: boolean\n    - **Description**: Log debug messages.\n    - **Default**: false\n* dry_run\n    - **Type**: boolean\n    - **Description**: Whether to perform a dry run, logging what would be changed without actually changing it.\n    - **Default**: false\n\n### Outputs\n\n#### Files\n\nFor initial run (without providing any input files):\n- acquisitions.csv\n  - Existing unique acquisition labels for the entire project\n- sessions.csv\n  - Existing unique session labels for the entire project\n- subjects.csv\n  - Existing unique subject labels for the entire project\n\nFor second run (providing input files):\n- no outputs are produced.\n\n#### Metadata\n\nNo metadata is created or modified by this gear.\n\n### Pre-requisites\n\nThis 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.\n\n### Prerequisite Gear Runs\n\nNo 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.\n\n## Usage\n\nThis 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.  \n\nThe 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.\n\n## FAQ\n\n[FAQ.md](FAQ.md)\n\n## Contributing\n\nFor information about how to develop this gear, see [CONTRIBUTING.md](CONTRIBUTING.md).\n<!-- markdownlint-disable-file -->\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Change container labels in preparation for curate-bids gear",
    "version": "0.5.3",
    "project_urls": {
        "Homepage": "https://gitlab.com/flywheel-io/scientific-solutions/gears/relabel-container",
        "Repository": "https://gitlab.com/flywheel-io/scientific-solutions/gears/relabel-container"
    },
    "split_keywords": [
        "flywheel",
        " gears"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1c4e7a6851e96d5d76af4ea6be7da841a082edbf0211352ad1b9951564fd1aad",
                "md5": "3972da854245971caa92c139da629682",
                "sha256": "fcc603855cb3c226d1bdf6966eb86d33ec8e41d055128af02f72d341bb9db6c0"
            },
            "downloads": -1,
            "filename": "fw_gear_relabel_container-0.5.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3972da854245971caa92c139da629682",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 9556,
            "upload_time": "2024-08-13T21:04:24",
            "upload_time_iso_8601": "2024-08-13T21:04:24.555455Z",
            "url": "https://files.pythonhosted.org/packages/1c/4e/7a6851e96d5d76af4ea6be7da841a082edbf0211352ad1b9951564fd1aad/fw_gear_relabel_container-0.5.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-13 21:04:24",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "flywheel-io",
    "gitlab_project": "scientific-solutions",
    "lcname": "fw-gear-relabel-container"
}
        
Elapsed time: 0.53469s