Skip to content

Commit

Permalink
release (#118)
Browse files Browse the repository at this point in the history
* Changed api/gene/symbols output format and corrected doc

* bugfix: return lang_en if lang_ru empty

* OG-936: measurementMethod fix empty response

* Add updated datasets with missing experiments (#107)

* New datasets with studies that were not added

* Correct dataset for blue form

* Correct dataset for pink form

* Rename new datasets

* Change names of the datasets

* Update dataset with missing experiments

* Noissue. Do not change timestamp when gene was created

* Noissue. Don't perform delete in longevity associations script since now

* Noissue. Update confidence_level.tsv dataset

* Updated first query assignment to avoid duplicates

* OG-943: change logic and refactor code for the script binding hallmarks and GO-terms

* Added join in _form, changed filter behavior, deleted created tester router

* Update README.md

* #115. Remove GROUP BY

Co-authored-by: psnewbee <savlovp@mail.ru>
Co-authored-by: anthony <antonwowis@yandex.ru>
  • Loading branch information
3 people authored Dec 27, 2022
1 parent 33b01b0 commit 58e053b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Open Genes Python API
# Open Genes API

[![API CI](https://github.com/open-genes/open-genes-api/actions/workflows/api.yml/badge.svg?branch=master)](https://github.com/open-genes/open-genes-api/actions/workflows/api.yml)
[![CodeQL](https://github.com/open-genes/open-genes-api/actions/workflows/codeql-analysis.yml/badge.svg?branch=master)](https://github.com/open-genes/open-genes-api/actions/workflows/codeql-analysis.yml)

Open Genes API is based on [FastAPI](https://fastapi.tiangolo.com/) framework and provides data for genes and experiments in Open Genes database.

## Architecture

Expand All @@ -17,6 +22,8 @@

## Development



### Build local development image

```
Expand Down
1 change: 1 addition & 0 deletions api/db/dao.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ def get_symbols(self):


class ResearchesDAO(BaseDAO):

def increase_lifespan_search(self, input):
IncreaseLifespanSearched.__fields__['geneAliases'].outer_type_ = str

Expand Down
1 change: 0 additions & 1 deletion api/models/gene.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ class GeneCommon(BaseModel):
LEFT JOIN gene_to_ontology ON gene.id = gene_to_ontology.gene_id
LEFT JOIN gene_ontology_to_aging_mechanism_visible ON gene_to_ontology.gene_ontology_id = gene_ontology_to_aging_mechanism_visible.gene_ontology_id
INNER JOIN aging_mechanism ON gene_ontology_to_aging_mechanism_visible.aging_mechanism_id = aging_mechanism.id AND aging_mechanism.name_en != ''
GROUP BY aging_mechanism.id
""",
)
]
Expand Down
13 changes: 10 additions & 3 deletions api/models/researches.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,11 +600,17 @@ class IncreaseLifespanSearchInput(PaginationInput, LanguageInput, SortInput):
lambda value: value.split(',') + [len(value.split(','))],
],
'bySpecies': [
lambda value: '(select count(distinct model_organism_id) from lifespan_experiment where lifespan_experiment.gene_id=gene.id and model_organism_id in ('
lambda value: 'model_organism.id in ('
+ ','.join(['%s' for v in value.split(',')])
+ '))=%s',
lambda value: value.split(',') + [len(value.split(','))],
+ ')',
lambda value: value.split(','),
],
# 'bySpecies': [
# lambda value: '(select count(distinct model_organism_id) from lifespan_experiment where lifespan_experiment.gene_id=gene.id and model_organism_id in ('
# + ','.join(['%s' for v in value.split(',')])
# + '))=%s',
# lambda value: value.split(',') + [len(value.split(','))],

'byOrigin': [
lambda value: '(select count(*) from phylum where gene.phylum_id=phylum.id and phylum.name_phylo in ('
+ ','.join(['%s' for v in value.split(',')])
Expand Down Expand Up @@ -662,6 +668,7 @@ class IncreaseLifespanSearched(IncreaseLifespan):
left join statistical_significance as ssmean on ssmean.id = general_lifespan_experiment.lifespan_mean_change_stat_sign_id
left join statistical_significance as ssmedian on ssmedian.id = general_lifespan_experiment.lifespan_median_change_stat_sign_id
left join statistical_significance as ssmax on ssmax.id = general_lifespan_experiment.lifespan_max_change_stat_sign_id
left join model_organism on model_organism.id = general_lifespan_experiment.model_organism_id
@FILTERING@
@PAGING@
"""
Expand Down

0 comments on commit 58e053b

Please sign in to comment.