Edit transcript information in txdb using R library GenomicFeatures
0
1
Entering edit mode
5.6 years ago
pastatonio78 ▴ 30

Hi,

I would like to load a refseq transcript database and update the coordinates of one transcript, using R package GenomicFeatures. Then save the updated database.

I tried the following but the saved object is empty. Moreover, the makeTxDbFromGRanges() function requires that my transcripts have a TYPE column but I have no idea what it refers to. I filled with some random characters and the function does not complain anymore.

Thanks for your suggestion

library(GenomicFeatures,quietly = TRUE)
tx <- transcripts(txdb)

idx <- which(tx$tx_name=="NM_000059") end(tx[idx]) <- 32009447 start(tx[idx]) <- 32006093 #If no Type is provided the makeTxDbFromGRanges() function complains. I have no idea what Type refers to tx$type <- "Hello"

DB_out <- makeTxDbFromGRanges(tx, drop.stop.codons=TRUE)
saveDb(DB_out, file="output_db.sqlite")

GenomicFeatures R • 1.6k views