This is a test version of Biostars. For the public version, visit https://www.biostars.org.
RIPSeeker viewRIP function fails to extract values() in GRangesList/S4 object

Hi,

I am using the RIPSeeker bioconductor package in R to run some RIPSeq analysis. I was able to successfully run the main ripseek() command and got my output files etc.

I am now trying to view the files using the viewRIP() function but keep running into errors. Any insight would be appreciated.

The output of ripSeek() function is annotated files (.bed/gff3 and txt) plus the SeekOutput.RData file.

setwd("/.../output")
getwd()
extdata.dir <- getwd()

outputfiles <- list.files(extdata.dir,".RData", recursive = TRUE, full.names = TRUE)
load(outputfiles, verbose = TRUE)

prints:

mainSeekOutputRIP,   RIPGRList,   mainSeekOutputCTL , annotatedRIPGR

To extract files within each I run:

alignGalFiltered <- elementMetadata(mainSeekOutputRIP$alignGalFiltered)
alignGalFiltered2 <- elementMetadata(mainSeekOutputCTL$alignGalFiltered)

viewRIP(RIPGRList@elementMetadata@listData, alignGalFiltered, alignGalFiltered2, scoreType = "eFDR", cutoffLine = .001)

PRINTS:

Error in (function (classes, fdef, mtable): unable to find an inherited method for function 'values' for signature '"list"'

OR

viewRIP(RIPGRList@elementMetadata, alignGalFiltered, alignGalFiltered2, scoreType = "eFDR", cutoffLine = .001)

PRINTS:

Error in log10(values(seekedRIP)[, scoreType]) :  non-numeric argument to mathematical function

The viewRIP() first line in the code is:

{values(seekedRIP)[,scoreType] <- -log10(values(seekedRIP)[,scoreType])

I have tried multiple ways of running the function but it seems it is a problem with extracting the "column" from the S4 object/GRangesList. I have tried multiple ways to extract slots etc or trying to turn the S4 vector into a data frame but with no success, maybe I am doing it wrong. The column "eFDR" is located at

RIPGRList@elementMetadata@listData$eFDR (

also gives the error:

Error in (function (classes, fdef, mtable)  :  unable to find an inherited method for function 'values' for signature '"numeric"')

Thanks for any help.

ripseq s4 rip r

0 answers

No answers yet.

Log in to answer this question.