Data flagging

Boris
Boris
  • Updated

Introduction

Data flagging in Benchling Analysis allows you to manually annotate and comment on rows of data in table views. Each flag is accompanied with a comment and can be filtered as needed using normal filters in Analysis.

Note: Data flagging is available as a beta feature beginning February 3, 2025. For access, please contact support@benchling.com.

Flagging is intended to be a manual process that is unique to a particular dataset and analysis at a specific point in time.  Conceptually, you should flag rows that are anomalous or need special treatment-- especially when the reason for special treatment is not something captured in the data itself. If it is captured in the data, regular filtering can be used for this purpose. Filtering can be automated. Data flagging can't. See below for details.

Adding flags to rows

To flag rows, click the checkbox that appears when you move your cursor to the row number at the left edge of the row. Select as many rows as needed.

 

Click the Flag button that has appeared above the table. Enter a comment that explains why these rows are being flagged. Comments are required. The comment you enter will be applied to all the rows you selected. Once you submit, a flag column will be visible with the rows that were flagged along with a new Comment column.

Note: Once you flag rows, all the preceding steps in an analysis before the table in which rows are flagged will be locked. This means they will not be editable. See below for details.

Filter out (or for) flagged rows

Once rows are flagged, it is easy to either filter those rows out or filter unflagged rows out by Adding a filter on the Flag column and selecting the appropriate logic for your needs. For example, you can filter out flagged rows by setting the filter to "Flag equals false".

Remove flags

To remove flags, simply select the rows you wish to remove the flags from and click the Clear button instead. Clearing flags also requires a comment. 

An alternative method to delete flags is to delete this step in the Filters and Transformations sidebar. As with any other transformation or filter in Analysis, changing flagged rows (adding or removing flags) will cause all downstream Analysis steps and transformations to rerun.

Audit Log 

Every step of adding or removing flags (or deleting the associated steps) will be saved to the audit log so that all flag-related changes are recorded and can be reconstructed.

Notes & Limitations

Once flags are added to a table in an analysis, there are several caveats to keep in mind.

  • Data Flagging steps: Each flagging operation creates a "Flag rows" step in the list of Filters and Transformations.

  • Multiple flags: You can add multiple flags to the same row. All of the added flags will be visible in the audit log. However, in the Analysis, only a single flag will be displayed in the flag column whether one or more flags are added, and only the most recent comment will be displayed in the comment column.
  • Locking: All views and tables that precede a table with flagged rows will be locked. That is because changing prior transformations and filters might change downstream data, which may invalidate the meaning or validity of the flags. Therefore, to be safe, all preceding steps before the view with flagged rows are locked. The lock is lifted if the flags are removed. To make it easier to find which view contains flags that lock part of an analysis, view with flagged rows will have a Flag icon next to them.

  • Duplicating and Templates: Because flags are specific to a specific dataset and analysis at a specific time, we do not recommend duplicating analyses with flags. If an analysis with flags is duplicated, the flags will be copied over exactly as well. The creation of templates from analyses with flagged rows is not allowed.
  • JOINs and UNIONs: If either a JOIN or UNION step occurs anywhere after a data flagging step, the flags and comments will be converted to simple booleans and text, respectively. A second flag step created thereafter will create new flag and comment columns.

Was this article helpful?

Have more questions? Submit a request