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 batch key argument in sc.pp.highly_variable_genes #28

Merged
merged 6 commits into from
Mar 27, 2023

Conversation

crichgriffin
Copy link
Contributor

Wanted to implement the batch key argument, left default as None so backwards compatability is maintained
See sc.pp.highly_variable genes for details about the argument

@crichgriffin crichgriffin requested a review from bio-la March 24, 2023 13:06
@crichgriffin
Copy link
Contributor Author

@deevdevil88 suggested:
Allow for the HVG batch key to account for multiple covariates by combining them into one column as we do for running the integration methods.
I agree and I will implement this

@deevdevil88
Copy link
Contributor

Hiya!
I had a minor update suggestion, it was just, that in the integration workflow, for batch correction, there is an option to combine two columns or covariates to make a joint batch_key, i was wondering since, you are implementing batch_key for HVG, if this can also be done for this step as well. As otherwise for this step, if we want to combine two columns for our batch, we would need to do it manually (which isnt the end of the world) but it would just be consistent with the integration step to make the option available

@crichgriffin
Copy link
Contributor Author

I have address @deevdevil88 comments.

I also replaced all the columns = [x.replace(" ", "") for x in args.integration_col.split(",")] with columns = [x.strip() for x in args.integration_col.split(",")]in all the batch correction scripts, as the strip function only removes trailing spaces, whereas the replace function would have removed spaces within column names. Spaces within column names are not advisable, but are allowed by pandas and anndata.

@crichgriffin crichgriffin added the enhancement New feature or request label Mar 27, 2023
@deevdevil88 deevdevil88 merged commit 45ae750 into main Mar 27, 2023
@bio-la bio-la deleted the CRG-hvgbatchkey branch February 9, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants