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

Option to treat y_s as detection probability #118

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

vitkl
Copy link
Contributor

@vitkl vitkl commented Jan 30, 2022

Published cell2location uses the following prior on y_s detection sensitivity:

y_s ~ Gamma(detection_alpha, detection_alpha * y_e)
y_e ~ Gamma(alpha, alpha * mu)
detection_alpha = 200
alpha = 10
mu = (spatial_total_UMI / N_cells_per_location) / scRNAreference_total_UMI

This PR adds an option to treat y_s as the detection probability:

y_s ~ Beta(detection_alpha * y_e, detection_alpha * (1 - y_e))
y_e ~ Beta(alpha * p, alpha * (1 - p))
detection_alpha = 2000
alpha = 100
p = (spatial_total_UMI / N_cells_per_location) / scRNAreference_total_UMI

with alpha priors scaled to result in y_e and y_s with the same prior variance as the published model.

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.

1 participant