Looking for code showing how estimateDispersions works.
1
0
Entering edit mode
@jarrodellingson-16957
Last seen 5.6 years ago

I'm trying to understand better how DESeq2 gets from my raw data to the results. For most functions in R, I type the function name in the console and get the full code used. There are a few important functions in DESeq2 that are lacking this information, and I'm not finding it from a simple Google search. Would greatly appreciate it if someone can point me in the right direction for this information.

As an example, trying to get the code written for estimateDispersions produces the following (note that running BiocGenerics::estimateDispersions gives the same results). 

> estimateDispersions
standardGeneric for "estimateDispersions" defined from package "BiocGenerics"

function (object, ...)
standardGeneric("estimateDispersions")
<bytecode: 0x1080286f8>
<environment: 0x108020a40>
Methods may be defined for arguments: object
Use  showMethods("estimateDispersions")  for currently available ones.

estimateDispersions deseq2 • 1.0k views
ADD COMMENT
2
Entering edit mode
Dario Strbenac ★ 1.5k
@dario-strbenac-5916
Last seen 2 hours ago
Australia

The getMethod function does that for S4 methods. The code of estimateDispersions is displayed in the R console by executing getMethod(estimateDispersions, "DESeqDataSet"). The options you could specify for the second argument of getMethod are listed in the output of showMethods("estimateDispersions"). For estimateDispersions, DESeqDataSet is the only viable option.

ADD COMMENT
0
Entering edit mode

Ah--thank you. I had used showMethods("estimateDispersions"), based on what I was seeing in the console, but was unaware of getMethod. This gives me what I need for this issue, and I'll keep it in mind for future use.

ADD REPLY

Login before adding your answer.

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