Error Raised When Trying To Use pileup()
2
0
Entering edit mode
@travismcouture-10788
Last seen 8.6 years ago

Hey everyone. When I run the following code it raises an error:

me3.p10 <- pileup(position(foo), width(foo), seqlens[["10"]])
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘pileup’ for signature ‘"integer"’

For background on my data and purpose, follow this guide: http://www.bioconductor.org/packages/2.4/bioc/vignettes/ShortRead/inst/doc/ShortRead_and_HilbertVis.pdf

I am essentially trying to learn HilbertVis to plot some genomic data I have. Thanks for your help in advance!

Additional Info:

Link to all source data: http://www.ebi.ac.uk/~anders/ShortReadExampleData/

Code used:

library("ShortRead") 
> maps.me1 <- sapply( list.files( "H3K4me1", "run.*lane.\\.map" ), 
                       function(filename) readAligned( "H3K4me1", filename, type="MAQMapShort" ) ) 
> maps.me3 <- sapply( list.files( "H3K4me3", "run.*lane.\\.map" ),
                function(filename) readAligned( "H3K4me3", filename, type="MAQMapShort" ) )

> seqlens <- c( `10`=135374737, `11`=134452384, `12`=132349534,
  `13`=114142980, + `14`=106368585, `15`=100338915, `16`=88827254,
  `17`=78774742, `18`=76117153, `19`=63811651, `1`=247249719,
  `20`=62435964, `21`=46944323, `22`=49691432, `2`=242951149,
  `3`=199501827, `4`=191273063, `5`=180857866, `6`=170899992, 
  `7`=158821424, `8`=146274826, `9`=140273252, MT=16571, X=154913754,
  Y=57772954 )

> foo <- maps.me3$run13_lane4.map[
    chromosome( maps.me3$run13_lane4.map ) == "10" &
    quality(alignQuality( maps.me3$run13_lane4.map )) >= 15

> me3.p10 <- pileup( position(foo), width(foo), seqlens[["10"]] )

Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘pileup’ for signature ‘"integer"’
sessioninfo()

R version 3.2.0 (2015-04-16)
Platform: x86_64-unknown-linux-gnu (64-bit)
Running under: CentOS release 6.7 (Final)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] ShortRead_1.28.0           GenomicAlignments_1.6.3    SummarizedExperiment_1.0.2 Biobase_2.30.0             Rsamtools_1.24.0          
 [6] GenomicRanges_1.22.4       GenomeInfoDb_1.6.3         Biostrings_2.38.4          XVector_0.10.0             IRanges_2.4.7             
[11] S4Vectors_0.8.11           BiocParallel_1.4.3         BiocGenerics_0.16.1        HilbertVis_1.30.0          lattice_0.20-33           

loaded via a namespace (and not attached):
[1] bitops_1.0-6         futile.options_1.0.0 zlibbioc_1.16.0      hwriter_1.3.2        latticeExtra_0.6-28  futile.logger_1.4.1  RColorBrewer_1.1-2  
[8] lambda.r_1.1.7       tools_3.2.0
hilbertvis rsamtools shortread biostrings • 1.6k views
ADD COMMENT
0
Entering edit mode

You are being unnecessarily vague. The reason the posting guide says to give a self-contained example is because questions like yours are the equivalent of saying "I did something and it didn't work". Unless you give an example that anybody else can use to reproduce the error, nobody can help you.

ADD REPLY
0
Entering edit mode

I gave a link to the guide which contains the sample data I am using as well as all the specific commands I used. I can copy and past everything to my post...

ADD REPLY
0
Entering edit mode

I've added your additional info to the original question, and will remove it from below.

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

You're referencing a document (from the URL) from Bioconductor version 2.4 (released April, 2009) but using software from Bioconductor 3.2 (released October, 2015), and the code has changed a lot in the intervening time. The current version of Bioconductor (available with R 3.3) is Bioconductor 3.3.

There is no 'ShortRead and HilbertVis' vignette in the current ShortRead (see the 'Documentation' section of https://bioconductor.org/packages/ShortRead). On the one hand this looks like an unintentional consequence of house-keeping done some time ago. On the other hand the vignette is very outdated (it is available to developers in the subversion repository, but is not compiled and distributed with the package) and would require considerable work to make it correct for current software.

The vignettes from the HilbertViz and HilbertCurve packages might provide a more suitable introduction.

ADD COMMENT

Login before adding your answer.

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