Hi, Dear developer I try to run code in BiocParallel manual, but there is error about it
library(RNAseqData.HNRNPC.bam.chr14)
library(GenomicAlignments)
library(BiocParallel)
fls <- RNAseqData.HNRNPC.bam.chr14_BAMFILES
gr <- GRanges("chr14", IRanges((1000:3999)*5000, width=1000))
param <- ScanBamParam(which=range(gr))
FUN <- function(fl, param) {
gal <- readGAlignments(fl, param = param)
sum(countOverlaps(gr, gal))
}
> SnowParam()
class: SnowParam
bpisup: FALSE; bpnworkers: 10; bptasks: 0; bpjobname: BPJOB
bplog: FALSE; bpthreshold: INFO; bpstopOnError: TRUE
bpRNGseed: ; bptimeout: 2592000; bpprogressbar: FALSE
bpexportglobals: TRUE
bplogdir: NA
bpresultdir: NA
cluster type: SOCK
> bplapply(fls[1:3], FUN, BPPARAM = SnowParam(), param = param)
Error: BiocParallel errors
element index: 1, 2, 3
first error: could not find function "readGAlignments"
In addition: Warning messages:
1: In serialize(data, node$con) :
'package:stats' may not be available when loading
2: In serialize(data, node$con) :
'package:stats' may not be available when loading
3: In serialize(data, node$con) :
'package:stats' may not be available when loading
> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936 LC_CTYPE=Chinese (Simplified)_China.936
[3] LC_MONETARY=Chinese (Simplified)_China.936 LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.936
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets methods
[9] base
other attached packages:
[1] BiocParallel_1.22.0 GenomicAlignments_1.24.0
[3] Rsamtools_2.4.0 Biostrings_2.56.0
[5] XVector_0.28.0 SummarizedExperiment_1.18.2
[7] DelayedArray_0.14.1 matrixStats_0.57.0
[9] Biobase_2.48.0 GenomicRanges_1.40.0
[11] GenomeInfoDb_1.24.2 IRanges_2.22.2
[13] S4Vectors_0.26.1 BiocGenerics_0.34.0
[15] RNAseqData.HNRNPC.bam.chr14_0.26.0
loaded via a namespace (and not attached):
[1] rstudioapi_0.11 zlibbioc_1.34.0 lattice_0.20-41
[4] tools_4.0.2 grid_4.0.2 snow_0.4-3
[7] crayon_1.3.4 Matrix_1.2-18 GenomeInfoDbData_1.2.3
[10] bitops_1.0-6 RCurl_1.98-1.2 compiler_4.0.2
Thanks your reply, I make it :).
But my
bpvalidate(FUN)
message is different from yours. It seems that there is no"package:GenomicAlignments"
inbpvalidate(FUN)
output.