Open
Description
Hi Numbat developers,
I am not used to run SNP analyses and am trying to apply your tool to our 10x data.
I have created the allele counts tar.gz file and am now trying to run the numbat_run step.
I have had other issues previousely and am therefore kind of sure that this error or something totally new:
Error in if (hom_rate > 0.4) {: missing value where TRUE/FALSE needed
Traceback:
- runBatch(i)
- numbat::run_numbat(subset, ref_hca, fread(df_allele_ATC2), genome = hg38,
. t = 1e-05, ncores = 4, min_cells = 100, plot = TRUE, out_dir = paste(sep = ,
. ./numbat_run_, sampleid, /, batch)) # at line 28-38 of file - bulk_subtrees %>% filter(sample == 0) %>% check_contam()
- check_contam(.)
This error is thrown by this function and I fear that my data is simply lacking,
#' check inter-individual contamination
#' @param bulk dataframe Pseudobulk profile
#' @return NULL
#' @Keywords internal
check_contam = function(bulk) {
hom_rate = bulk %>% filter(DP >= 8) %>%
{mean(na.omit(.$AR == 0 | .$AR == 1))}
if (hom_rate > 0.4) {
msg = paste0(
'High SNP contamination detected ',
'(', round(hom_rate*100, 1), '%)',
'. Please make sure that cells from only one individual are included in genotyping step.')
message(msg)
log_warn(msg)
}
}
Can you tell me how I can filter my data to get a working sample into your program?
Thank you very much!
/Stefan