how to exclude set of genes from a txdb
1
0
Entering edit mode
7.6 years ago
tarek.mohamed ▴ 370

Hi All,

How can I exclude single gene or a list of genes from a txdb object. I have a txdb from hg38 build and I want to exclude single transcript ""uc021wui.2". I can select this transcript using select function from genomic features package. however I do not know how to exclude it from the TxDb object.

library("TxDb.Hsapiens.UCSC.hg38.knownGene") library("org.Hs.eg.db") library("GenomicFeatures") txdb<-(TxDb.Hsapiens.UCSC.hg38.knownGene,miRBaseBuild= "GRCh37.p5") target<-"uc021wui.2" select(txdb,keys=target,keytype = "TXNAME",columns =cols )

Thanks Tarek

txdb • 4.5k views
ADD COMMENT
0
Entering edit mode

what have you tried so far? How did you obtain the txdb object?

ADD REPLY
0
Entering edit mode
ADD REPLY
0
Entering edit mode

Hi,

Thanks for the reply I have a txdb from hg38 build and I want to exclude single transcript ""uc021wui.2". I can select this transcript using select function from genomic features package. however I do not know how to exclude it from the TxDb object.

>library("TxDb.Hsapiens.UCSC.hg38.knownGene")
>library("org.Hs.eg.db")
>library("GenomicFeatures")
>txdb<-(TxDb.Hsapiens.UCSC.hg38.knownGene,miRBaseBuild= "GRCh37.p5")
>target<-"uc021wui.2"
>select(txdb,keys=target,keytype = "TXNAME",columns =cols )
ADD REPLY
0
Entering edit mode

Move this comment to question please. Also add an EDIT tag so that users will know that it was added after the Q was published

ADD REPLY
1
Entering edit mode
7.6 years ago

As far as I know, you can select the feature as you have noticed, but can't remove it directly from TxDb. Your options are 1) to create a new TxDb if you need it frequently
https://bioconductor.org/packages/devel/bioc/vignettes/GenomicFeatures/inst/doc/GenomicFeatures.pdf

OR, 2) Just remove that particular gene from the downstream analysis. Where and for what you are using the TxDb downstream?

ADD COMMENT
0
Entering edit mode

Hi Santosh I am analyzing Chip-seq data, and I am using "chipseeker" package to annotate peaks. For peaks annotation I want to exclude all micro-RNA. I checked the "chipseeker" for such funtion, but I could not find one. So I thought about excluding them from the TxDb file that I use to annotate peaks. ibrary("ChIPseeker") annotatePeak("narrowpeak_bowtie_q0.05_IgG.txt", tssRegion=c(-3000, 3000), TxDb=txdb, annoDb="org.Hs.eg.db")

ADD REPLY
0
Entering edit mode

Hi, I think you are missing something in this line; could you see if this is correct?

txdb<-(TxDb.Hsapiens.UCSC.hg38.knownGene,miRBaseBuild= "GRCh37.p5")

More specifically, I am not sure why "miRBaseBuild" is there and is assigned to a genomeBuild. If possible, repost the main part of the (TxDb related) code again, formatted correctly.

Note: Use the code formatting button (101010) in the markup menu. The one you are using now is for quotation.

ADD REPLY

Login before adding your answer.

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