summarizeOverlaps bplapply error
2
0
Entering edit mode
cidster12 • 0
@cidster12-7317
Last seen 9.8 years ago
United States

Hi I'm trying to use summarizeOverlaps but I keep running into errors. Here is what I'm doing.

#Generate transcriptdb from gtf for features

txdb <- makeTranscriptDbFromGFF(file="data/humangene.gtf",
+                                 format="gtf",
+                                 dataSource="UCSC",
+                                 species="Homo Sapiens")

 

> saveDb(txdb, file="./data/humangene.sqlite")
> txdb <- loadDb("./data/humangene.sqlite")
#Extract exons

> eByg <- exonsBy(txdb, by="gene")

 

#Open bamfile for reads

> bf2 = open(BamFile("data/wgEncodeSydhRnaSeqK562Ifna6hPolyaAln.bam", "data/wgEncodeSydhRnaSeqK562Ifna6hPolyaAln.bam.bai")) #generate BAM reference

#put in BamFile into BamFileList

bfl2<-BamFileList(bf2)

#try to use summarizeOverlaps

genehits <- summarizeOverlaps(eByg, bfl2, mode="Union")

and I get this error

Error in bplapply(X, FUN, ..., BPRESUME = BPRESUME, BPPARAM = BPPARAM) : 
  error in evaluating the argument 'BPPARAM' in selecting a method for function 'bplapply': Error in registered()[[bpparamClass]] : 
  attempt to select less than one element

whether I use a BamFile a BamFileList or a direct pathway

Sessioninfo()

R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] GenomicFeatures_1.18.3  AnnotationDbi_1.28.1    Biobase_2.26.0          ShortRead_1.24.0        GenomicAlignments_1.2.1
 [6] Rsamtools_1.18.2        GenomicRanges_1.18.4    GenomeInfoDb_1.2.4      Biostrings_2.34.1       XVector_0.6.0          
[11] IRanges_2.0.1           S4Vectors_0.4.0         BiocParallel_1.0.0      BiocGenerics_0.12.1    

loaded via a namespace (and not attached):
 [1] base64enc_0.1-2     BatchJobs_1.5       BBmisc_1.8          biomaRt_2.22.0      bitops_1.0-6        brew_1.0-6         
 [7] checkmate_1.5.1     codetools_0.2-9     DBI_0.3.1           digest_0.6.8        fail_1.2            foreach_1.4.2      
[13] grid_3.1.2          hwriter_1.3.2       iterators_1.0.7     lattice_0.20-29     latticeExtra_0.6-26 RColorBrewer_1.1-2 
[19] RCurl_1.95-4.5      RSQLite_1.0.0       rtracklayer_1.26.2  sendmailR_1.2-1     stringr_0.6.2       tools_3.1.2        
[25] XML_3.98-1.1        zlibbioc_1.12.0    
genomicalignments genomicranges bioconductor rnaseq • 2.5k views
ADD COMMENT
1
Entering edit mode
@valerie-obenchain-4275
Last seen 2.9 years ago
United States

Hi,

Unfortunately I can't reproduce the problem. You're getting this error with a file path, BamFile and BamFileList. Is that also true with the examples on the man page? For example, can you run this?

library(pasillaBamSubset)
library(TxDb.Dmelanogaster.UCSC.dm3.ensGene)
exbygene <- exonsBy(TxDb.Dmelanogaster.UCSC.dm3.ensGene, "gene")
fl <- untreated1_chr4()
res <- summarizeOverlaps(exbygene, fl)
> res
class: SummarizedExperiment
dim: 15682 1
exptData(0):
assays(1): counts
rownames(15682): FBgn0000003 FBgn0000008 ... FBgn0264726 FBgn0264727
rowData metadata column names(0):
colnames(1): untreated1_chr4.bam
colData names(0):

The error you're seeing says bplapply() (from BiocParallel pkg) can't find a backend for parallel execution. A default backend is used if none is provided but you can specify your own with the 'BPPARAM' arg. Do you see an error with these calls?

summarizeOverlaps(eByg, bf2, BPPARAM=SerialParam())

or

summarizeOverlaps(eByg, bf2, BPPARAM=SnowParam(1))

A couple of things worth mentioning though likely unrelated to the problem. There is no need manually 'open' the BamFile, summarizeOverlaps() does that internally.  BamFileList is only needed when there is >1 Bam file, otherwise just use BamFile.

Valerie

 

 

 

 

 

ADD COMMENT
0
Entering edit mode
eraslan • 0
@eraslan-8618
Last seen 9.3 years ago
Germany

I also sometimes get this error , then when I restart the computer and call the functions again in RStudio it works fine. I have no clue what might be the reason.

ADD COMMENT
0
Entering edit mode

Please post your sessionInfo() and a code example.

Valerie

ADD REPLY

Login before adding your answer.

Traffic: 523 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6