-
Notifications
You must be signed in to change notification settings - Fork 1
DEGA-279-numerical-attributes #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
60120a7
renaming class
cornhundred 1a311b3
clustergram registry
cornhundred 5ba6e97
linting fixes
cornhundred 212318a
removed print statement
cornhundred 4fe6b4a
removed name logic
cornhundred e7e9115
Add Parquet export support for Clustergram widget (#111)
cornhundred 5be64f0
Update src/celldega/clust/matrix.py
cornhundred 9f91403
ruff fix
cornhundred d08be3b
docs: add parquet_data usage (#117)
cornhundred dc1435d
Add Clustergram parquet widget tests (#116)
cornhundred 7c97931
upadted test
cornhundred eb4a6a8
fixed test lint
cornhundred 118883b
ruff format
cornhundred 5b144d4
format JS
cornhundred 1a3fada
Allow numeric and categorical attributes
cornhundred 2fe807f
merging in changes from main
cornhundred e1e1d92
fixed loading numerical attr
cornhundred a4a9eb0
added pring
cornhundred 6177ce7
Deprecate JSON network export (#128)
cornhundred fc7a0d5
renamed attrs attr
cornhundred 1addd24
numerical attributes starting to viz
cornhundred 6856a8b
changed default colors
cornhundred 1e3933e
lint
cornhundred 48fbaf9
swapped colors
cornhundred 7796584
use col_attr/row_attr to filter AnnData.obs/var
cornhundred 4d4684a
added tooltip attribute name
cornhundred 11e0b4f
changed default behavior of categories in DataFrame and AnnData API
cornhundred bab1d86
adjusted warnings/errors for matrix_cell_thresh
cornhundred f9820bf
Add finalize cleanup for widgets (#134)
cornhundred 2f4d7a4
format
cornhundred 0d661b4
fixed comment on colors
cornhundred e321041
added example notebook
cornhundred ca5ebef
added example notebook
cornhundred 70ade6e
modifie notebook
cornhundred File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,30 +1,37 @@ | ||
| export const set_mat_data = (network, viz_state) => { | ||
| // Iterate over each row and column in network.mat | ||
| let inst_color; | ||
| network.mat.forEach((rowArray, index_row) => { | ||
| rowArray.forEach((tile_value, index_col) => { | ||
| if (tile_value >= 0) { | ||
| inst_color = [255, 0, 0]; | ||
| } else { | ||
| inst_color = [0, 0, 255]; | ||
| } | ||
| const { mat } = network; | ||
| const { col_offset, row_offset } = viz_state.viz; | ||
| const { max_abs_value } = viz_state.mat; | ||
| const { mat_data } = viz_state.mat; | ||
|
|
||
| for (let index_row = 0; index_row < mat.length; index_row++) { | ||
| const rowArray = mat[index_row]; | ||
|
|
||
| for (let index_col = 0; index_col < rowArray.length; index_col++) { | ||
| const tile_value = rowArray[index_col]; | ||
|
|
||
| // Optional: skip small/zero values to reduce memory | ||
| if (tile_value == null || Math.abs(tile_value) < 1e-6) continue; | ||
|
|
||
| const inst_color = tile_value >= 0 ? [255, 0, 0] : [0, 0, 255]; | ||
|
|
||
| const p = { | ||
| position: [ | ||
| viz_state.viz.col_offset * (index_col + 0.5), | ||
| viz_state.viz.row_offset * (index_row + 1.5), | ||
| col_offset * (index_col + 0.5), | ||
| row_offset * (index_row + 1.5), | ||
| ], | ||
| color: [ | ||
| inst_color[0], | ||
| inst_color[1], | ||
| inst_color[2], | ||
| (255 * Math.abs(tile_value)) / viz_state.mat.max_abs_value, | ||
| (255 * Math.abs(tile_value)) / max_abs_value, | ||
| ], | ||
| value: tile_value, | ||
| row: index_row, | ||
| col: index_col, | ||
| }; | ||
| viz_state.mat.mat_data.push(p); | ||
| }); | ||
| }); | ||
|
|
||
| mat_data.push(p); | ||
| } | ||
| } | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.