Create a marker

❗️

Heads Up!

This page documents the Advance Access version (think "beta" but with fewer bugs) of the folders functionality.

This call creates a new genetic marker on a BAM file.

Request

https://api.sbgenomics.com/v2/genome/markers/
https://eu-api.sbgenomics.com/genome/markers/

Example request

POST /v2/genome/markers HTTP/1.1
Host: api.sbgenomics.com
X-SBG-Auth-Token: 3259c50e1ac5426ea8f1273259740f75
X-SBG-Advance-Access: advance
curl -X POST -H "X-SBG-Auth-Token: c2e05946fb9a494ab5c19c72a94cb4ac" -H "x-sbg-advance-access: advance" -H "Content-Type: application/json" -d '{
    "name" : "my new folder",
    "type" : "folder",
    "parent": "57fb98c51c94d72f08ba0544"
}
from sevenbridges import Api

api = Api(url='https://api.sbgenomics.com/v2',
          token='3259c50e1ac5426ea8f1273259740f74',
          advance_access=True)

# send POST request to SB API
marker = api.markers.create(
    file='592444771c94679800e99c23',
    name='Some cancer marker',
    position={
        'start': 1233,
        'end': 1244
    },
    chromosome='chr1'
)

print(marker.id)

Header Fields

Name

Description

X-SBG-Auth-Token
required

Your Seven Bridges Platform authentication token.

Content-Type
required

application/json

X-SBG-Advance-Access
required

advance

Request body

In the request body, you should enter the following list of key-value pairs:

Name

Data type

Description

file

String

This is the file ID for the BAM file for which you wish to create a marker. Files are specified by their IDs, which you can obtain by making the API call to List markers available on a file.

name

String

This is the name for the genetic marker.

chromosome

String

Number of the chromosome where the marker is placed.

position

String

This object is the start and end position for the genetic marker on the BAM file.

description

String

Text description of the marker.

Example request body

{
    "name": "Test marker",
    "description": "Marker Description",
    "file": "5e78b9cee4b0bc6accb81942",
    "chromosome": "1",
    "position": {
        "start": 140118297,
        "end": 140118297
    },
    "private": false
}

Response

See a list of Seven Bridges Platform-specific response codes that may be contained in the body of the response.

Example response body

{
    "href": "https://api.sbgenomics.com/v2/genome/markers/604f494fea2289eeda79abc8",
    "id": "604f494fea2289eeda79abc8",
    "name": "Test marker",
    "description": "Marker Description",
    "file": "5e78b9cee4b0bc6accb81942",
    "chromosome": "1",
    "position": {
        "start": 140118297,
        "end": 140118297
    },
    "created_by": "rfranklin",
    "private": false
}

See a list of Seven Bridges Platform-specific response codes that may be contained in the body of the response.