Converting raw counts or DEseq2 output to TxDb container
1
0
Entering edit mode
5.5 years ago
rbronste ▴ 410

Interested in taking raw counts or DEseq2 output and importing into a TxDb container for downstream comparisons. Is there a straightforward way to go about this? Thank you.

RNA-Seq R gene • 1.2k views
0
Entering edit mode

Could you give more details about what you want to do? a TxDB container contains transcript information for a given organism. You can't place count data in the container.

0
Entering edit mode

So I am trying to limit the transcripts I run my ChIP-seq peaks against in the ChIPseeker package to those that are actually expressed in our system, instead of running the peaks and annotating against all transcripts.

1
Entering edit mode

Okay I hope I've understood correctly, try the following:

1. Get all transcripts from your TxDB object (use transcripts function from GenomicFeatures package)
2. Filter these transcripts for those which are expressed
3. Export this GRanges object as a GFF file (use export.gff function from rtracklayer package)
4. Create a TxDB object from this GFF file (use makeTxDbFromGFF function from GenomicFeatures package)

You can then supply this new TxDB object to ChIPseeker.

0
Entering edit mode

Thats exactly what I wanted to do, thanks!

0
Entering edit mode

No problem, glad we solved the issue!

0
Entering edit mode

What would be your suggestion for how to best filter the GRanges object I get when I pull all transcripts from TxDb.Mmusculus.UCSC.mm10.knownGene against a DESeq output? Thanks again.

0
Entering edit mode

For each gene in your DESeq2 output, get its corresponding Entrez ID (using the mapIds function). Then map this ID to the corresponding TX NAME and just filter with this list.

1
Entering edit mode
5.5 years ago
tarek.mohamed ▴ 350

Hi, you can extract normalized raw counts via

dds<-DESeq(dds)

NormCounts<-counts(dds,normalized=TRUE)

0
Entering edit mode

Im thinking more of using an external file of DESeq counts in this manner. Not doing DESeq itself in R.

0
Entering edit mode

I do not get your point, can you clarify what do you mean. Thanks

0
Entering edit mode

I just mean Im importing a DESeq output text file into GenomicRanges or TxDb.