arq5x/gemini — pull request #130 by roryk (2013-05-08 06:13:57+00:00)
Title: Queries involving genotype information are more specifically flagged

The old behavior was to pull in the genotype columns whenever a query involving the variants table was used. This lead to some weird behavior where queries like:
```
select distinct is_exonic from variants
```
would return a bajillion 'distinct' 0s and 1s instead of the expected behavior, showing the all of the values in the is_exonic column.

I swapped the is_variant_query boolean for a function _query_needs_genotype_info(), which returns True if the query involves the variant table and the query has a term that starts with "gt", so the genotype information only gets looked up if it is specified.

Don't pull this yet until I make sure everything is kosher tomorrow.