DataWarrior User Manual

Row List Concept


A row list is a named subset of all rows. Row lists may be used for various purposes, e.g. within a list filter to hide all rows that don't belong to the list. In graphical views list members may be shown with larger or differently shaped markers or in a different color. Graphical views may put the emphasis on list members by displaying all other rows in a grayish tone in the background. Or labels may be shown for list members only. Row lists may be used to permanently store a current selection. Or a row list may define a data subset for a data analysis method.

Once defined, row lists are automatically saved within native DataWarrior files. The List menu contains functionality to create, manipulate, and delete row lists. You may add or remove individual or selected rows to or from a row list. For instance, you may create a few row lists from different sets of selected rows and afterwards add more rows to some of those lists with the Add Row To List item from the popup menu that opens with a right mouse click on any view. This way you may manually assign rows to self defined categories. Alternatively, you may select multiple rows and and add them all to a list at once by choosing Add Selected To from the List menu.

Creating Row Lists

The List menu's Create Row List From... submenu offeres various tasks of how to create a new row list. All of these tasks have in common that they open a dialog, which asks for a list name and other options that depend on the particular menu item:

  • Selected Rows...: After providing a name and clicking OK DataWarrior creates a new row list with the given name, which contains all currently selected rows. This row list can now be used for any purpose, e.g. the list manipulation tasks from the List menu.
  • Visible Rows...: This option works like the one above, except for that it creates a list of all currently visible rows.
  • Hidden Rows...: This option works like the one above, except for that it creates a list of all currently non visible rows.
  • Duplicate Rows...: This option creates a list of all duplicate rows, which are those rows that are equal to at least one previous row considering the content of one or multiple defined columns. For the sample table shown below, row 3 is the only duplicate row if the kind column is chosen for comparison. Note that the assigment of which rows are considered duplicates depends on the sort order of rows.
  • kind
    1 a
    2 b
    3 a

  • Unique Rows...: This option creates a list of all unique rows, which are those rows that have no equal other row in table considering the content of one or multiple defined columns. Considering the kind column in the example above only row 2 is unique. Unique rows are independent of the sort order.
  • Distinct Rows...: This option creates a list of all distinct rows, which are the first rows of every set of equal rows considering the content of one or multiple defined columns. A row of any table is either a distinct or a duplicate row, depending on whether there are equal rows in the table and whether they are above or below this row. In the example table above, row 1 and row 2 are distinct rows.

  • Dialog settings for new list of distinct rows sharing the same target name and organism.

  • Clipboard...: A new row list can be created from the clipboard's content if the clipboard contains a list of names that identify the rows to be added to the new list. This task's dialog asks to choose a column that contains row identifiers or object names, which are then matched against the clipboard's content.
  • Existing Row Lists...: This option lets you create a new row list from two existing lists using a logical operation. In case of OR the new list contains all rows that are a member of at least one of the input lists. In case of AND the new list only contains those rows that are members of both input lists.
  • Extend list to all rows of same category This option can be selected for any of Create Row List tasks. If this option is selected, then a category column must be chosen. The initially created row list will then be post-processed in two steps. First all of its rows are processed to extract all categories represented by the row list. In a second step those rows that are not yet list members, are added to the list, if they belong to any of the previously extracted categories.


    Row Selections and Row Lists

    Creating a new list from a selection basically saves a selection for later re-use under a given name. There a multiple ways to interact between a current selection and a chosen list: With Add Selected To and Remove Selected From one may add or remove all currently selected rows to/from any existing row list. One may also work in the opposite direction, which is adding or removing those rows to/from the current row selection, which are member of a given row list (Select Rows From and Select Rows From).

    Sometimes list management means to very frequently add and remove rows to and from a list, which can become a tedious task when always done with mouse in the list menu. Therefore, two keyboard shortcuts Ctrl-1 and Ctrl-0 can be used to add or remove the currently selected row(s) to/from a Default List. If that list doesn't exist and Ctrl-1 is pressed, then a list with this name is automatically created.


    Column Content and Row Lists

    An alternative way to create a set of row lists can be achieved with Create Row Lists From Category Column... from the List menu. This task creates one list for every category being present in a given column and assigns table rows accordingly. The list's names are built from the category name and an optional prefix and postfix.

    The inverse process can be triggered by choosing Add Column From Row Lists..., which creates a new column and translates the list membership of every row into a cell entry composed of all list names, the row is member of.


    Exporting and Importing Row Lists

    Row lists can be exported into a text file. In order to later identify individual entries, an identifier column must be chosen prior to the export. DataWarrior writes the name of the identifier column into the new row list file. Then it creates a list of all distinct identifiers of all list members taken from the identifier column. This identifier list is then also written into the export file.

    Analogously, when importing a list file DataWarrior asks for a key column that contains the identifiers, which are then matched against the identifiers from the list file in order to assign list members.


    Dialogs for row list export and import.


    Continue with Using Macros...