Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marfantyk committed Oct 22, 2023
1 parent 4cd0a56 commit 470c8ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion just_lipidmetabolism.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def annotate (self, input_data:dict):
study_design = self.merge_studies(studies)

query:str = "SELECT rsids.risk_allele, gene, genotype, genotype_specific_conclusion, rsid_conclusion, weight, " \
" pmids, population, p_value FROM rsids, " \
" pmids, population FROM rsids, " \
f" weight WHERE rsids.rsid = '{rsid}' AND weight.rsid = '{rsid}'" \
f" AND weight.risk_allele='{alt}' AND zygosity ='{zygot}' AND allele='{alt}'; "

Expand Down
5 changes: 2 additions & 3 deletions lipidmetabolism_ref_homo.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,14 @@ def end(self):
if self.rsid_map[rsid]['exist']:
allele:str = self.rsid_map[rsid]['allele']
genotype:str = allele+allele

query_for_studies:str = f"SELECT pubmed_id, populations, p_value FROM studies WHERE snp = '{rsid}'"
self.parent.lipid_cursor.execute(query_for_studies)
studies = self.parent.lipid_cursor.fetchall()
study_design = self.parent.merge_studies(studies)

query:str = "SELECT rsids.risk_allele, gene, genotype, genotype_specific_conclusion, rsid_conclusion, weight, " \
" pmids, population, p_value FROM rsids, " \
f" weight WHERE rsids.rsid = '{rsid}' AND weight.rsid = '{rsid}' AND genotype = '{genotype}';"
" pmids, population, rsids.p_value FROM rsids, " \
f" weight WHERE rsids.rsid = '{rsid}' AND weight.rsid = '{rsid}' AND weight.state = 'ref' AND weight.zygosity='hom'"

self.parent.lipid_cursor.execute(query)
row:tuple = self.parent.lipid_cursor.fetchone()
Expand Down

0 comments on commit 470c8ec

Please sign in to comment.