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
"Budi Milis" schreef:
> How do accept pipe as an valid argument in perl, for example:
>
> echo 123456 | ./convert_time.pl
>
> convert_time.pl:
> #!/usr/bin/perl
>
> use POSIX qw(strftime);
>
> my $time_in = $ARGV[0];
> my $time_out = strftime "%Y%m%d", localtime($time_in);
> print "$time_out\n";
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
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
Hi Kishore,
The below snippet will get your desired result.
---
#!/usr/bin/perl
use strict ;
my @structure_name = ();
my $fni = 'd:\Sample.txt' ;
my $fno = 'd:\ashok.txt'
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;
>
Hi All,
On Unix box we have Oracle 9i and Perl 5.8
Now we are upgrading Oracle to 10g.
In that case we need to re-intsall Perl DBD module.
Is there any other activity that should be taken care of ?
Thanks in advance,
Nilay
> ""Budi" == "Budi Milis" <[EMAIL PROTECTED]> writes:
"Budi> On 9/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> Consider this:
>> my $arg = @ARGV ? shift @ARGV : ;
>>
"Budi> Works as I expected, many thanks.
"Budi> However, my previous code was:
"Budi> my $time_in = $ARG[0] || ;
"B
Hi,
Suppose I have the output of this command
date +%d.%H
which outputs:
06.11
I want to adjust the last two digits to less 1:
such that it becomes 06.10..
how do I do that?
perhaps something like this.
s/\d+$/(regexp being lookup minus 1/
thanks!
___
On 9/6/06, Michael Alipio <[EMAIL PROTECTED]> wrote:
I want to adjust the last two digits to less 1:
perhaps something like this.
s/\d+$/(regexp being lookup minus 1/
s/(\d+)$/$1-1/e
is going to work, even though it is convoluted and not robust. For
example, '06.00' will become '06.-1'
--
On 9/5/06, Michael Alipio <[EMAIL PROTECTED]> wrote:
Hi,
Suppose I have the output of this command
date +%d.%H
which outputs:
06.11
I want to adjust the last two digits to less 1:
such that it becomes 06.10..
how do I do that?
perhaps something like this.
s/\d+$/(regexp being lookup minus 1/
Hi,
I have a script that I have been running successfully on perl 5.6.1. It uses
Net::SSH to send the code of another perl script to a remote host. I tried
to move the script(s) to a new box running 5.8 and it errors out while
trying to run the cmd method on the command string passed to it. Here i
On 9/6/06, Jim <[EMAIL PROTECTED]> wrote:
input must be 8 bytes long at
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Crypt/DES.pm line 57.
I suspect that this is related to Unicode: A string of eight
characters isn't necessarily eight bytes anymore.
If you can track down the source
Dear Rob,
I was trying your script with this set of strings:
__DATA__
CAGGTG
CAGGTG
But how come it returns:
$VAR1 = {
'A' => [ 0, '0.5' ],
'T' => [ 0, 0, 0, 0, '0.5' ],
'C' => [ '0.5' ],
'G' => [ 0, 0, '0.5', '0.5', 0, '0.5' ]
};
Instead of the correct:
$VAR1 = {
Hello all,
I need a regular expression to process some data but
get stuck. I wonder if anyone here might have a clue.
input:
my $line='group A 1 2 3 4';# separated by space
results:
my @data=("group A ",1,2,3,4);
Thanks,
Li
__
Do You Yahoo!
On 9/6/06, chen li <[EMAIL PROTECTED]> wrote:
I need a regular expression to process some data but
get stuck. I wonder if anyone here might have a clue.
input:
my $line='group A 1 2 3 4';# separated by space
results:
my @data=("group A ",1,2,3,4);
You barely need a regular expression for
Hi, guys
In a udp socket test routine, I want to write some integers to server in network
order. But unfortunately, my server receive just chars! how can I do?
My code:
#! /usr/bin/perl
use IO::Socket;
$sock = new IO::Socket::INET (PeerAddr => '192.168.89.166',
Pee
On 9/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi, guys
In a udp socket test routine, I want to write some integers to server in network
order. But unfortunately, my server receive just chars! how can I do?
Take a look at 'perldoc pack'
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For
On 9/7/06, Adriano Ferreira <[EMAIL PROTECTED]> wrote:
On 9/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Hi, guys
> In a udp socket test routine, I want to write some integers to server in
network
> order. But unfortunately, my server receive just chars! how can I do?
Take a look at 'pe
On 9/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
In a udp socket test routine, I want to write some integers to server
in network order.
my $v = 3;
foreach (1 .. 3) {
print $sock $v++;
}
That doesn't look like "network order", it looks like "plain text".
Didn't you want to use pa
--- Adriano Ferreira <[EMAIL PROTECTED]> wrote:
> On 9/6/06, chen li <[EMAIL PROTECTED]> wrote:
> > I need a regular expression to process some data
> but
> > get stuck. I wonder if anyone here might have a
> clue.
> >
> > input:
> > my $line='group A 1 2 3 4';# separated by space
> >
> > res
yeah, I know, thanks for clue, I just cannor remember the functions. :)
> -邮件原件-
> 发件人: Adriano Ferreira [mailto:[EMAIL PROTECTED]
> 发送时间: 2006年9月7日 11:01
> 收件人: [EMAIL PROTECTED]; beginners@perl.org
> 主题: Re: How to write an integer to socket
>
> On 9/7/06, Adriano Ferreira <[EMAIL PR
On 09/06/2006 09:49 PM, chen li wrote:
Hello all,
I need a regular expression to process some data but
get stuck. I wonder if anyone here might have a clue.
input:
my $line='group A 1 2 3 4';# separated by space
results:
my @data=("group A ",1,2,3,4);
As Adriano Ferreira said, you don
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
chen li wrote on Wed, Sep 06, 2006 at 08:23:42PM PDT:
> --- Adriano Ferreira <[EMAIL PROTECTED]> wrote:
> > On 9/6/06, chen li <[EMAIL PROTECTED]> wrote:
> > > I need a regular expression to process some data
> > but
> > > get stuck. I wonder if anyone here might have a
> > clue.
> > >
> > > input
25 matches
Mail list logo