The Filter on Custom Criteria tool can be used to identify and extract variants or annotations that fulfill certain criteria. It will create a filtered copy of the track used as input containing only the annotations that were not filtered away.
To run the Filter on Custom Criteria, go to:
Toolbox | Track Tools () | Annotate and Filter () | Filter on Custom Criteria ()
In the first step, select a variant track or an annotation track as input and click Next.
In the Filter criteria dialog, use the browse icon () to specify the variant or annotation track that contains at least all the criteria you want to filter the first track on. Once specified, click on the Load Annotations button to create the drop down menu available in the filter field below. Note that in this context, we call this track a guidance track because it will define what are the filter criteria available; in the dialog, Load Annotations will transform every column headers of the guidance track in a filtering criteria.
An example of filter criteria is shown in figure 24.24. In this example, we filter away all variants that are not found on chromosome 1 and that are not homozygous. As a result you will only keep the variants that are homozygous and found on chromosome 1. The bottom filter field on the figure shows the various other filter criteria available from the guidance variant track.
The output from the Filter on Custom Criteria tool is a variant or annotation track (and associated table) that contains only the variants or annotations that fulfill the specified filter criteria.