Skip to main content
expanding abbreviastion
Source Link
Kamil S Jaron
  • 5.7k
  • 2
  • 28
  • 59

I am trying to query metadata from the GDCGenomic Data Commons (GDC) Data Portal and used the sample code from its website:

import requests
import json

cases_endpt = 'https://api.gdc.cancer.gov/cases'

# The 'fields' parameter is passed as a comma-separated string of single names.
fields = ["submitter_id",
          "case_id",
          "primary_site",
          "disease_type",
          "diagnoses.vital_status"
         ]

fields = ','.join(fields)

params = {"fields": fields,
          "format": "TSV",
          "size": "100"
         }

response = requests.get(cases_endpt, params = params)

print(response.content)

However, I am not getting a tsv file in return. I am ultimately getting an FPKM instead. Any help is appreciated!

I am trying to query metadata from the GDC Data Portal and used the sample code from its website:

import requests
import json

cases_endpt = 'https://api.gdc.cancer.gov/cases'

# The 'fields' parameter is passed as a comma-separated string of single names.
fields = ["submitter_id",
          "case_id",
          "primary_site",
          "disease_type",
          "diagnoses.vital_status"
         ]

fields = ','.join(fields)

params = {"fields": fields,
          "format": "TSV",
          "size": "100"
         }

response = requests.get(cases_endpt, params = params)

print(response.content)

However, I am not getting a tsv file in return. I am ultimately getting an FPKM instead. Any help is appreciated!

I am trying to query metadata from the Genomic Data Commons (GDC) Data Portal and used the sample code from its website:

import requests
import json

cases_endpt = 'https://api.gdc.cancer.gov/cases'

# The 'fields' parameter is passed as a comma-separated string of single names.
fields = ["submitter_id",
          "case_id",
          "primary_site",
          "disease_type",
          "diagnoses.vital_status"
         ]

fields = ','.join(fields)

params = {"fields": fields,
          "format": "TSV",
          "size": "100"
         }

response = requests.get(cases_endpt, params = params)

print(response.content)

However, I am not getting a tsv file in return. I am ultimately getting an FPKM instead. Any help is appreciated!

I am trying to query metadata from the GDC Data Portal and used the sample code from its website:

import requests import json

cases_endpt = 'https://api.gdc.cancer.gov/cases'

The 'fields' parameter is passed as a comma-separated string of single names.

fields = [ "submitter_id", "case_id", "primary_site", "disease_type", "diagnoses.vital_status" ]

fields = ','.join(fields)

params = { "fields": fields, "format": "TSV", "size": "100" }

response = requests.get(cases_endpt, params = params)

print(response.content)

import requests
import json

cases_endpt = 'https://api.gdc.cancer.gov/cases'

# The 'fields' parameter is passed as a comma-separated string of single names.
fields = ["submitter_id",
          "case_id",
          "primary_site",
          "disease_type",
          "diagnoses.vital_status"
         ]

fields = ','.join(fields)

params = {"fields": fields,
          "format": "TSV",
          "size": "100"
         }

response = requests.get(cases_endpt, params = params)

print(response.content)

However, I am not getting a tsv file in return. I am ultimately getting an FPKM instead. Any help is appreciated!

I am trying to query metadata from the GDC Data Portal and used the sample code from its website:

import requests import json

cases_endpt = 'https://api.gdc.cancer.gov/cases'

The 'fields' parameter is passed as a comma-separated string of single names.

fields = [ "submitter_id", "case_id", "primary_site", "disease_type", "diagnoses.vital_status" ]

fields = ','.join(fields)

params = { "fields": fields, "format": "TSV", "size": "100" }

response = requests.get(cases_endpt, params = params)

print(response.content)

However, I am not getting a tsv file in return. I am ultimately getting an FPKM instead. Any help is appreciated!

I am trying to query metadata from the GDC Data Portal and used the sample code from its website:

import requests
import json

cases_endpt = 'https://api.gdc.cancer.gov/cases'

# The 'fields' parameter is passed as a comma-separated string of single names.
fields = ["submitter_id",
          "case_id",
          "primary_site",
          "disease_type",
          "diagnoses.vital_status"
         ]

fields = ','.join(fields)

params = {"fields": fields,
          "format": "TSV",
          "size": "100"
         }

response = requests.get(cases_endpt, params = params)

print(response.content)

However, I am not getting a tsv file in return. I am ultimately getting an FPKM instead. Any help is appreciated!

Source Link
lab
  • 33
  • 2

querying metadata (GDC Data Portal) in python3

I am trying to query metadata from the GDC Data Portal and used the sample code from its website:

import requests import json

cases_endpt = 'https://api.gdc.cancer.gov/cases'

The 'fields' parameter is passed as a comma-separated string of single names.

fields = [ "submitter_id", "case_id", "primary_site", "disease_type", "diagnoses.vital_status" ]

fields = ','.join(fields)

params = { "fields": fields, "format": "TSV", "size": "100" }

response = requests.get(cases_endpt, params = params)

print(response.content)

However, I am not getting a tsv file in return. I am ultimately getting an FPKM instead. Any help is appreciated!