mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-26 07:48:12 +08:00
rename to createVarDimension
This commit is contained in:
@@ -290,7 +290,7 @@ function deduceDimensionType(attributes, fieldName) {
|
||||
(it will not be garbage collected without this call)
|
||||
*/
|
||||
|
||||
export function createVarDimensionsMap(
|
||||
export function createVarDimension(
|
||||
world,
|
||||
_worldVarDataCache,
|
||||
crossfilter,
|
||||
@@ -298,10 +298,10 @@ export function createVarDimensionsMap(
|
||||
) {
|
||||
const { varDataCache, worldObsIndex } = world;
|
||||
const varData = _worldVarDataCache[geneName];
|
||||
const worldIndex = worldObsIndex ? idx => worldObsIndex[idx] : idx => idx; /* this results in NaN when implemented below as it was in the test code */
|
||||
const worldIndex = worldObsIndex ? idx => worldObsIndex[idx] : idx => idx;
|
||||
|
||||
return crossfilter.dimension(r => {
|
||||
return varData[r.__obsIndex__];
|
||||
return varData[worldIndex(r.__obsIndex__)];
|
||||
}, Float32Array);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user