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

No control over number of PCs in batch_correct_none #307

Open
wlason opened this issue Aug 13, 2024 · 1 comment · May be fixed by #312
Open

No control over number of PCs in batch_correct_none #307

wlason opened this issue Aug 13, 2024 · 1 comment · May be fixed by #312
Assignees

Comments

@wlason
Copy link
Contributor

wlason commented Aug 13, 2024

I have a complex study design with not all antibodies present in every sample (there are 24 in total).
I would like to run protein batch correction using harmony with 10 PCs, the number of PCs gets correctly parsed to harmony, but not to no correction workflow, resulting in an error.

ValueError: n_components=20 must be between 1 and min(n_samples, n_features)=19 with svd_solver='arpack'

if adata.var.shape[0] < n_pcs:
L.info("You have less features than number of PCs you intend to calculate")
n_pcs = adata.var.shape[0] - 1
L.info("Setting n PCS to %i" % int(n_pcs))

There is no way to change the default n-1 in the yaml.

@wlason
Copy link
Contributor Author

wlason commented Aug 13, 2024

The workaround is to specify the number of PCs in the preprocessing yaml. Maybe it can be added to the documentation.

pca: False
n_pcs: 50

@SarahOuologuem SarahOuologuem self-assigned this Aug 28, 2024
@SarahOuologuem SarahOuologuem linked a pull request Sep 3, 2024 that will close this issue
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 a pull request may close this issue.

2 participants