我正在对Postman中的C3.ai新冠肺炎数据湖运行API调用。我在子序列类型上使用Fetch,并希望获得与子序列相关的BiologicalAsset的isolationSource。但是我不知道如何正确地访问这个字段。我在https://api.c3.ai/covid/api/1/subsequence/fetch上发帖子。下面是请求正文:
{
spec: {
include: "startIndex, endIndex, sequence, sequence.isolationSource",
limit: 10
}
}但是,结果XML中的每个对象看起来如下所示:
<k>0</k>
<v>
<startIndex>1</startIndex>
<endIndex>182</endIndex>
<id>LC522350_1-182</id>
<meta>
<fetchInclude>[startIndex,endIndex,sequence,id,version]</fetchInclude>
<fetchType>Subsequence</fetchType>
</meta>
<version>1</version>
</v>这不能正确显示序列或隔离源。我怎样才能找到这些?
发布于 2020-04-30 01:06:19
基于docs接口,您需要使用parent来引用与子序列关联的序列,然后使用该parent的parent来引用BiologicalAsset。这将使您的请求:
{
spec: {
include: "startIndex, endIndex, parent.sequence, parent.parent.isolationSource",
limit: 10
}
}我刚刚尝试了一下,注意到有些子序列没有隔离源。如果只想包含具有隔离源的结果,可以将filter: "exists(parent.parent.isolationSource)"添加到等级库。
https://stackoverflow.com/questions/61506460
复制相似问题