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/.

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