mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-15 12:47:56 +08:00
Clean comments and logs
This commit is contained in:
@@ -116,7 +116,6 @@ class Graph extends React.Component {
|
||||
/*
|
||||
compute the model coordinate for each point
|
||||
*/
|
||||
console.log({ X }, { Y });
|
||||
const positions = new Float32Array(2 * X.length);
|
||||
for (let i = 0, len = X.length; i < len; i += 1) {
|
||||
const p = vec2.fromValues(X[i], Y[i]);
|
||||
@@ -454,33 +453,6 @@ class Graph extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
rescalePointForSpatial = (x, y, spatialMetadata) => {
|
||||
// console.log({spatialMetadata});
|
||||
const translate = vec2.fromValues(
|
||||
spatialMetadata.inverseTranslate[0],
|
||||
spatialMetadata.inverseTranslate[1]
|
||||
);
|
||||
const min = vec2.fromValues(
|
||||
spatialMetadata.inverseMin[0],
|
||||
spatialMetadata.inverseMin[1]
|
||||
);
|
||||
const scalefactor = spatialMetadata.scaleref;
|
||||
const wh = vec2.fromValues(
|
||||
spatialMetadata.imageWidth,
|
||||
spatialMetadata.imageHeight
|
||||
);
|
||||
|
||||
// Apply the inverse transform
|
||||
const p = vec2.fromValues(x, y);
|
||||
vec2.sub(p, p, translate);
|
||||
vec2.scale(p, p, spatialMetadata.inverseScale);
|
||||
vec2.add(p, p, min);
|
||||
|
||||
vec2.scale(p, p, scalefactor);
|
||||
vec2.div(p, p, wh);
|
||||
return p;
|
||||
};
|
||||
|
||||
setReglCanvas = (canvas) => {
|
||||
this.reglCanvas = canvas;
|
||||
this.setState({
|
||||
@@ -568,8 +540,6 @@ class Graph extends React.Component {
|
||||
} = props.watchProps;
|
||||
const { modelTF } = this.state;
|
||||
|
||||
console.log({ spatial });
|
||||
|
||||
const [layoutDf, colorDf, pointDilationDf] = await this.fetchData(
|
||||
annoMatrix,
|
||||
layoutChoice,
|
||||
@@ -873,8 +843,6 @@ class Graph extends React.Component {
|
||||
const imW = spatial.data.imageWidth;
|
||||
const imH = spatial.data.imageHeight;
|
||||
|
||||
console.log({ imageUnderlay });
|
||||
|
||||
regl.poll();
|
||||
regl.clear({
|
||||
depth: 1,
|
||||
@@ -921,9 +889,6 @@ class Graph extends React.Component {
|
||||
const { modelTF, projectionTF, camera, viewport, regl } = this.state;
|
||||
const cameraTF = camera?.view()?.slice();
|
||||
|
||||
console.log("---RENDER");
|
||||
console.log({ props: this.props });
|
||||
|
||||
return (
|
||||
<div
|
||||
id="graph-wrapper"
|
||||
|
||||
@@ -372,7 +372,7 @@ class DataAdaptor(metaclass=ABCMeta):
|
||||
|
||||
else:
|
||||
|
||||
# scale isotropically
|
||||
# scale isotropically
|
||||
try:
|
||||
min = np.nanmin(embedding, axis=0)
|
||||
max = np.nanmax(embedding, axis=0)
|
||||
@@ -388,14 +388,6 @@ class DataAdaptor(metaclass=ABCMeta):
|
||||
translate = 0.5 - ((max - min) / scale / 2)
|
||||
normalized_layout = normalized_layout + translate
|
||||
|
||||
# print(f"scale {scale}, translate {translate}")
|
||||
|
||||
# if True: # if visium
|
||||
# self.data.uns["spatial"]
|
||||
|
||||
|
||||
# adata.uns["spatial"]['V1_Adult_Mouse_Brain']["scalefactors"]["tissue_hires_scalef"]
|
||||
|
||||
return normalized_layout
|
||||
|
||||
def layout_to_fbs_matrix(self, fields, spatial = None):
|
||||
|
||||
Reference in New Issue
Block a user