I am trying to perform read counts with summarizeOverlaps using the following code, using an sqlite file generated with Cuffdiff:
library("GenomicFeatures"); library(BiocParallel)
txdb <- loadDb("./data/PR0735.galaxy.sqlite")
eByg <- exonsBy(txdb, by=c("gene"))
bfl <- BamFileList(outpaths(args), yieldSize=50000, index=character())
multicoreParam <- MulticoreParam(workers=4); register(multicoreParam); registered()
counteByg <- bplapply(bfl, function(x) summarizeOverlaps(eByg, x, mode="Union",
ignore.strand=TRUE,
inter.feature=FALSE,
singleEnd=TRUE))
countDFeByg <- sapply(seq(along=counteByg), function(x) assays(counteByg[[x]])$counts)
rownames(countDFeByg) <- names(rowRanges(counteByg[[1]])); colnames(countDFeByg) <- names(bfl)
rpkmDFeByg <- apply(countDFeByg, 2, function(x) returnRPKM(counts=x, ranges=eByg))
write.table(countDFeByg, "results/countDFeByg.xls", col.names=NA, quote=FALSE, sep="\t")
write.table(rpkmDFeByg, "results/rpkmDFeByg.xls", col.names=NA, quote=FALSE, sep="\t")
but when I run txdb <- loadDb("./data/PR0735.galaxy.sqlite") I get the following error:
Error: dbExistsTable(conn, "metadata") is not TRUE |
|
Can anyone help with this error? I have not been able to find any information online at all. | |
|
The `loadDb` function is meant to load `txdb` objects. The sqlite file from cuffdiff is, indeed, a sqlite file, but it does not contain the same information as a `txdb` object. So, I do not think that your code should be expected to work.
Thanks for your help. It's worth noting that code comes from the systemPipeR RNASeq workflow vignette so perhaps I should contact the author?