Skip to content

allSampleCount returns 1 for all studies in API response #2237

@ckntav

Description

@ckntav

Hello,
I've noticed that the allSampleCount field is returning a value of 1 for all studies when querying the cBioPortal API, regardless of the actual number of samples in each study.

How to reproduce:

library(httr2)

# Direct API request
response <- request("https://www.cbioportal.org/api/studies") %>%
  req_perform()

# Parse the response
studies <- resp_body_json(response)

# Check allSampleCount values
sapply(studies, function(x) x$allSampleCount)

Expected behavior:
The allSampleCount field should return the actual number of samples for each study.

Actual behavior:
The allSampleCount field returns 1 for all studies.

Additional context:
This issue was originally reported in the waldronlab/cBioPortalData repository (issue 87: waldronlab/cBioPortalData#87), where it was identified that this is a data-level issue rather than a package issue.

Thank you for looking into this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions