[BioC] Conversion of pfm to pwm using PWM()

Steve Lianoglou mailinglist.honeypot at gmail.com
Fri May 27 05:33:49 CEST 2011


Hi,

On Thu, May 26, 2011 at 6:51 PM, Ravi Karra <ravi.karra at gmail.com> wrote:
> Hi,
> I am trying to find TF binding sites in a set of promoters using position frequency matrices (pfm's) from jaspar and transfac.  I have gotten this to work before on my machine at home, but cannot seem to get this to run on campus.  I am not sure why I get the following error as I thought PWM can handle integer pfm's.  Any thoughts?
>
> Thanks in advance,
> Ravi
>
> Code:
>> library (Biostrings)
>> pfm
>  [,1] [,2] [,3] [,4] [,5] [,6]
> A   13    0   50    1   13    6
> C   14    0    2    0    6   16
> G   15   53    0    1   25   22
> T   11    0    1   51    9    9
>> typeof (pfm)
> [1] "integer"
>> pwm = pfm (PWM)
> Error: could not find function "pfm"

Were you just warming up your keyboard for the next step, or .. ? :-)

>> library (Biostrings)
>> pfm
>  [,1] [,2] [,3] [,4] [,5] [,6]
> A   13    0   50    1   13    6
> C   14    0    2    0    6   16
> G   15   53    0    1   25   22
> T   11    0    1   51    9    9
>> typeof (pfm)
> [1] "integer"
>> PWM (pfm)
> Error in function (classes, fdef, mtable)  :
>  unable to find an inherited method for function "PWM", for signature "matrix"
>> sessionInfo ()
> R version 2.12.0 (2010-10-15)
> Platform: x86_64-unknown-linux-gnu (64-bit)

I'm not sure what to say, but this works for me.

You can look at the output of `showMethods('PWM'), R 2.13/bioc-2.8 has
a PWM method defined for matrix objects:

R> showMethods('PWM')
Function: PWM (package Biostrings)
x="character"
x="DNAStringSet"
x="matrix"

Maybe you have to upgrade to the latest version of R/bioc? Sorry, I
don't have a version of R 2.12 lying around to test further ... you
say it worked for you at home, maybe your cpu at home is running R
2.13?

HTH,

-steve

-- 
Steve Lianoglou
Graduate Student: Computational Systems Biology
 | Memorial Sloan-Kettering Cancer Center
 | Weill Medical College of Cornell University
Contact Info: http://cbio.mskcc.org/~lianos/contact



More information about the Bioconductor mailing list