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


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)
txdb = loadDb("Refseq.sqlite")
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

Login before adding your answer.

Traffic: 2262 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6