puzzled

2004-06-18 Thread Pedro Antonio Reche
Hi there, I am puzzled by the 'build_seq' subroutine in following code. #!/usr/sbin/perl -w use strict; use vars qw($USAGE); # random sequence generator # # -c=1 option will cause prot sequences to be built # using vertebrate aa frequencies, # with option -a putting a 1st methionine residues on. Fr

Exponential numbers

2003-10-08 Thread Pedro Antonio Reche
Dear all, I have a table that has exponential numbers of the type 0.203E-2 and I will like to reformat getting rid off the exponential so that the previous number would look when printed as 0.00203. Is there any easy way to do this? Any help welcome. Regards, Pedro -- To unsubscribe, e-mail: [E

mathing only one type of characters

2003-06-11 Thread Pedro Antonio Reche
Hi All; I would like to match a string if it has only cero or more of a defined set of characters. For example: if "GACT" are the characters, then GACTNGACT ## This string should not be matched because it has the extra character N GACCC ## This could be matched; Any help to solve this pro

processing text in perl script

2003-06-06 Thread Pedro Antonio Reche
Hi All, I would like to read and process line by line (using while) some text embeded into my perl script. I tried something like: #/usr/sbin/perl open(D, "__DATA__"); while(){ print $_; } close(D); __DATA__ This is a test and nothing else the execution of the prog

Problem with Getopt::Std

2003-01-30 Thread Pedro Antonio Reche
Hi all, I using the code below that uses the Getopt::Std to process the arguments from the command line (init subroutine). However, for some reason I do not get the arguments from the switches. If anyone sees what is the mistake I will be happy to hear about it. #!/usr/sbin/perl -w use Getopt::

Re: help parsing file

2002-12-18 Thread Pedro Antonio Reche
Bob Showalter wrote: > > > -Original Message- > > From: Pedro Antonio Reche [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, December 17, 2002 7:22 PM > > To: [EMAIL PROTECTED] > > Subject: help parsing file > > > > > > ... I am not > >

Re: help parsing file

2002-12-18 Thread Pedro Antonio Reche
"John W. Krahn" wrote: > > Pedro Antonio Reche wrote: > > > > Hi, I am interested in parsing the file at the bottom of this e-mail in > > order to extract the string between "" following /product=, > > /protein_id=, /db_xref= and /translation=,

help parsing file

2002-12-17 Thread Pedro Antonio Reche
Hi, I am interested in parsing the file at the bottom of this e-mail in order to extract the string between "" following /product=, /protein_id=, /db_xref= and /translation=, and that for each of the segment separated by the string "CDS". The ouptput for the example bellow should look like this:

Re: parsing two column file

2002-10-31 Thread Pedro Antonio Reche
Dear Jose, thanks a lot for your solution. Also after burning my head I found my own solution (shown below). However I if use the switch -w I got a message saying "Use of uninitialized value at ..", I do not why. cheers, Pedro #!/bin/perl -w use strict; my (@array, @array2, %hash, $i, $j, $key); w

parsing two column file

2002-10-31 Thread Pedro Antonio Reche
Hi all, I have been struggling with the following problem. I have a file that looks as it follows: 5 . 6 . 7 H 8 H 9 H 10 E 11 E 12 . 13 . and I want to write something like this: from 5 to 6 . from 7 to 9 H from 10 to 11 E from 12 to 13 .