In that case, I really think you should leave in the
"structure("
"structure_sets_structures("
"structure_set[name$eq'Developing Mouse - Coarse']"
")"
"),"
from my example code. The way you have edited the API call, the query has no way of knowing that you are only interested in the developing mouse atlas, so it is calling for all instances of those genes across all of our datasets. I assume this is why the number of rows ballooned to more than 3 million.
If you decide you still want to eliminate the structure set limitation, try reducing the number of genes the code is querying for at a time by setting gene_chunk_size to something smaller in main(). I suppose you could also set chunk_size to something smaller in the actual query function, as well. If a single API call contains too many rows, that can slow the process down.
“expression energy” is defined in this section of the “Developing Mouse” post.