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

Разработать эндпоинт study/*type*/*id* #140

Open
const8ine opened this issue Apr 10, 2023 · 0 comments
Open

Разработать эндпоинт study/*type*/*id* #140

const8ine opened this issue Apr 10, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@const8ine
Copy link
Member

const8ine commented Apr 10, 2023

Для каждого исследования разработать эндпоинт study/type/id отдающие эксперименты по id.

Задача:
Шаг 1. Переименовать роут research в study.
Шаг 2. Добавить ко всем роутам, которые сейсчас reserach/*тип* (https://open-genes.com/api/docs#/research) роут куда передается id конкретного эксперимента этого типа. Формат ответа точно такой же, только с одним экспериментом в массиве items.
Шаг 3. Проверить что ничего не сломалось в старом функционале. Нужно убедиться что запросы с разными фильтрами и параметрами работают и не выдают ошибку (например https://open-genes.com/api/research/lifespan-change?sortOrder=DESC&lang=en&page=1&pageSize=20&isHidden=1)

Пример:
Есть роут api/research/lifespan-change. Нужно поменять роут на api/study/lifespan-change, добавить эндпоинт api/study/lifespan-change/*id*.

Пример ответа:
GET https://open-genes.com/api/research/lifespan-change/365

{
  "options": {
    "objTotal": 1,
    "total": null,
    "pagination": {
      "page": 1,
      "pageSize": 20,
      "pagesTotal": 1
    }
  },
  "items": [
    {
      "id": 365,
      "modelOrganism": "mouse",
      "organismLine": "C57BL/6J",
      "sex": "male",
      "temperatureFrom": 22.0,
      "temperatureTo": 22.0,
      "diet": "standard chow",
      "expressionChangeTissue": null,
      "lifespanTimeUnit": "days",
      "interventionResultForLifespan": "increases lifespan",
      "expressionMeasurementType": null,
      "controlCohortSize": 22,
      "experimentCohortSize": 14,
      "expressionChangePercent": null,
      "lifespanMinControl": 175.0,
      "lifespanMeanControl": 756.0,
      "lifespanMedianControl": 866.0,
      "lifespanMaxControl": 955.0,
      "lifespanMinExperiment": 686.0,
      "lifespanMeanExperiment": 951.0,
      "lifespanMedianExperiment": 941.0,
      "lifespanMaxExperiment": 1095.0,
      "lifespanMinChangePercent": 292.0,
      "lifespanMeanChangePercent": 26.0,
      "lifespanMedianChangePercent": 9.0,
      "lifespanMaxChangePercent": 14.7,
      "lMinChangeStatSignificance": null,
      "lMeanChangeStatSignificance": true,
      "lMedianChangeStatSignificance": null,
      "lMaxChangeStatSignificance": null,
      "doi": "10.1210/en.2003-0374",
      "pmid": "",
      "comment": "GHR deletion in mice caused dwarfism, enhanced insulin sensitivity, and significantly extended longevity.\r\nThe average lifespan of GHR −/− C57BL/6J male mice was significantly longer than their controls.",
      "populationDensity": 2,
      "interventions": {
        "controlAndExperiment": [
          
        ],
        "experiment": [
          {
            "id": 365,
            "gene": 1,
            "interventionMethod": "gene knockout",
            "interventionWay": "transgenic animals obtaining",
            "tissueSpecific": false,
            "tissueSpecificPromoter": "",
            "treatmentStart": null,
            "treatmentEnd": null,
            "inductionByDrugWithdrawal": 0,
            "treatmentDescription": "",
            "startTimeUnit": null,
            "endTimeUnit": null,
            "genotype": "-/-",
            "drugDeliveryWay": null,
            "drug": null,
            "startStageOfDevelopment": null,
            "endStageOfDevelopment": null,
            "treatmentPeriod": null,
            "experimentMainEffect": "loss of function",
            "tissues": [
              
            ]
          }
        ]
      },
      "interventionImproves": [
        {
          "id": 1,
          "name": "glucose metabolism"
        },
        {
          "id": 23,
          "name": "insulin sensitivity"
        },
        {
          "id": 62,
          "name": "INS/IGFR pathway"
        }
      ],
      "interventionDeteriorates": [
        
      ],
      "geneId": 1,
      "geneNcbiId": 2690,
      "geneName": "growth hormone receptor",
      "geneSymbol": "GHR",
      "geneAliases": [
        "GHBP",
        "GHIP"
      ]
    }
  ]
}
@const8ine const8ine added the enhancement New feature or request label Aug 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants