Skip to content
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

Implement harmonypy component & make changes to concat #54

Closed
wants to merge 15 commits into from

Conversation

DriesSchaumont
Copy link
Member

@DriesSchaumont DriesSchaumont commented Aug 29, 2022

I compared this implementation with the implementation from #55

❯ hyperfine --warmup 1 './target/docker/integrate/harmony/harmony -i mms_with_batch.h5mu  -o ./test.h5mu'
Benchmark 1: ./target/docker/integrate/harmony/harmony -i mms_with_batch.h5mu  -o ./test.h5mu
  Time (mean ± σ):     25.057 s ±  1.703 s    [User: 0.177 s, System: 0.128 s]
  Range (min … max):   23.303 s … 29.393 s    10 runs
❯ hyperfine --warmup 1 './target/docker/integrate/harmonypy/harmonypy -i mms_with_batch.h5mu  -o ./test.h5mu'
Benchmark 1: ./target/docker/integrate/harmonypy/harmonypy -i mms_with_batch.h5mu  -o ./test.h5mu
  Time (mean ± σ):      6.851 s ±  0.399 s    [User: 0.167 s, System: 0.114 s]
  Range (min … max):    6.364 s …  7.703 s    10 runs

docker stats for harmony

CONTAINER ID   NAME              CPU %     MEM USAGE / LIMIT    MEM %     NET I/O     BLOCK I/O   PIDS
8f1cb0159f28   gracious_carver   93.59%    431.6MiB / 15.6GiB   2.70%     876B / 0B   0B / 0B     14

docker stats for harmonypy

CONTAINER ID   NAME             CPU %     MEM USAGE / LIMIT    MEM %     NET I/O     BLOCK I/O   PIDS
4943d4d26b03   quirky_shirley   964.51%   137.8MiB / 15.6GiB   0.86%     736B / 0B   0B / 0B     20

@DriesSchaumont
Copy link
Member Author

Integration CI @ https://github.com/openpipelines-bio/openpipeline/actions/runs/2969733996
Failing workflows are unrelated issues.

@rcannood
Copy link
Contributor

rcannood commented Sep 1, 2022

Please merge #55 first!

if obs_key_sample_name in sample.obs_keys():
logger.info(f'Column .obs["{obs_key_sample_name}"] already exists in sample "{sample_id}". Overriding the value for this column.')
samples.obs = sample.obs.drop(obs_key_sample_name, axis=1)
for _, modality in sample.mod.items():
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use for modality in sample.mod.values()

@@ -189,7 +186,7 @@ def set_conflicts(concatenated_data: mu.MuData,
getattr(mod, conflict_matrix_name)[conflict_name] = conflict_data.sort_index()
return concatenated_data

def concatenate_modalities(modalities: dict[str, anndata.AnnData],
def concatenate_modalities(sample_ids: tuple[str], modalities: dict[str, list[anndata.AnnData]],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I made a mistake here. A general Iterable[anndata.Anndata] is better here

@rcannood rcannood changed the title Implement harmonypy component Implement harmonypy component & make changes to concat Sep 2, 2022
This was referenced Sep 2, 2022
@DriesSchaumont
Copy link
Member Author

Closing in favour of #59 and #60

@rcannood rcannood deleted the feature/harmony branch September 2, 2022 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants