Giter Site home page Giter Site logo

Comments (8)

jfjlaros avatar jfjlaros commented on June 11, 2024 1

I usually use the normalizer in combination with some non-standard and not very well documented syntax that uses the build name as a reference ID, e.g., GRCh38(NM_003002.4):c.92del.

Please note that both the position converter as well as the normalizer (using this syntax) convert between the g. and c. descriptions using the transcript information as annotated on the same reference reference. E.g., it converts between NC_000011.10(NM_003002.4) and NC_000011.10, not between NM_003002.4 and NC_000011.10. The mapper can be used to convert between different reference sequences.

from mutalyzer.

jfjlaros avatar jfjlaros commented on June 11, 2024

The position_convert method can only be called using a GET request, please see the documentation for more information.

Below is a working example.

import requests


params = {
    'reference_id': 'NC_000011.10',
    'from_selector_id': 'NM_003002.4',
    'from_coordinate_system': 'c',
    'position': '92',
    'to_coordinate_system': 'g',
    'include_overlapping': 'false'}

url = 'https://mutalyzer.nl/api/position_convert'

response = requests.get(url, params=params)
print(response.text)

Output:

{
  "input_model": {
    "reference": {
      "id": "NC_000011.10",
      "selector": {
        "id": "NM_003002.4"
      }
    },
    "coordinate_system": "c",
    "variants": [
      {
        "location": {
          "type": "point",
          "position": 92
        }
      }
    ]
  },
  "converted_model": {
    "reference": {
      "id": "NC_000011.10"
    },
    "coordinate_system": "g",
    "variants": [
      {
        "location": {
          "type": "point",
          "position": 112087896
        }
      }
    ]
  }
}

from mutalyzer.

xiucz avatar xiucz commented on June 11, 2024

Thank you very much for the example. It has helped me to get started with using the API in Python. ^_^. I have been searching for information on how to use the Mutalyzer API for quite some time.

Furthermore, often there is no reference_id information available. Where do you directly obtain the corresponding NC_ information for NM_?

Best,
xiucz

from mutalyzer.

xiucz avatar xiucz commented on June 11, 2024

Thank you for your reminder of the reference version(hg19 or hg38), it is highly appreciated. Mutalyzer2 would indeed be more user-friendly.

from mutalyzer.

xiucz avatar xiucz commented on June 11, 2024

#89 (comment)

I just realized that this is the coordinate system of hg38(default). How can I obtain the results in hg19? Which parameter should I use?

from mutalyzer.

jfjlaros avatar jfjlaros commented on June 11, 2024

Mutalyzer2 would indeed be more user-friendly.

In what way? The examples above are using version 3.

I just realized that this is the coordinate system of hg38(default).

The position converter does not use any genome build. NC_000011.10 is part of the GRCh37 (hg19) genome build.

from mutalyzer.

xiucz avatar xiucz commented on June 11, 2024

I understand now that GRCh38(NM_003002.4)corresponds to NC_000011.10,

whereas GRCh37(NM_003002.4) corresponds to NC_000011.9.

Thanks a lot!

from mutalyzer.

jfjlaros avatar jfjlaros commented on June 11, 2024

You are welcome.

from mutalyzer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.