SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tophat Error: Error: segment-based junction search failed with err =-6 sjnewhouse RNA Sequencing 8 03-19-2013 05:14 AM
Tophat 2 error: Parse error at line 297359: missing colon in auxiliary data magbju RNA Sequencing 2 01-15-2013 04:57 AM
tophat2 segment_juncs error: Error: segment-based junction search failed with err =-6 hulan0@gmail.com Bioinformatics 1 04-16-2012 07:37 AM
summarizeOverlaps vs countOverlaps swaraj Bioinformatics 0 02-29-2012 09:42 AM

Reply
 
Thread Tools
Old 06-06-2014, 02:39 PM   #1
Parharn
Member
 
Location: Sweden

Join Date: Jul 2013
Posts: 84
Default summarizeOverlaps error

Hi,
I am trying to test the "RNA-Seq Data Pathway and Gene-set Analysis Workflows" manual by Weijun Luo. I get an error as follow:

> gnCnt <- summarizeOverlaps(exByGn, bamfls, mode="Union", ignore.strand=TRUE, single.end=TRUE, param=param)
Error: could not find function "summarizeOverlaps"

Does anybody have any suggestions?

Thanks,
Parham
Parharn is offline   Reply With Quote
Old 06-07-2014, 02:49 AM   #2
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,480
Default

You need to load GenomicRanges:
Code:
library(GenomicRanges)
dpryan is offline   Reply With Quote
Old 06-07-2014, 03:13 AM   #3
Parharn
Member
 
Location: Sweden

Join Date: Jul 2013
Posts: 84
Default

I did! Still it cannot find the function!
> library(GenomicRanges)
> gnCnt <- summarizeOverlaps(exByGn, bamfls, mode="Union", ignore.strand=TRUE, single.end=FALSE, param=param)
Error: could not find function "summarizeOverlaps"

Do you have any other suggestion?
Parharn is offline   Reply With Quote
Old 06-07-2014, 03:56 AM   #4
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,480
Default

That's a first. Try starting a new R session.
dpryan is offline   Reply With Quote
Old 06-07-2014, 03:57 AM   #5
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,480
Default

And if that doesn't work, post the output of sessionInfo()
dpryan is offline   Reply With Quote
Old 06-07-2014, 05:23 AM   #6
Parharn
Member
 
Location: Sweden

Join Date: Jul 2013
Posts: 84
Default

Alright, it didn't work yet. Here is the code that I am trying (I couldn't figure out how you put a code in box as your first reply) however here it is:

library(TxDb.Hsapiens.UCSC.hg19.knownGene)
exByGn <- exonsBy(TxDb.Hsapiens.UCSC.hg19.knownGene, "gene")
library(Rsamtools)
fls <- list.files("tophat_all/", pattern="bam$", full.names =T)
bamfls <- BamFileList(fls)
flag <- scanBamFlag(isNotPrimaryRead=FALSE, isProperPair=TRUE)
param <- ScanBamParam(flag=flag)
gnCnt <- summarizeOverlaps(exByGn, bamfls, mode="Union",
ignore.strand=TRUE, single.end=FALSE, param=param)
hnrnp.cnts=assay(gnCnt)

One thing I need to know is if I can load several libraries in the beginning of R?
The next thing is for loading Rsamtools it said two packages are required (XVector and Biostrings) which I had installed them previously but it asked my again, and I had to install them again. I don't know what's wrong, but just wanted to provide that info to you.

I am not developer, just trying to use linux and these softwares.

Thanks!
Parharn is offline   Reply With Quote
Old 06-07-2014, 01:45 PM   #7
dpryan
Devon Ryan
 
Location: Freiburg, Germany

Join Date: Jul 2011
Posts: 3,480
Default

Yes, you can load as many libraries as you want at the beginning. What's the output of sessionInfo()?
dpryan is offline   Reply With Quote
Old 06-07-2014, 02:17 PM   #8
Parharn
Member
 
Location: Sweden

Join Date: Jul 2013
Posts: 84
Default

All right, good to know!
Here it is:

sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-pc-linux-gnu (64-bit)

locale:
[1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_GB.UTF-8 LC_COLLATE=en_GB.UTF-8
[5] LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=en_GB.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
[1] Rsamtools_1.16.0
[2] Biostrings_2.32.0
[3] XVector_0.4.0
[4] TxDb.Hsapiens.UCSC.hg19.knownGene_2.14.0
[5] GenomicFeatures_1.16.2
[6] AnnotationDbi_1.26.0
[7] Biobase_2.24.0
[8] GenomicRanges_1.16.3
[9] GenomeInfoDb_1.0.2
[10] IRanges_1.22.8
[11] BiocGenerics_0.10.0

loaded via a namespace (and not attached):
[1] BatchJobs_1.2 BBmisc_1.6 BiocParallel_0.6.1
[4] biomaRt_2.20.0 bitops_1.0-6 brew_1.0-6
[7] BSgenome_1.32.0 codetools_0.2-8 DBI_0.2-7
[10] digest_0.6.4 fail_1.2 foreach_1.4.2
[13] GenomicAlignments_1.0.1 iterators_1.0.7 plyr_1.8.1
[16] Rcpp_0.11.1 RCurl_1.95-4.1 RSQLite_0.11.4
[19] rtracklayer_1.24.2 sendmailR_1.1-2 stats4_3.1.0
[22] stringr_0.6.2 tools_3.1.0 XML_3.98-1.1
[25] zlibbioc_1.10.0
>
Parharn is offline   Reply With Quote
Old 06-09-2014, 07:26 AM   #9
Michael Love
Senior Member
 
Location: Boston

Join Date: Jul 2013
Posts: 333
Default

summarizeOverlaps() moved to the GenomicAlignments package for Bioc 2.14 / R 3.1

Code:
library(GenomicAlignments)
http://www.bioconductor.org/packages...lignments.html
Michael Love is offline   Reply With Quote
Old 06-09-2014, 09:48 AM   #10
Parharn
Member
 
Location: Sweden

Join Date: Jul 2013
Posts: 84
Default

Thanks Michael, it worked. But then I got another error regarding the BAM file:

gnCnt <- summarizeOverlaps(exByGn, bamfls, mode="Union", ignore.strand=TRUE, single.end=FALSE, param=param)
Error: 1 errors; first error:
Error in value[[3L]](cond): failed to open BamFile: file(s) do not exist:
'tophat_all//ERR127302.bam'

For more information, use bplasterror(). To resume calculation, re-call
the function and set the argument 'BPRESUME' to TRUE or wrap the
previous call in bpresume().

First traceback:
34: summarizeOverlaps(exByGn, bamfls, mode = "Union", ignore.strand = TRUE,
single.end = FALSE, param = param)
33: summarizeOverlaps(exByGn, bamfls, mode = "Union", ignore.strand = TRUE,
single.end = FALSE, param = param)
32: .local(features, reads, mode, ignore.strand, ...)
31: .summarizeOverlaps_BamFileList(features, reads, mode, ignore.strand = ignore.strand,
inter.feature = inter.feature, singleEnd = singleEnd, fragments = fragments,
param = param, ...)
30: .dispatchBamFiles(features, reads, mode, ignore.strand, inter.feature = inter.feature,
singleEnd = singleEnd, fragments = fragments, param = pa

Do you have any advice for it?
Parharn is offline   Reply With Quote
Old 06-09-2014, 09:51 AM   #11
Michael Love
Senior Member
 
Location: Boston

Join Date: Jul 2013
Posts: 333
Default

Well, you'll have to make sure the files in bamfls (e.g. 'tophat_all/ERR127302.bam') exist and are correctly specified relative to your current working directory in R:

Code:
getwd()
Michael Love is offline   Reply With Quote
Old 06-09-2014, 10:12 AM   #12
Parharn
Member
 
Location: Sweden

Join Date: Jul 2013
Posts: 84
Default

Great, I fixed that. Thanks a lot!
Parharn is offline   Reply With Quote
Reply

Tags
error., summarizeoverlaps

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 10:49 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO