Tag-Based Workflows
Overview
Tag-based workflows provide a flexible way to organize, filter, and automate data processing in Flywheel. Tags are labels that you attach to data containers (sessions, subjects, files) or gear runs to enable custom organization and workflow control.
Key Concepts
Data Tags
Data tags are labels you create at the group level and then apply to sessions, subjects, and files. They enable you to categorize data based on your study design, processing status, or any custom criteria.
Use Cases:
- Mark control subjects vs. treatment groups
- Track processing status (e.g., "QC Complete", "Analysis Required")
- Identify data subsets for batch processing
- Filter data for specific analyses or exports
- Trigger gear rules based on tag criteria
Gear Job Tags
Gear job tags are labels attached to individual gear runs to help you organize and manage job execution. Unlike data tags, gear job tags can be arbitrary strings and don't need to be created at the group level first.
Use Cases:
- Filter jobs in the Jobs Log by project or analysis type
- Allocate gear runs to specific compute engines based on resource requirements
- Track related gear runs across multiple sessions
- Organize batch processing operations
Tag Management
Creating and Applying Data Tags
- Create tags at the group level - All data tags must be defined in a group before use
- Apply tags to containers - Add tags to sessions, subjects, or files via the UI or SDK
- Search and filter - Use basic or advanced search to find tagged data
Learn how to create and manage tags
Using Tags with Gear Rules
Gear rules can be configured to:
- Trigger only when specific tags are present on sessions, subjects, or files
- Exclude data with certain tags from automatic processing
- Add tags to output files for downstream workflow steps
Batch Operations with Tags
Tags enable efficient batch operations:
- Add tags to mark data that needs reprocessing
- Use advanced search to find all tagged data
- Select multiple items and run gears in batch
- Track the batch operation with a gear job tag
Common Workflows
Study Cohort Management
- Create tags for each cohort (e.g., "Control", "Treatment-A", "Treatment-B")
- Tag subjects as they are enrolled
- Use search to quickly access specific cohorts
- Run cohort-specific analyses using tag-based filters
Processing Pipeline Status Tracking
- Create tags for each processing stage (e.g., "Raw", "QC-Pass", "Analyzed")
- Configure gear rules to add tags when processing completes
- Use tags to track which data has completed each stage
- Filter by tags to identify data needing attention
Resource Allocation for Large Jobs
- Configure multiple compute engines with different resource profiles (small, medium, large)
- When running memory-intensive gears, add the appropriate gear job tag (e.g., "large")
- The compute platform routes the job to the tagged engine
- Monitor tagged jobs separately in the Jobs Log
Best Practices
- Use descriptive tag names that clearly indicate their purpose
- Document your tagging scheme within your project to ensure consistency across team members
- Combine tags with gear rules to create automated processing pipelines
- Use gear job tags to organize large batch operations
- Clean up obsolete tags at the group level to keep the tag list manageable
- Search before creating to avoid duplicate tags across groups