Wijaya Edward wrote:
>
> From: Rob Dixon
>>
>> use strict;
>> use warnings;
>>
>> my %pwm;
>>
>> while () {
>>my $col = 0;
>>foreach my $c (/\S/g) {
>> $pwm{$c}[$col++]++;
>>}
>> }
>>
>> foreach my $freq (values %pwm) {
>>$_ = $_ ? $_ / keys %pwm : 0 foreach @$freq;
>> }
>>
>>
On 09/06/2006 05:41 AM, Mumia W. wrote:
On 09/06/2006 04:02 AM, Wijaya Edward wrote:
Dear Experts,
I am looking for a really efficient way to compute a position weight
matrix (PWM) [...]
Although I'm sure that smarter posters than I will [...]
do it right.
Ugh, I forgot about Wijaya's re
'0', '1', '0' ],
'C' => [ '1', '0', '0', '0', '0', '0' ],
'G' => [ '0', '0', '1', '1', '0', '1' ]
};
Hope to h
Rob Dixon schreef:
> use strict;
> use warnings;
>
> my %pwm;
>
> while () {
>my $col = 0;
>foreach my $c (/\S/g) {
> $pwm{$c}[$col++]++;
>}
> }
>
> foreach my $freq (values %pwm) {
>$_ = $_ ? $_ / keys %pwm : 0 foreach @$freq;
> }
>
> use Data::Dumper;
> print Dumper \%pwm;
>
Wijaya Edward wrote:
> Dear Experts,
>
> I am looking for a really efficient way to compute a position weight matrix
> (PWM) from a set of strings. In each set the strings are of the same length.
> Basically PWM compute the frequency (or probabilities) of bases [ATCG] occur
> in each position/col
On 09/06/2006 04:02 AM, Wijaya Edward wrote:
Dear Experts,
I am looking for a really efficient way to compute a position weight matrix (PWM) from a set of strings. In each set the strings are of the same length. Basically PWM compute the frequency (or probabilities) of bases [ATCG] occur in eac
Dear Experts,
I am looking for a really efficient way to compute a position weight matrix
(PWM) from a set of strings. In each set the strings are of the same length.
Basically PWM compute the frequency (or probabilities) of bases [ATCG] occur in
each position/column of a string. For example