ChIPseeker
ChIPseeker copied to clipboard
invalid DB file
Hi , I have a function anno_plot ,when i use it in foreach, i produce a error.
function :
anno_plot <- function(bed, txDb) {
peak <- ChIPseeker::readPeakFile(bed)
peakAnno <- ChIPseeker::annotatePeak(
peak,
tssRegion = c(-3000, 3000),
TxDb = txDb
)
}
foreach code:
cl <- makeCluster(length(bed_files))
registerDoParallel(cl)
mat_df_all <- foreach(bed = bed_files, .packages = c("ChIPseeker", "AnnotationDbi", "IRanges", "GenomeInfoDb"), .verbose = TRUE) %dopar% anno_plot(bed, txdb)
stopCluster(cl)
error:
ot(bed, txdb)
discovered package(s):
automatically exporting the following variables from the local environment:
anno_plot, txdb
explicitly exporting package(s): ChIPseeker, AnnotationDbi, IRanges, GenomeInfoDb
numValues: 2, numResults: 0, stopped: TRUE
got results for task 1
accumulate got an error result
numValues: 2, numResults: 1, stopped: TRUE
returning status FALSE
got results for task 2
numValues: 2, numResults: 2, stopped: TRUE
not calling combine function due to errors
returning status TRUE
Error in anno_plot(bed, txdb) : task 1 failed - "invalid DB file"