Difference between revisions of "FlyBase:QueryBuilder Help"

From FlyBase Wiki
Jump to navigation Jump to search
Line 53: Line 53:
  
 
==Building a segment using a Controlled Vocabulary term==
 
==Building a segment using a Controlled Vocabulary term==
 +
 +
'''Step 1''': Select "Controlled Vocabularies (CV)" from the DataClass drop-down menu.
 +
 +
'''Step 2''': Clicking this option changes the window display to show top-level terms from various CVs used in FlyBase for GO ontology, anatomy, developmental stage and phenotype terms. You can either browse through the CVs from these top-level terms or you can search for terms matching what you are looking for, using the search box above the terms. By default, your search will be performed using CV terms from the whole subtree of the term you've chosen. If you wish to search only for the exact CV term you have chosen, select "This CV term only" from the “Retrieve records annotated with” drop down menu. (Hint: you'll retrieve more results by searching the whole subtree)
 +
 +
'''Step 3''': Once you've decided on a term, click on the green box to use the term in your search. The window returns to the QB query page, where the first QuerySegment has been populated with your chosen CV term.
 +
 +
'''Step 4''': Add additional query segments as described above (optional).
 +
 +
'''Step 5''': Click on “Run query”.
  
 
==Searching Gene Expression Data==
 
==Searching Gene Expression Data==

Revision as of 21:38, 23 January 2018

Query Builder Overview

QB takes advantage of how the data is stored in FlyBase to allow more sophisticated searches relative to QuickSearch or other search tools on FlyBase.

Using QB, you can search any field in a FlyBase report using a QuerySegment, and then combine the resulting hit-list with searches in other fields, allowing combinatorial searches that join QuerySegments with Boolean operators. (Note that Human Disease, Cell Line, Gene Group, and Strain reports are not currently accessible with QueryBuilder).

A set of results can be exported to QB from other searches on FlyBase, through the 'Export' button at the top of a hit-list, and then modified to refine the search by adding additional query segments.

Getting Started

Select one of the three options on the QB start page:

  1. Select a pre-constructed QueryTemplate
  2. Import a previously saved query
  3. Build a new query

QueryBuilder options.png

Select a Pre-constructed Query Template

The first option on the QB start page allows one to choose a query from a large collection of pre-constructed query templates. The available templates are organized by data type. To see the list of templates related to a given class of data, choose the data class of interest from the pull down menu at the left. A list of pre-constructed query templates will appear at the right and a data class-specific list of “keywords” will appear at the left. The list of templates can be further refined by selecting one or more of the keywords. Only the templates containing the chosen keywords will remain. To return to the complete set of templates for a given data class, just deselect the chosen keywords.

Example Templates:

  1. List the genes associated with a specified gene ontology term (e.g. transcription factor activity) that are reported to genetically interact with a specified gene (e.g. bsk).
  2. List the balancers for a specific chromosome (e.g.*3LR*) available in a stock.
  3. List the lethal insertions for a specified gene (e.g. N).

When you find a template that matches or is similar to your query of interest, click on the template. This will bring you to a QueryBuilder Page with the specified query set up and ready to run. To modify the parameters to exactly match your own query specifications, use the green “Edit” tabs present in each segment of the query. Modify the search terms as desired, click “Finish Editing”, and then select “Run query”.

Import a Saved Query

Any QuerySchema (a collection of QuerySegments combined using Boolean operators) can be saved for running again at a later date using the “Store This Query” option on the QB results page. The QuerySchema is saved to your computer as a small text file. To run the query again, choose “Import a saved query” from the QB start page. Use the “Choose File” option to retrieve the file, click on the green “Done (activate query in new QueryBuilder session)” button, edit the query if desired, and then click on “Run query”.

Build a New Query

Click the yellow box on the QB start page titled' ‘Build a new query”. Follow the instructions below to either build a query using any text string of your choosing, build a query using controlled vocabulary terms, or to do an expression pattern query.

Building a segment using any text string

Step 1: Select the DataClass you want to search from the DataClass dropdown menu.

There are 19 options to choose from. In most cases, choosing a particular DataClass changes the window display to show the Querybuilder searchable fields found in the report for that DataSet. In other cases (Expression Search, Controlled Vocabularies) a dedicated search interface appears.

Step 2: Click on the radio button next to the report field you wish to search.

Step 3: Enter the text string for your search in the QuerySegment’s “SearchText” box. The search algorithm will search for occurrences of the text string you entered in the specific field that you selected in step 1. In cases where the selected field value may be case sensitive (e.g. symbol), you can opt for running a case sensitive search by choosing “yes” in the “case-sensitive” dropdown menu. For some fields, autocomplete will list valid field entries guided by the text you have typed.

Step 4: Click the "Finish editing" button.

Step 5 (optional): Add an additional search segments by clicking the "+" button. A new box will appear and you can repeat the selection process. The additional segment(s) can be joined to existing segments using standard Boolean operators. The default operator is “AND”. To change to “OR” or “BUT NOT”, click on the join box until you reach the desired operator. You can remove query segments by clicking on the “x” in the top right corner of the query box.

Step 6: Click on “Run query”. (Note that the default search is for D. melanogaster. To search for results in other Drosophila species, choose the species of interest from the “Species filter” drop down menu before you run the query).

Step 7: To see results for the DataClass specified in your search, click on the appropriate green button, which indicates the number of hits and takes you to the relevant report or a hitlist. To see results in other cross-referenced DataClasses, click the green results button for the DataClass of interest.

Building a segment using a Controlled Vocabulary term

Step 1: Select "Controlled Vocabularies (CV)" from the DataClass drop-down menu.

Step 2: Clicking this option changes the window display to show top-level terms from various CVs used in FlyBase for GO ontology, anatomy, developmental stage and phenotype terms. You can either browse through the CVs from these top-level terms or you can search for terms matching what you are looking for, using the search box above the terms. By default, your search will be performed using CV terms from the whole subtree of the term you've chosen. If you wish to search only for the exact CV term you have chosen, select "This CV term only" from the “Retrieve records annotated with” drop down menu. (Hint: you'll retrieve more results by searching the whole subtree)

Step 3: Once you've decided on a term, click on the green box to use the term in your search. The window returns to the QB query page, where the first QuerySegment has been populated with your chosen CV term.

Step 4: Add additional query segments as described above (optional).

Step 5: Click on “Run query”.

Searching Gene Expression Data

Hints and Tips for searching expression patterns:

Additional QB Features

Any value, no value

Logical operators

Phrases

Calculations

Hierarchical CV queries

Field content dictionaries

Further Information