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

Does Numbat filter cells out during giving posterior probabilities on single-cell level? #120

Closed
aelhossiny opened this issue May 9, 2023 · 1 comment

Comments

@aelhossiny
Copy link

Hi, I have noticed that some of the cells are not reported in the joint_post slot even though they present in the original bam file. I might have missed it somewhere in the paper or the documentation, but do you filter out cells during computing posterior probabilities on single-cell level?

Thanks

@teng-gao
Copy link
Collaborator

teng-gao commented May 9, 2023

Hi,

The only filtering for cells are here:

numbat/R/main.R

Lines 106 to 117 in a367fa5

zero_cov = names(which(colSums(count_mat) == 0))
if (length(zero_cov) > 0) {
log_message(glue('Filtering out {length(zero_cov)} cells with 0 coverage'))
count_mat = count_mat[,!colnames(count_mat) %in% zero_cov]
df_allele = df_allele %>% filter(!cell %in% zero_cov)
}
# only keep cells that have a transcriptome
df_allele = df_allele %>% filter(cell %in% colnames(count_mat))
if (nrow(df_allele) == 0){
stop('No matching cell names between count_mat and df_allele')
}

So, all cells in count_mat should be present in joint_post unless they have zero coverage.

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