How to fetch isolation source and sequence for subsequence in C3.ai COVID-19 Data Lake?

I’m running API calls to the C3.ai COVID-19 Data Lake in Postman. I’m using Fetch on the Subsequence type, and want to get the isolationSource for the BiologicalAsset that is related to the Subsequence. But I can’t figure out how to access this field properly. I’m running POST on https://api.c3.ai/covid/api/1/subsequence/fetch . Here’s the request body:

{
    spec: {
        include: "startIndex, endIndex, sequence, sequence.isolationSource",
        limit: 10
    }
}

But then each object in the resulting XML looks like this:

<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>

This doesn’t properly show the sequence or isolation source. How do I find these?

Based on the API docs, you need to use “parent” to refer to the Sequence associated with a Subsequence, and then use that parent’s parent to refer to a BiologicalAsset. That would make your request:

{
    spec: {
        include: "startIndex, endIndex, parent.sequence, parent.parent.isolationSource",
        limit: 10
    }
}

I just tried this and noticed that some Subsequences don’t have isolation sources. If you want to only include results that have an isolation source, you would add filter: "exists(parent.parent.isolationSource)" to your spec.