Opened 6 months ago

Closed 6 months ago

#1595 closed defect (fixed)

Filtering with multiple rows that have different genotypes in the query

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: major Milestone: Variant Search v1.13
Component: net.sf.basedb.varsearch Keywords:
Cc:

Description

I found an issue with displaying the results when searching for variants and using multiple filter rows. The use case is that we have a single SNP and we want to create a table that list all samples and their genotypes. This is for the OncoArray data set.

The first filter row is a simple chr:pos filter (for example: chr:123456). Since this will only match items that have a 0/1 or 1/1 genotype we add a second filter row with the filter: chr:123456 AND gt:0/0.

Now, all items are matched, but the genotype information is only displayed for those items with a 0/1 or 1/1 genotype. If we reverse the filter rows the display also reverses and display only information for the items with a 0/0 genotype.

So it seems like the initial filtering is correct but when deciding the SNP information to display only the first filter row is used.

Note! This seems to only be an issue with the OncoArray and imputed filter. When used with the targeted genotyping data it works as expected (and there is no use for this kind of filter with the other variants calls since they don't include 0/0 variants).

Change History (1)

comment:1 by Nicklas Nordborg, 6 months ago

Resolution: fixed
Status: newclosed

In 7732:

Fixes #1595: Filtering with multiple rows that have different genotypes in the query

The problem was that a single instance of the RequestedGenotype class was being used. So even if the genotype was updated as the filtering rows was processed only a single value was used later on when displaying the results. This has been fixed so that the RequestedGenotype instance is cloned for each filter row so that each individual value can be used later.

But, it was also relatively ease to intercept the wildcard query (eg. gt:*) and handle that as a special case which means that the simplest way to list all genotypes for a variant is to use a query like: chr1:123456 AND gt:*

Note: See TracTickets for help on using tickets.