This guide explains how to perform batch queries and use OR logic from the user perspective in the genomehubs/blobtoolkit UI. It focuses on the interactive elements and workflows available to users, omitting API-specific instructions.
Batch Queries in the UI#
The UI supports batch queries by allowing users to enter multiple independent search terms, which are processed in parallel. This is typically achieved using chip-based input components such as ChipSearch and KeyValueChip. These components let you enter multiple values or key-value pairs, each represented as a chip. For example, you might enter several taxon names or IDs, and each will appear as a separate chip in the search bar or filter panel. The UI then executes each chip as an independent query and combines the results for display or download. This is functionally equivalent to using the msearch (;) separator in the API, but is presented in a user-friendly, interactive format in the UI source.
How to Perform a Batch Query#
- Locate the search bar or filter panel that supports chip input (often labeled with "Add filter" or similar).
- Begin typing a search term (e.g., a taxon name or ID). The UI may provide autocomplete suggestions as you type.
- Press Enter, Tab, or select a suggestion to create a chip for that term.
- Repeat the process to add more chips. Each chip represents an independent query.
- The UI will process all chips in parallel and display the combined results.
The ChipSearch component supports input validation, so invalid entries are highlighted and rejected. It also provides autocomplete and lookup features for supported fields, such as taxon names, to help you enter valid values efficiently source.
OR Logic in the UI#
Field-Level OR#
Some fields in the UI support OR logic by allowing you to enter multiple values within a single chip, separated by commas. For example, entering Canis,Felis in a taxon name field will match records where the taxon name is either Canis or Felis. The UI parses the comma-delimited values and applies OR logic within that field source.
Top-Level OR#
The UI does not support a true top-level OR, meaning you cannot combine multiple unrelated conditions in a single query to get results matching any of those conditions. For example, you cannot create a single chip or filter that matches tax_name(Canis) OR assembly_level(Chromosome). Instead, you must either:
- Use multiple chips for independent queries (batch query), then manually combine or review the results.
- In blobtoolkit, apply one filter, review the results, then apply the second filter to the result set (sequential filtering). There is no way to combine both conditions in a single OR operation source.
UI Components for Query Input#
- ChipSearch: Lets you enter multiple search terms or key-value pairs as chips. Supports autocomplete, validation, and custom parsing logic. Chips are displayed on the same row until word wrap, and you can add, edit, or remove them interactively.
- KeyValueChip: Represents a key-value pair as a chip, commonly used in filter bars. Supports inline editing, validation, and custom appearance.
- EditableText: Allows inline editing of text fields, such as search parameters or labels, with validation and accessibility support.
These components are designed for usability and accessibility, providing visual feedback, keyboard navigation, and customization options source.
Best Practices and Limitations#
- Use chip-based input to batch independent queries. Each chip acts as a separate query, and the UI combines the results.
- For OR logic within a single field, enter comma-separated values in one chip if the field supports it.
- Do not expect to combine unrelated conditions with top-level OR; instead, use multiple chips or sequential filtering and combine results manually if needed.
- Take advantage of autocomplete and validation features to ensure correct input and efficient searching.
- If you need to perform complex queries not supported by the UI, consider exporting results and combining them externally.
Example Workflow#
Suppose you want to find all records for either "Canis" or "Felis":
- In the search bar, type
Canisand press Enter to create a chip. - Type
Felisand press Enter to create another chip. - The UI will display results for both queries together.
Alternatively, if the field supports it, you can type Canis,Felis in a single chip to achieve the same effect for that field.
If you want to filter by two unrelated conditions (e.g., taxon name and assembly level), create separate chips for each condition. The UI will process them as independent queries, but you may need to review or combine the results manually.
For more details on the UI components and their usage, see the UI Chip Components documentation and the msearch and OR logic guide.