broadinstitute/IGV — pull request #3 by baj12 (2012-05-29 07:25:22+00:00)
Title: Filter for tags in sam/bam  track

Hi,

this fork of IGV introduces filtering to sam/bam tracks. I have added menu item in the right click menu of the sam/bam track under "Group alignment by" and before "Sort alignments by".

A new window will show. One can create as many filters as desired. The filters work only on the tags of SAM/BAM files (e.g. NM:i:2). One can search for numerical ranges, strings having wild cards, regular expressions or just match a given string. Missing values can also be excluded or included.

The procedure is as follows: The filters are being applied to each read from top to bottom. If a filter matches it is either excluded or included in the display, depending on the settings ("include alignments" or "exclude alignments". If a read does not match a filter, the next filter is applied. If no filter matches the read is being displayed.

One has to explicitly "create" and "apply" a filter AND also click "save filters" to use them otherwise they might get lost.

Obviously you will see that I am not a swing nor a JAVA expert, please feel free to optimize the design.

Currently, I have to move to a different region in the genome and then back to redraw the alignment as I don't know how to call the appropriate function from my filter class..

Hope this works for you and please feel free to send me any comments or suggestions...

Best,

Bernd