Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out some interesting example SQL queries #1

Open
simonw opened this issue Sep 20, 2019 · 9 comments
Open

Figure out some interesting example SQL queries #1

simonw opened this issue Sep 20, 2019 · 9 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed

Comments

@simonw
Copy link
Collaborator

simonw commented Sep 20, 2019

My knowledge of genetics has left me short here. I'd love to be able to provide some interesting example SELECT queries - maybe one that spots if you are likely to have red hair?

@simonw simonw added documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed labels Sep 20, 2019
@simonw
Copy link
Collaborator Author

simonw commented Oct 21, 2019

Thanks to help from Dr. Laura Cantino at Science Hack Day San Francisco I've been able to pull together this query:

select rsid, genotype, case genotype
  when 'AA' then 'brown eye color, 80% of the time'
  when 'AG' then 'brown eye color'
  when 'GG' then 'blue eye color, 99% of the time'
end as interpretation from genome where rsid = 'rs12913832'

See also https://www.snpedia.com/index.php/Rs12913832 - in particular this table:

rs12913832_-_SNPedia

@simonw
Copy link
Collaborator Author

simonw commented Oct 21, 2019

natalie__select_rsid__genotype__case_genotype_when__AA__then__brown_eye_color__80__of_the_time__when__AG__then__brown_eye_color__when__GG__then__blue_eye_color__99__of_the_time__end_as_interpretation_from_genome_where_rsid____rs12913832__an

@cobiadigital
Copy link

Risk of autoimmune disorders: https://www.snpedia.com/index.php/Genotype

select rsid, genotype, case genotype
  when 'AA' then '2x risk of rheumatoid arthritis and other autoimmune diseases'
  when 'GG' then 'Normal risk for autoimmune disorders'
end as interpretation from genome where rsid = 'rs2476601'

@cobiadigital
Copy link

cobiadigital commented Jan 22, 2021

The "Warrior Gene" https://www.snpedia.com/index.php/Rs4680

select rsid, genotype, case genotype
  when 'AA' then '(worrier) advantage in memory and attention tasks'
  when 'AG' then 'Intermediate dopamine levels, other effects'
  when 'GG' then '(warrior) multiple associations, see details'
end as interpretation from genome where rsid = 'rs4680'

@cobiadigital
Copy link

rs7903146 Influences risk of Type-2 diabetes
https://www.snpedia.com/index.php/Rs7903146

select rsid, genotype, case genotype
  when 'CC' then 'Normal (lower) risk of Type 2 Diabetes and Gestational Diabetes.'
  when 'CT' then '1.4x increased risk for diabetes (and perhaps colon cancer).'
  when 'TT' then '2x increased risk for Type-2 diabetes'
end as interpretation from genome where rsid = 'rs7903146'

@cobiadigital
Copy link

cobiadigital commented Jan 22, 2021

Both rs10757274 and rs2383206 can both indicate higher risks of heart disease
https://www.snpedia.com/index.php/Rs2383206

select rsid, genotype, case genotype
  when 'AA' then 'Normal'
  when 'AG' then '~1.2x increased risk for heart disease'
  when 'GG' then '~1.3x increased risk for heart disease'
end as interpretation from genome where rsid = 'rs10757274'
select rsid, genotype, case genotype
  when 'AA' then 'Normal'
  when 'AG' then '1.4x increased risk for heart disease'
  when 'GG' then '1.7x increased risk for heart disease'
end as interpretation from genome where rsid = 'rs2383206'

@cobiadigital
Copy link

rs53576: the oxytocin receptor (OXTR) gene

select rsid, genotype, case genotype
  when 'AA' then 'Lack of empathy?'
  when 'AG' then 'Lack of empathy?'
  when 'GG' then 'Optimistic and empathetic; handle stress well'
end as interpretation from genome where rsid = 'rs53576'

@cobiadigital
Copy link

rs1333049 associated with coronary artery disease
https://www.snpedia.com/index.php/Rs1333049


select rsid, genotype, case genotype
  when 'CC' then '1.9x increased risk for coronary artery disease'
  when 'CG' then '1.5x increased risk for CAD'
  when 'GG' then 'normal'
end as interpretation from genome where rsid = 'rs1333049'

@cobiadigital
Copy link

RS1800955 is related to novelty seeking and ADHD
https://www.snpedia.com/index.php/Rs1800955

select rsid, genotype, case genotype when 'CC' then 'increased susceptibility to novelty seeking' when 'CT' then 'increased susceptibility to novelty seeking' when 'TT' then 'normal' end as interpretation from genome where rsid = 'rs1800955'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants