This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Converting raw counts or DEseq2 output to TxDb container

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

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.

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.

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.

Thats exactly what I wanted to do, thanks!

No problem, glad we solved the issue!

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.

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 answer

Hi, you can extract normalized raw counts via

dds<-DESeq(dds)

NormCounts<-counts(dds,normalized=TRUE)

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

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

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

Log in to answer this question.