Open
Conversation
Collaborator
|
@xingzhongyu Please let me know when it is ready review. Thanks! |
Collaborator
Author
|
@RemyLau OK. I need to add some comments to review in the transform test part , and the automatic machine learning part needs to be modified |
xingzhongyu
commented
Jan 14, 2024
|
|
||
| def __call__(self, data: Data) -> Data: | ||
| xy_pixel = data.get_feature(return_type="numpy", channel="spatial_pixel", channel_type="obsm") | ||
| sc.pp.neighbors(data.data, n_neighbors=self.n_neighbors) |
Collaborator
Author
There was a problem hiding this comment.
Neighbors need to be calculated in advance
xingzhongyu
commented
Jan 14, 2024
| sim_matrix_mean = np.mean(sim_matrix_all, axis=0) | ||
|
|
||
| data.data.uns[self.out] = sim_matrix_mean | ||
| data.data.obsm[self.out] = sim_matrix_mean |
Collaborator
Author
There was a problem hiding this comment.
change to obsm
xingzhongyu
commented
Jan 14, 2024
| data = Data(adata.copy()) | ||
| RESEPTgraph = RESEPTGraph() | ||
| RESEPTgraph(data) | ||
| assert data.data.uns['RESEPTGraph'].shape == (2000, 2000, 3) |
Collaborator
Author
There was a problem hiding this comment.
resize to (2000,2000,3)
xingzhongyu
commented
Jan 14, 2024
| sc3feature = SC3Feature() | ||
| data = sc3feature(data) | ||
| sc3_feature = data.get_feature(return_type="numpy", channel="SC3Feature", channel_type="obsm") | ||
| assert sc3_feature.shape[0] == data.shape[0] |
xingzhongyu
commented
Jan 14, 2024
| tangramFeature = TangramFeature() | ||
| data = tangramFeature(data) | ||
| tangram_feature = data.get_feature(return_type="numpy", channel="TangramFeature", channel_type="obs") | ||
| assert np.sum(tangram_feature) == 1 |
Collaborator
Author
There was a problem hiding this comment.
Make sure the sum is 1 and the test passed
xingzhongyu
commented
Jan 14, 2024
| data = Data(adata.copy()) | ||
| data = CellTypeNums()(data) | ||
| cell_type_nums = data.get_feature(return_type="numpy", channel="CellTypeNums", channel_type="uns") | ||
| return cell_type_nums.shape[0] == len(np.unique(cell_types)) |
Collaborator
Author
There was a problem hiding this comment.
Test passed.Make sure the number of cell types is the same
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
xingzhongyu
commented
Jan 28, 2024
| for i, j in params_dict.items(): | ||
| idx, key = i.split(f"{Pipeline.PIPELINE_KEY}.", 1)[1].split(".", 1) | ||
| idx, key = i.split(f"{Pipeline.PIPELINE_KEY}.", i)[1].split(".", 1) | ||
| idx = int(idx) |
Collaborator
Author
There was a problem hiding this comment.
I guess it should be PARAMS_KEY
xingzhongyu
commented
Jan 29, 2024
dance/pipeline.py
Outdated
| if param_dict is not None: | ||
| for key, val in param_dict.items(): | ||
| search_space[f"{self.PARAMS_KEY}.{i}.{key}"] = val | ||
| if type(val) == DictConfig: |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
add CellTypeNums SC3Feature RESEPTGraph TangramFeature test
Changed local github repository. So I will pre-commit install next time
The code of the automl demo is a bit irregular. I will continue to modify it in the future and learn singularity if necessary.
It is ready to review in the transform test part @RemyLau
complete automl in single modality,maybe need to change it.
More information is needed on the inputs, functions, and return values of functions
In general, leave out the outdated comments.They're caused by file moves, which I've pretty much added to the new file.