Error: could not find function "readBamGappedAlignments"
2
0
Entering edit mode
marcovth • 0
@marcovth-6828
Last seen 9.5 years ago
Canada

Hello ...

Does some one has a solution for my Error: could not find function "readBamGappedAlignments" ?

Thanks in advance.

 

----

R version 3.1.1 (2014-07-10) -- "Sock it to Me"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin13.1.0 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

[R.app GUI 1.65 (6784) x86_64-apple-darwin13.1.0]

[History restored from /Users/marcovth/.Rapp.history]

> source("http://bioconductor.org/biocLite.R")
Bioconductor version 2.14 (BiocInstaller 1.14.2), ?biocLite for help
>     biocLite("GenomicFeatures")
BioC_mirror: http://bioconductor.org
Using Bioconductor version 2.14 (BiocInstaller 1.14.2), R version 3.1.1.
Installing package(s) 'GenomicFeatures'
trying URL 'http://bioconductor.org/packages/2.14/bioc/bin/macosx/mavericks/contrib/3.1/GenomicFeatures_1.16.3.tgz'
Content type 'application/x-gzip' length 1004803 bytes (981 Kb)
opened URL
==================================================
downloaded 981 Kb

The downloaded binary packages are in
    /var/folders/dg/rtd23vq543qgs_k_skptrf_c0000gn/T//RtmpZSN7Wo/downloaded_packages
> citation("GenomicFeatures")

  Lawrence M, Huber W, Pag\`es H, Aboyoun P, Carlson M, et al. (2013) Software for Computing and Annotating Genomic Ranges. PLoS Comput Biol 9(8): e1003118. doi:10.1371/journal.pcbi.1003118

A BibTeX entry for LaTeX users is

  @Article{,
    title = {Software for Computing and Annotating Genomic Ranges},
    author = {Michael Lawrence and Wolfgang Huber and Herv\'e Pag\`es and Patrick Aboyoun and Marc Carlson and Robert Gentleman and Martin Morgan and Vincent Carey},
    year = {2013},
    journal = {{PLoS} Computational Biology},
    volume = {9},
    issue = {8},
    doi = {10.1371/journal.pcbi.1003118},
    url = {http://www.ploscompbiol.org/article/info%3Adoi%2F10.1371%2Fjournal.pcbi.1003118},
  }

> library(GenomicFeatures)
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, clusterExport, clusterMap, parApply, parCapply, parLapply, parLapplyLB, parRapply, parSapply, parSapplyLB

The following object is masked from ‘package:stats’:

    xtabs

The following objects are masked from ‘package:base’:

    anyDuplicated, append, as.data.frame, as.vector, cbind, colnames, do.call, duplicated, eval, evalq, Filter, Find, get, intersect, is.unsorted, lapply, Map, mapply, match, mget, order, paste,
    pmax, pmax.int, pmin, pmin.int, Position, rank, rbind, Reduce, rep.int, rownames, sapply, setdiff, sort, table, tapply, union, unique, unlist

Loading required package: IRanges
Loading required package: GenomicRanges
Loading required package: GenomeInfoDb
Loading required package: AnnotationDbi
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with 'browseVignettes()'. To cite Bioconductor, see 'citation("Biobase")', and for packages 'citation("pkgname")'.

> txdb=makeTranscriptDbFromUCSC(genome='hg19',tablename='ensGene')
Download the ensGene table ... OK
Extract the 'transcripts' data frame ... OK
Extract the 'splicings' data frame ... OK
Download and preprocess the 'chrominfo' data frame ... OK
Prepare the 'metadata' data frame ... OK
Make the TranscriptDb object ... OK
Warning message:
In .extractCdsLocsFromUCSCTxTable(ucsc_txtable, exon_locs) :
  UCSC data anomaly in 19284 transcript(s): the cds cumulative length is not a multiple of 3 for transcripts ‘ENST00000513161’ ‘ENST00000417833’ ‘ENST00000450884’ ‘ENST00000431193’ ‘ENST00000367667’
  ‘ENST00000498306’ ‘ENST00000434641’ ‘ENST00000462097’ ‘ENST00000475119’ ‘ENST00000480643’ ‘ENST00000525843’ ‘ENST00000498419’ ‘ENST00000532678’ ‘ENST00000460428’ ‘ENST00000478853’
  ‘ENST00000372925’ ‘ENST00000437607’ ‘ENST00000416121’ ‘ENST00000582567’ ‘ENST00000413489’ ‘ENST00000425265’ ‘ENST00000534717’ ‘ENST00000436685’ ‘ENST00000606954’ ‘ENST00000484054’
  ‘ENST00000414971’ ‘ENST00000443667’ ‘ENST00000417191’ ‘ENST00000559578’ ‘ENST00000482110’ ‘ENST00000524607’ ‘ENST00000419169’ ‘ENST00000295713’ ‘ENST00000609181’ ‘ENST00000327794’
  ‘ENST00000450490’ ‘ENST00000602582’ ‘ENST00000453676’ ‘ENST00000513088’ ‘ENST00000426449’ ‘EN [... truncated]
> tx_by_gene=transcriptsBy(txdb,'gene')
> ex_by_gene=exonsBy(txdb,'gene')
> 
> library(XVector)
> library(Biostrings)
> library(Rsamtools)
> reads=readBamGappedAlignments("sorted.BT1.bam")
Error: could not find function "readBamGappedAlignments"
readBamGappedAlignments • 5.3k views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 13 hours ago
United States

That function is defunct now, and has been replaced by readGAlignmentsFromBam(), in GenomicAlignments.

There are ways to find this out, and I will show you how I did it.

> library(GenomicFeatures)

> readBamGappedAlignments
Error: object 'readBamGappedAlignments' not found

> getAnywhere(readBamGappedAlignments)
A single object matching ‘readBamGappedAlignments’ was found
It was found in the following places
  namespace:GenomicAlignments
with value

function (...)
.Defunct("readGAlignmentsFromBam")
<environment: namespace:GenomicAlignments>


Note that this assumes that GenomicAlignments is installed on your system. Also note that the function body contains

.Defunct("readGAlignmentsFromBam")

Which indicates that the function is now defunct, and you should be using readGAlignmentsFromBam() instead.

HTH,

Jim

 

ADD COMMENT
1
Entering edit mode
anastazie.d ▴ 30
@anastazied-10696
Last seen 2.8 years ago
Czechia

readGAlignmentsFromBam also doesnt work, use readGAlignments() instead.

 

Anastassiya

ADD COMMENT

Login before adding your answer.

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