Missing test data for RiboProfiling package
1
0
Entering edit mode
@maxferretti-23814
Last seen 3 months ago
United States

I am trying to use the RiboProfiling package with my data and am having some trouble. Ideally, I'd like to go through the process with the test data from the vignette to figure out where I'm going wrong, but the files (indeed, the entire site that hosts them) is not functioning:

http://genomique.info/data/public/RiboProfiling/ctrl.bam

and the parent site, http://genomique.info is just an Apache landing page.

RiboProfiling • 315 views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States

Creating a vignette that works without unduly confusing the end user is sometimes not that simple. Often times a package author will supply data with the package to use for examples, but accessing those data is something the end user usually isn't going to do, and showing the code used to access the data can be unnecessarily confusing. The usual paradigm in that instance is to have example code that is meant to show what one should do, and then hidden functional code that reads in the example data and generates the output. That's how RiboProfiling works. If you look at the script for the vignette, you will see this sort of thing:

## ----Import_library_noEcho,echo=TRUE,eval=FALSE-------------------------------
#  library(RiboProfiling)
#  listInputBam <- c(
#      BamFile("http://genomique.info/data/public/RiboProfiling/ctrl.bam"),
#      BamFile("http://genomique.info/data/public/RiboProfiling/nutlin2h.bam")
#      )
#  covData <- riboSeqFromBAM(listInputBam, genomeName="hg19")

## ----Import_library,echo=FALSE------------------------------------------------
suppressWarnings(suppressMessages(library(RiboProfiling)))

## ----riboSeqfromBam,echo=FALSE,eval=TRUE,dev=c("png"),fig.width=7-------------

myFileCtrl <- system.file("extdata", "ctrl_sample.bam", package="RiboProfiling")
myFileNutlin2h <- system.file("extdata", "nutlin2h_sample.bam", package="RiboProfiling")
listeInputBam <- c(myFileCtrl, myFileNutlin2h)

txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene::TxDb.Hsapiens.UCSC.hg19.knownGene
covData <-
    suppressMessages(
        suppressWarnings(
            riboSeqFromBAM(
                listeInputBam,
                txdb=txdb,
                listShiftValue=c(-14, -14)
            )
        )
    )

The first chunk (under Import_library_noEcho) is what you see in the vignette, but that code isn't evaluated! Note that the header says echo = TRUE, eval = FALSE, so it's echoed but not evaluated. Instead the next two chunks are evaluated but the code isn't shown (echo = FALSE, eval = TRUE). The first chunk just loads the package, and the second one provides paths to BAM files that come with the package and then runs riboSeqFromBAM.

If you are trying to step through the code, you should use the evaluated code in the vignette rather than the unevaluated example code. Does that make sense?

0
Entering edit mode

Thanks I understand what you're saying.

Perhaps the best bet is just to post in more detail about where I'm running into errors, but I believe the problem is that a piece of my data just has some kind of formatting difference from what the package is expecting. I was hoping to use the example data as a reference to troubleshoot by myself, but it's not available.

Since the package was just updated this year, I was hoping the package author would be able to fix the broken link, I'd be able to get the data and solve my own problem!

In the meantime, I will put together my code to actually address the errors I'm getting. Thanks again for your assistance.

ADD REPLY
0
Entering edit mode

I think you might be misunderstanding what I said. The example data are available, just not in the way that's shown in the vignette. If I run this code

 listInputBam <- c(
      BamFile("http://genomique.info/data/public/RiboProfiling/ctrl.bam"),
      BamFile("http://genomique.info/data/public/RiboProfiling/nutlin2h.bam")
      )
  covData <- riboSeqFromBAM(listInputBam, genomeName="hg19")

I get

> covData <- riboSeqFromBAM(listInputBam, genomeName="hg19")

Get UCSC ensGene annotations.

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 TxDb object ... OK
http://genomique.info/data/public/RiboProfiling/ctrl.bam


Read alignment file

[E::hts_open_format] Failed to open file "http://genomique.info/data/public/RiboProfiling/ctrl.bam" : No such file or directory
Error in value[[3L]](cond) : 
  failed to open BamFile: failed to open SAM/BAM file
  file: 'http://genomique.info/data/public/RiboProfiling/ctrl.bam'
In addition: Warning message:
In riboSeqFromBAM(listInputBam, genomeName = "hg19") :
  paramScanBAM parameter is not a ScanBamParam object. Set to default NULL value!

Which is what I believe you are getting. But you can do this instead:

> myFileCtrl <- system.file("extdata", "ctrl_sample.bam", package="RiboProfiling")
> myFileNutlin2h <- system.file("extdata", "nutlin2h_sample.bam", package="RiboProfiling")
> listeInputBam <- c(myFileCtrl, myFileNutlin2h)
> library(TxDb.Hsapiens.UCSC.hg19.knownGene)
> txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
> covData <- riboSeqFromBAM(listeInputBam, txdb = txdb, listShiftValue = c(-14,14))
C:/Users/jmacdon/AppData/Local/R/win-library/4.4/RiboProfiling/extdata/ctrl_sample.bam


Read alignment file


Plot match length distribution.


Plot read start coverage around TSS.


Count read start coverage on the CDS, 5pUTR, and 3pUTR.

C:/Users/jmacdon/AppData/Local/R/win-library/4.4/RiboProfiling/extdata/nutlin2h_sample.bam


Read alignment file


Plot match length distribution.


Plot read start coverage around TSS.


Count read start coverage on the CDS, 5pUTR, and 3pUTR.

Warning messages:
1: In riboSeqFromBAM(listeInputBam, txdb = txdb, listShiftValue = c(-14,  :
  paramScanBAM parameter is not a ScanBamParam object. Set to default NULL value!

2: In countShiftReads(exonGRanges[names(cdsPosTransc)], cdsPosTransc,  :
  Param motifSize should be an integer! Accepted values 3, 6 or 9. Default value is 3.

3: In countShiftReads(exonGRanges[names(cdsPosTransc)], cdsPosTransc,  :
  Param motifSize should be an integer! Accepted values 3, 6 or 9. Default value is 3.

4: In ggplot2::geom_abline(ggplot2::aes(color = "Diagonal", fill = "Diagonal",  :
  Ignoring unknown aesthetics: fill
5: In ggplot2::geom_abline(ggplot2::aes(color = "Diagonal", fill = "Diagonal",  :
  Ignoring unknown aesthetics: fill
ADD REPLY

Login before adding your answer.

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