Use tags in Flywheel to annotate your data, so you can then search on and filter data based on those tags. Creating tags is a 2-step process. First create your new tags at the group level. Next, you can add those tags to containers in Flywheel.
Any new tags must be created at the group level. To create new tags:
-
Sign in to Flywheel.
-
Click Groups in the left navigation menu.
-
Select a group.
-
Click the Tags tab.
-
Enter a tag name, and click Add.
This tag is now available to add to other containers.
Note
-
Tag names are not case sensitive. Meaning if the tag CONTROL already exists in a group, you cannot add a control tag.
-
You can use the same tag name across multiple groups in Flywheel. When you search, all data associated with that tag name appears.
-
Editing or deleting a tag name will change it throughout Flywheel.
-
Basic Search: Enter the tag name in the search bar
Tip
-
Search results include any data that is associated with the group where the tag was created.
-
If you added the same tag name to multiple groups, data associated with each group appears in the results.
Advanced Search:
-
In the Search bar, hit enter.
-
Click Advanced Search.
-
In Field, enter
tags
to bring up a list of all of your tag fields. By default, those fields aregroup.tags
orsubject.tags
.Tip
If you added tags using the SDK, you will have additional fields.
-
Choose an operator. See our Advanced Search documentation for more information.
-
In Value(s), enter one or more tag names.
-
Add more Terms or Term Groups.
-
Once complete, click Run Query.
In Flywheel you can add tags to sessions and subjects. To do this:
-
Click Projects.
-
Select a project.
-
Select the Sessions tab.
-
(Optional) Click
to enable Subject View.
-
Select the subject you want to tag.
-
In left panel click the Subject tab, and go to Tags.
-
Start typing a tag name. Available tag names appear in the list.
-
Continue with each subject you want to tag.
When configuring a Gear to run, enter the tag. This tag will be attached to the Gear job itself. Gear tags are useful on jobs because you can use them to search for outputs, or perform bulk action on output files.
Note
Gear tags do not need to be added to the Group. You can add new tags for Gear Jobs in the configuration tab.
To add a tag to a Gear Job:
-
Navigate to a session, and click the checkbox.
-
Select an acquisition.
Tip
Batch run Gears
To run a Gear against multiple sessions or acquisitions at the same time, use batch processing
-
Click Run Gear.
-
Select Utility or Analysis.
-
Choose a gear from the list.
-
Enter one or more tag in the Job Tags field
-
Select the Configuration tab to edit any additional settings.
-
Click Run Gear.
The tag is now associated with the job.
Use the SDK to add tags in batches. Below is an example of interacting with session tags. See the Flywheel SDK for more information.
# See tags on a session session = fw.get(session_id) print(', '.join(session.tags)) # Add a tag named Control to a session session.add_tag('Control') # Remove a tag from a session session.delete_tag('Analysis Required') # Add a tag to a file acq = fw.get('60eda95598612d4e6d5b8da9') for file in acq.files: file.add_tag('Alpha')