0

我已经使用 Google Genomics API 大约一天了。我已经成功调用了许多 API,例如 Datasets.list、Datasets.get 甚至 Readsets.search,但我遇到了 Callsets.search 的问题。

我正在发出 POST 请求:

POST https://www.googleapis.com/genomics/v1beta/callsets/search?key=MY_KEY_HERE

我的请求正文是:

{
    "datasetIds" : [
        "376902546192"
    ]
}

但我得到的回应是:

{
    "error" : { 
        "errors": [ 
            { 
                "domain": "global", 
                "reason": "invalid", 
                "message": "Unknown field name: datasetIds", 
                "locationType": "other", 
                "location": "" 
            } 
        ], 
        "code": 400, 
        "message": "Unknown field name: datasetIds" 
    } 
}

根据文档:https://developers.google.com/genomics/v1beta/reference/callsets/search datasetIds 是一个完全有效的参数。

让我困惑的疯狂事情是这个相同的请求在readsets/search端点上工作得很好,但不是callsets/search端点?我几乎想知道这是否是 API 中的错误。任何人都可以帮忙吗?

4

2 回答 2

0

我刚刚测试了它,它可以工作。以下是结果:

$ java -jar target/genomics-tools-client-java-v1beta.jar searchcallsets --dataset_id 376902546192

Getting call sets from: 1000 Genomes
{"created":"1410541777431","id":"376902546192-0","name":"HG00345","sampleId":"HG00345","variantSetIds":["376902546192"]}
{"created":"1410541777431","id":"376902546192-1","name":"HG00369","sampleId":"HG00369","variantSetIds":["376902546192"]}
{"created":"1410541777431","id":"376902546192-2","name":"HG01085","sampleId":"HG01085","variantSetIds":["376902546192"]}
{"created":"1410541777431","id":"376902546192-3","name":"HG01107","sampleId":"HG01107","variantSetIds":["376902546192"]}
{"created":"1410541777431","id":"376902546192-4","name":"NA12347","sampleId":"NA12347","variantSetIds":["376902546192"]}
{"created":"1410541777431","id":"376902546192-5","name":"NA18579","sampleId":"NA18579","variantSetIds":["376902546192"]}
{"created":"1410541777431","id":"376902546192-6","name":"HG00372","sampleId":"HG00372","variantSetIds":["376902546192"]}
{"created":"1410541777431","id":"376902546192-7","name":"HG01134","sampleId":"HG01134","variantSetIds":["376902546192"]}
{"created":"1410541777431","id":"376902546192-8","name":"NA18532","sampleId":"NA18532","variantSetIds":["376902546192"]}
{"created":"1410541777431","id":"376902546192-9","name":"NA18597","sampleId":"NA18597","variantSetIds":["376902546192"]}

希望能帮助到你,

保罗

于 2014-10-15T00:32:37.667 回答
0

Received this from Google:

The variants and callsets APIs just went through some breaking changes so that they'll be compliant with GA4GH v0.5 when they go fully public.

All breaking changes should be done now - and I'll try to get all the docs and code samples updated today or tomorrow.

Until then, you can see the real parameters in the API explorer (it can't lie :) - in this case, the datasetId field has now changed to "variantSetIds" (still using that same value, just a rename)

于 2014-09-17T20:58:52.847 回答