1. Return all information from the variant table
SELECT * from variant
  1. Return all variants with MAF > 0.1
SELECT * from variant v
WHERE v.maf > 0.1
  1. For each sample, find all genes and variants where the given sample has either:
  1. a single, homozygous, LOF mutation and that sample is the _only_ sample with that mutation.
  2. two or more heterozygous LOF mutations (i.e., a possible compound heterozygote), and that sample is the _only_ sample with those mutations.
::

SELECT v.*, gt.genotype, g.gene FROM variant v,

genotype gt, sample s, gene ge
WHERE v.variant_id = gt.variant_id
AND gt.sample_id = s.sample_id AND v.gene_id = ge.gene_id AND s.sample = “NA00001” AND v.lof = 1 AND (v.num_het = 1 OR v.num_hom_alt = 1) AND g.genotype != “hom_ref” AND g.genotype != “unknown”
comments powered by Disqus

This Page

Edit and improve this document!

This file can be edited directly through the Web. Anyone can update and fix errors in this document with few clicks -- no downloads needed.

  1. Go to <no title> on GitHub.
  2. Edit files using GitHub's text editor in your web browser (see the 'Edit' tab on the top right of the file)
  3. Fill in the Commit message text box at the bottom of the page describing why you made the changes. Press the Propose file change button next to it when done.
  4. Then click Send a pull request.
  5. Your changes are now queued for review under the project's Pull requests tab on GitHub!

For an introduction to the documentation format please see the reST primer.