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

Cannot run ambientContribMaximum for y with multiple columns #74

Open
mgrantpeters opened this issue Sep 13, 2021 · 1 comment
Open

Comments

@mgrantpeters
Copy link

Hello,
Thank you for the very helpful package! I am having an error when I try to run ambientContribMaximum and am unsure whether I have misunderstood its application or if I could have come across an error.
I have multiplexed data with single cells from n samples in a single raw matrix. I calculated the ambient contamination with ambientProfileEmpty(raw_matrix, good.turing = TRUE), generating a vector. I wanted to estimate the ambient contamination for all my multiplexed samples, and therefore tried running ambientContribMaximum(samples, ambient, mode="scale") where samples is a matrix of n samples. I assumed I could estimate the ambient contamination for multiple samples or clusters within a run given this line in the documentation of ambientContribMaximum: "Hence, the function works best when y contains aggregated counts for one or more groups of droplets with the same expected expression profile, e.g., clusters of related cells."
However I receive the following error when I try to run this:

Error: BiocParallel errors
element index: 1
first error: 'to' must be a finite number
In addition: Warning message:
In .maximum_ambience(y = y[, i], ambient = A, ...) :
'y' and 'ambient' do not have the same feature names

I can run it if I ensure ambient has the same number of columns as y (by copying ambient multiple times in a matrix), but I am wary about whether this is the most appropriate course of action. Have I misunderstood the application of ambientContribMaximum/is there anything I should do differently? Do you have any suggestions as to how to accomplish my goal?

Thank you in advance!

@LTLA
Copy link
Collaborator

LTLA commented Sep 15, 2021

Can you provide a minimum reproducible example? For example, example(ambientContribMaximum) works fine for me. What is different about your data that the same code doesn't work for you?

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

No branches or pull requests

2 participants