load embeddings in parallel (#1352)

* load embeddings in parallel

* correctly capture unclipped

* test

* another test

* add convenient copy assets target

* cleanup
This commit is contained in:
Bruce Martin
2020-04-07 09:48:07 -07:00
committed by GitHub
parent 3b341a7191
commit bcacb75296
7 changed files with 83 additions and 32 deletions
+17 -6
View File
@@ -39,14 +39,20 @@ const WorldReducer = (
/* incremental initial data load - always assumes world == universe */
const { universe } = nextSharedState;
const { dim } = action;
// we don't clip anything except for varData and obsAnnotations
let unclipped = state.unclipped;
if (dim == "varData" || dim == "obsAnnotations") {
unclipped = {
...unclipped,
[dim]: universe[dim].clone()
};
}
return {
...state,
schema: universe.schema,
[dim]: universe[dim].clone(),
unclipped: {
...state.unclipped,
[dim]: universe[dim].clone()
}
unclipped
};
}
@@ -106,10 +112,15 @@ const WorldReducer = (
const { userDefinedGenes, diffexpGenes } = prevSharedState;
const allTheGenesWeNeed = [
...new Set(
[userDefinedGenes, diffexpGenes, Object.keys(action.expressionData)].filter(ele => ele).flat()
[userDefinedGenes, diffexpGenes, Object.keys(action.expressionData)]
.filter(ele => ele)
.flat()
)
];
unclippedVarData = ControlsHelpers.pruneVarDataCache(unclippedVarData, allTheGenesWeNeed);
unclippedVarData = ControlsHelpers.pruneVarDataCache(
unclippedVarData,
allTheGenesWeNeed
);
// at this point, we have the unclipped data in unclippedVarData.
// Now create clipped.