New filtering settings for bigBeds in Track Hubs.

Skip to first unread message

Brian Lee

Sep 10, 2019, 6:52:06 PM9/10/19
Track Hubs can now have hubs that filter on the additional fields.  For example, if you have a standard BED file with the name field, you can now add a setting like the below to your track hub stanza to allow users to filter on that name:

nameFilterText * 

By adding the setting "nameFilterText *" the UCSC Genome Browser expects to find a field with "name" in the bigBed that is attached for that track, where  * is interpreted to display all named items by default with a wildcard match.  A user can then click into the Track Settings and enter a more specific restriction.  For example, if the bigBed for the Track Hub was a track of Transcription Factor Binding Sites (TFBS), by adding "nameFilterText *" a user would then have an option to go to the track and type JUN* in place of * and in the current view only named TFBS starting with JUN would display.  Or a user could enter *UN*  to select a wider set of TFBS items in the current view that included JUN items and other items with UN in the name. The option to use regular expressions is also provided beyond wildcards.

This new filtering setting can apply to any field that has text. If you had an additional field named "source" in the .as file used to create the bigBed, you should be able to add "sourceFilterText *" and then a filter on the source text information should work. 

For numerical fields, there is also the ability to filter on numbers. For example, if you had a field numberOfEvents as defined in the -as file used to create the bigBed, you could have a setting line such as "numberOfEventsFilterValues 0" to say you wanted to allow a user to filter on these numerical values. By using 0 you are making all items visible, where raising the value would filter out some items by default upon first viewing the data.

We have yet to document these settings, but will be working on adding them to our Track Hub Documentation soon:

Brian Lee

Dec 10, 2019, 2:02:13 PM12/10/19
Dear Track Hub Developers,

We have enhanced and improved our Track Hub Filtering system for bigBeds:

With the release of our latest software this afternoon we have allowed filters to use the following settings:
filter.<fieldName> [<default integer>]
filterByRange.<fieldName> <off/on>
filterLimits.<fieldName> <low>[:<high>]
filterText.<fieldName> [<default search string>]
filterType.<fieldName> <wildcard/regexp>
filterValues.<fieldName> <value1,value2,value3...>
filterValuesDefault.<fieldName> <value1,value2,value3...>
filterLimits.<fieldName> <singleList/multipleListOr/multipleListAnd>
filterLabel.<fieldName> <label>
With this official documentation of the new filter methodology, we enhanced the code to fit this system of newSetting.<fieldName> followed by the setting parameters, improved over the original approach described in this first email thread in September. 

With a bigBed that has a field in the .as file such as geneName there is now the ability to have filter such as:
Or putting in a default value:
    filterText.geneName *BRCA*
This would then load data with a default filtering, where a wildcard search of *BRCA* equivalent to a regexp search .*BRCA.* occurs. One can specify the filter method.
    filterText.geneName \.1$
    filterType.geneName regexp
This example once again enables filtering on the same field, however, it is declaring regexp as the filter type and passing a regular expression to be applied by default. In this case, we are targeting all geneName items that are version 1.

Please see all the documentation for further examples of all the new settings.
Reply all
Reply to author
0 new messages