mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-02 01:38:11 +08:00
Updating front-end dependencies (#2167)
* update to webpack 5 * update babel * update eslint * update cheerio * update npm min to v7 * revert engine change * generate package lock with npm v6 (lockfileVersion 1) * add region to test setup * update blueprint popover2 * tabindex changes due to blueprint popover2 revision * update snapshots * update lodash and pako * fix typo * fix lodash refactoring * more lodash refactoring * update babel and blueprintjs * update jest support packages * update puppeteer * update regl * update react-icons and react-helmet * update react and react-dom
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
import every from "lodash.every";
|
||||
import map from "lodash.map";
|
||||
import isNumber from "lodash.isnumber";
|
||||
import zip from "lodash.zip";
|
||||
import _ from "lodash";
|
||||
import { flatbuffers } from "flatbuffers";
|
||||
import { NetEncoding } from "../../../src/util/stateManager/matrix_generated";
|
||||
@@ -121,10 +125,10 @@ function encodeMatrix(columns, colIndex = undefined) {
|
||||
*/
|
||||
const utf8Encoder = new TextEncoder("utf-8");
|
||||
const builder = new flatbuffers.Builder(1024);
|
||||
const cols = _.map(columns, (carr) => {
|
||||
const cols = map(columns, (carr) => {
|
||||
let uType;
|
||||
let tarr;
|
||||
if (_.every(carr, _.isNumber)) {
|
||||
if (every(carr, isNumber)) {
|
||||
uType = NetEncoding.TypedArray.Float32Array;
|
||||
tarr = encodeTypedArray(builder, uType, new Float32Array(carr));
|
||||
} else {
|
||||
@@ -167,12 +171,12 @@ function encodeMatrix(columns, colIndex = undefined) {
|
||||
}
|
||||
|
||||
const anAnnotationsObsFBSResponse = (() => {
|
||||
const columns = _.zip(...anAnnotationsObsJSONResponse.data).slice(1);
|
||||
const columns = zip(...anAnnotationsObsJSONResponse.data).slice(1);
|
||||
return encodeMatrix(columns, anAnnotationsObsJSONResponse.names);
|
||||
})();
|
||||
|
||||
const anAnnotationsVarFBSResponse = (() => {
|
||||
const columns = _.zip(...anAnnotationsVarJSONResponse.data).slice(1);
|
||||
const columns = zip(...anAnnotationsVarJSONResponse.data).slice(1);
|
||||
return encodeMatrix(columns, anAnnotationsVarJSONResponse.names);
|
||||
})();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user