pileup function not found (Rsamtools)
3
0
Entering edit mode
oscar puig • 0
@oscar-puig-11594
Last seen 8.2 years ago

Hi

This question may be naive, but I can't figure out why Rsamtools can't find pileup function. 

 

> library(RNAseqData.HNRNPC.bam.chr14)

> fl<-RNAseqData.HNRNPC.bam.chr14_BAMFILES[1]

> bf<-BamFile(fl)

> chr14_seqinfo<-seqinfo(bf)["chr14"]

> (end_coord<-seqlengths(chr14_seqinfo)/2)

   chr14 

53674770 

> sbp<-ScanBamParam(which=GRanges("chr14",IRanges(1,end_coord)))

> res<-pileup(fl,scanBamParam=sbp)

Error: could not find function "pileup"

> traceback()

No traceback available 

> sessionInfo()

R version 3.3.0 (2016-05-03)

Platform: x86_64-pc-linux-gnu (64-bit)

Running under: Ubuntu 14.04.5 LTS


locale:

 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              

 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    

 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   

 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 

 [9] LC_ADDRESS=C               LC_TELEPHONE=C            

[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       


attached base packages:

[1] parallel  stats     graphics  grDevices utils     datasets  methods  

[8] base     


other attached packages:

[1] RNAseqData.HNRNPC.bam.chr14_0.2.0 Rsamtools_1.16.1                 

[3] Biostrings_2.32.1                 XVector_0.4.0                    

[5] GenomicRanges_1.16.4              GenomeInfoDb_1.0.2               

[7] IRanges_1.22.10                   BiocGenerics_0.10.0              


loaded via a namespace (and not attached):

[1] zlibbioc_1.10.0 bitops_1.0-6    stats4_3.3.0   






root@ip-172-31-37-127:~# R --version

R version 3.3.0 (2016-05-03) -- "Supposedly Educational"

Copyright (C) 2016 The R Foundation for Statistical Computing

Platform: x86_64-pc-linux-gnu (64-bit)


R is free software and comes with ABSOLUTELY NO WARRANTY.

You are welcome to redistribute it under the terms of the

GNU General Public License versions 2 or 3.

For more information about these matters see

http://www.gnu.org/licenses/.
rsamtools pileup • 1.4k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States

You have to load Rsamtools before you can call any functions from that package.

ADD COMMENT
0
Entering edit mode

Alternatively you can use the :: accessor to get functions that are in attached packages.

Rsamtools::pileup(<args go here>)

should work.

ADD REPLY
0
Entering edit mode
@martin-morgan-1513
Last seen 5 months ago
United States

Rsamtools v. 1.16.1 did not contain pileup; your Bioconductor version is (quite!) old. The current version of Rsamtools is 1.24.0, BiocInstaller::biocVersion() 3.4.

When you start R and load the BiocInstaller package, you should see a message that 'BiocInstaller version xx is too old for R version 3.3.0". You could update your version of BiocInstaller by following the instructions at https://bioconductor.org/install/#troubleshoot-biocinstaller

(It's rarely necessary to run R as root).

ADD COMMENT
0
Entering edit mode
oscar puig • 0
@oscar-puig-11594
Last seen 8.2 years ago

That fixed the problem. Rsamtools v. 1.16.1 did not contain pileup. It's working now.

Not sure why I had an old version of BioC, since I just installed it. 

Thanks guys, you are great!!!

ADD COMMENT

Login before adding your answer.

Traffic: 426 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