File Parsing, perl basics

2010-02-10 Thread PolyPusher
All, Below is from a CBR file describing the pins, or IO for an IC circuit. I need code that takes code as an input and returns a list that can be read into a CAD tool in SKILL(lisp language) syntax. Where .SUBCKT RE1321_4 is the begining of the list of pins, if a new line is needed it is starte

Re: perl file parsing

2008-10-23 Thread Rob Dixon
minky arora wrote: > > I have a file of the follwoing form > >> FFM50HR02GMY4E length=75 xy=2604_3772 region=2 run=R_2008_08_19_08_32_31_ > > TCAATGGGTCCGACGGAGAAAGCGCGACAGAAAAGCCCTTTTGT > > TCGACTAGCGTCGTG > >> FFM50HR02F5QTS length=59 xy=2408_2686 region=2 run=R_2008_08_19_08

Re: perl file parsing

2008-10-23 Thread Dave Tang
Hello, Use bioperl (http://www.bioperl.org/wiki/Main_Page) for this task. This should do what you want: #!/usr/bin/perl use strict; use warnings; use Bio::SeqIO; my $fastaFile = 'myfile'; my $pattern = 'CTTGGCGAGAAGGGCCGCTACCTGCTGGCCGCCTCCTTCGGCAACGT'; my $blockThreshold = '500'; my $numFasta

perl file parsing

2008-10-23 Thread minky arora
Dear Gurus, I have a file of the follwoing form >FFM50HR02GMY4E length=75 xy=2604_3772 region=2 run=R_2008_08_19_08_32_31_ TCAATGGGTCCGACGGAGAAAGCGCGACAGAAAAGCCCTTTTGT TCGACTAGCGTCGTG >FFM50HR02F5QTS length=59 xy=2408_2686 region=2 run=R_2008_08_19_08_32_31_ AGGACATGCGGCCCGGCG

Re: simple file parsing.

2008-09-30 Thread minky arora
Thanks a lot. I think I am all set. I used the code drafted by Dermot. And Shawn , Thanks a lot for your advise. -Minky On Tue, Sep 30, 2008 at 9:28 AM, minky arora <[EMAIL PROTECTED]> wrote: > > Hi All, > > I am not really new to perl but still find myself struggling with it. I > have a very s

Re: simple file parsing.

2008-09-30 Thread Mr. Shawn H. Corey
On Tue, 2008-09-30 at 09:28 -0400, minky arora wrote: > Here is my code so far. I am unable to bring all pieces together. I > need to > automate it so user can keep entering identifiers (as many as he > wants) but > I am lost. PLease help. > You are lost because you haven't fully specified your d

simple file parsing.

2008-09-30 Thread minky arora
Hi All, I am not really new to perl but still find myself struggling with it. I have a very simple problem in front of me, but am unable to slove it. Here is the problem: I have a file with lines like FF3M62TC02 AGGCAT-GGATG-ACAGT There are multiple lines like this. ALl I have to do it have th

RE: file parsing program -help

2006-10-17 Thread Charles K. Clarkson
I BioKid wrote: : I need a help to write a tricky perl script This is not all that tricky to accomplish. Break the problem into parts and solve each part. You have two main sections. Searching cluster.txt for 100% and deleting corresponding records from data.txt.

file parsing program -help

2006-10-17 Thread I BioKid
I need a help to write a tricky perl script I have a file with contents like this (cluster.txt) Cluster 4 0 9606aa, >gi|78706840|ref|N... * Cluster 5 0 9270aa, >gi|24653966|ref|N... * 1 7210aa, >gi|24653978|ref|N... at 99% Cluster 6 0 9196aa, >gi|24660328|ref|N... *

Re: Script Optimization file parsing script

2006-07-12 Thread Dr.Ruud
"Nagrale, Ajay" schreef: > I am working on optimization of one of the file parsing script. There > are around 4,50,000 lines present in the input file. This file size > is bound to increase in coming days. New entries would be added every > 2 minutes. > > Curren

Re: Script Optimization file parsing script

2006-07-12 Thread Mr. Shawn H. Corey
Nagrale, Ajay wrote: > The flow in the script is something like this: > > 1. Open the input file handle using the open function > 2. In while loop parse the entries (using the file handle > directly in while), parse the input entries. Do the sanity > check required (sanity check involved is a combi

Script Optimization file parsing script

2006-07-12 Thread Nagrale, Ajay
Hi, I am working on optimization of one of the file parsing script. There are around 4,50,000 lines present in the input file. This file size is bound to increase in coming days. New entries would be added every 2 minutes. Current script is taking around 60 seconds (average) and 150 seconds

Re: huge file : parsing problem

2006-03-29 Thread Saurabh Singhvi
Hi thanks for the help!! After it worked i can't say how happy i was :). pardon me for my negligence in calling it the traditional method ;). I just meant traditional in my history :p. once again, thanks a lot Saurabh On 3/29/06, Jay Savage <[EMAIL PROTECTED]> wrote: > > On 3/29/06, Saurabh Sin

Re: huge file : parsing problem

2006-03-29 Thread Mr. Shawn H. Corey
On Wed, 2006-29-03 at 15:53 +, Saurabh Singhvi wrote: > HI there, > > I have a huge file (~7GB) of text data. I need to parse it to extract > something : basically minima and maxima, and then i need to quantify > the data into an output file based on ranges. > > Now the problem is that the tr

huge file : parsing problem

2006-03-29 Thread Saurabh Singhvi
HI there, I have a huge file (~7GB) of text data. I need to parse it to extract something : basically minima and maxima, and then i need to quantify the data into an output file based on ranges. Now the problem is that the traditional method of opening and foreach which is as follows: open(FILE,

RE: File Parsing

2006-01-24 Thread Bakken, Luke
William Black wrote: > Hello, > > I'm reading from a file. I'm trying to read in five lines at a time > where each line has a newline and then process the lines into > separare variables. For example, > > Input File > - > Stevens, > Craig A Triangle Family Care PA > 106-A Ridgeview D

Re: File Parsing

2006-01-22 Thread John Doe
William Black am Sonntag, 22. Januar 2006 15.33: > Hello, > > I'm reading from a file. I'm trying to read in five lines at a time where > each line has a newline and then process the lines into separare variables. > For example, > > Input File > - > Stevens, > Craig A Triangle Family C

Re: File Parsing Question

2006-01-22 Thread Shawn Corey
William Black wrote: Hello, I'm trying to figure out how to read multiple lines from a file at once for parsing. For example,, If the file contained the following: input file Line 1 Line 2 Line 3 Line 4 Line 5 Line 6 Line 7 Line 8 I want to read in lines 1-4 for processing then d

Re: File Parsing

2006-01-22 Thread JupiterHost.Net
William Black wrote: Hello, Hello William, I'm reading from a file. I'm trying to read in five lines at a time where each line has a newline and then process the lines into separare variables. For example, Input File - Stevens, Craig A Triangle Family Care PA 106-A Ridgeview

re: File Parsing

2006-01-22 Thread William Black
Hello, I'm reading from a file. I'm trying to read in five lines at a time where each line has a newline and then process the lines into separare variables. For example, Input File - Stevens, Craig A Triangle Family Care PA 106-A Ridgeview Dr Cary, NC View Profile & Phone | Appointme

re: File Parsing Question

2006-01-22 Thread William Black
Hello, I'm trying to figure out how to read multiple lines from a file at once for parsing. For example,, If the file contained the following: input file Line 1 Line 2 Line 3 Line 4 Line 5 Line 6 Line 7 Line 8 I want to read in lines 1-4 for processing then during the next iteratio

Re: File parsing

2004-10-14 Thread JupiterHost.Net
What is the best way to this. (Fastest??). perldoc -f open and search on search.cpan.org for CSV Lee.M - JupiterHost.Net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

File parsing

2004-10-14 Thread Ajey Kulkarni
Hi, I'm parsing a file line by line. The fine is a comma separated file. I would like to search & replace or simply DELETE a column(field). 00018/11/1988 Development Government/Defense USA CSCIGROUND STATION UPGRADE Military Ground Command/Control

RE: complex data file parsing

2004-01-23 Thread Hughes, Andrew
PROTECTED] Sent: Friday, January 23, 2004 3:30 PM To: Hughes, Andrew; Perl Beginners Mailing List Subject: Re: complex data file parsing Hi, > As far as your follow up question on the B lines, "only line with a B in > the beginning in set?," I'm not sure if I understand. If you m

Re: complex data file parsing

2004-01-23 Thread wolf blaum
Hi, > As far as your follow up question on the B lines, "only line with a B in > the beginning in set?," I'm not sure if I understand. If you mean that > there will only be 1 line per order (set of lines A-T) with a B in the > first position, you are correct. yes, thats what I meant. Sorry abou

RE: complex data file parsing

2004-01-23 Thread Hughes, Andrew
ne [EMAIL PROTECTED]@masnc.net What is going wrong? Am I trying to view the output incorrectly? Thanks for any additional direction. Andrew -Original Message- From: wolf blaum [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 3:28 PM To: Hughes, Andrew; Perl Beginners Mail

Re: complex data file parsing

2004-01-22 Thread wolf blaum
hi, > I know that each block always starts with and A in the first position of > the first line and ends with a T in the last position of the last line. isnt it a T in the first position of the last row of the set? > I know that the second line starts with a B, and the data in the 5th space > on

complex data file parsing

2004-01-22 Thread Hughes, Andrew
I am trying to make sense of a comma delimited log file in which multiple lines make up 1 record. Here is an example: A,W29073,Thu Apr 05 15:25:08 2001 B,W29073,Scott,S,[EMAIL PROTECTED],249 Tah Ave,,Sth San Francisco,CA,~US,5- P,W29073, X,W29073,Company Name,A,Department Name,San Francis

Re: LDIF file parsing

2002-08-27 Thread Michael Fowler
On Tue, Aug 27, 2002 at 05:47:09PM +0200, Panel Vincent - A53 wrote: > As my first real script in perl, I would to parse a LDIF file (export format > of an LDAP directory) to get some sort of information of it. The structure > of such a file is something like this (between quotes) : I'd suggest u

Re: LDIF file parsing

2002-08-27 Thread Janek Schleicher
Panel Vincent - A53 wrote at Tue, 27 Aug 2002 17:47:09 +0200: > As my first real script in perl, I would to parse a LDIF file (export format > of an LDAP directory) to get some sort of information of it. The structure > of such a file is something like this (between quotes) : > > " > name: bozo

LDIF file parsing

2002-08-27 Thread Panel Vincent - A53
As my first real script in perl, I would to parse a LDIF file (export format of an LDAP directory) to get some sort of information of it. The structure of such a file is something like this (between quotes) : " name: bozo surname: the clown address: over here name: denise surname: richard addres

Re: File Parsing

2001-09-12 Thread Andrea Holstein
Troy L Adams wrote: > > This is my first post to this list and I am in need of help..I am using > ActivePerl on Win2K and need to parse a file of data so that I have the > number of the folder and the users who have permissions on each folder. I am > not worried about their level of control. I a

File Parsing

2001-09-12 Thread Adams, Troy L
Folks, This is my first post to this list and I am in need of help..I am using ActivePerl on Win2K and need to parse a file of data so that I have the number of the folder and the users who have permissions on each folder. I am not worried about their level of control. I am including sample data

Re: Text file parsing - one chunk v char by char

2001-07-05 Thread Mike Breeze
Very nice! I love Perl:) Cheers Ken, Breezy Ken wrote: > $/ = "¬"; > > Then while() will only bring in each record. > > - Original Message - > From: "Mike Breeze" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday,

Re: Text file parsing - one chunk v char by char

2001-07-05 Thread Ken
$/ = "¬"; Then while() will only bring in each record. - Original Message - From: "Mike Breeze" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 05, 2001 1:23 PM Subject: Text file parsing - one chunk v char by char > Hi there, &g

Re: Text file parsing - one chunk v char by char

2001-07-05 Thread Chas Owens
If "¬" is the record seperator then use the record seperator variable ($/) to get the individual records: {#create a new scope to prevent changes from effecting everthing else local ($/) = "¬"; while () { chomp; #get rid of "¬" on the end; do_someth

Text file parsing - one chunk v char by char

2001-07-05 Thread Mike Breeze
Hi there, I'm writing some code that has to parse a text file containing a series of records. The records are a direct export from a third party DB and are delimited by the "¬" char (I hope that comes out on all your email clients but I guess it doesn't really matter. What bothers me is that the

Re: [beginner] file parsing question

2001-04-24 Thread M.W. Koskamp
- Original Message - From: Stout, Joel R <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, April 24, 2001 10:20 PM Subject: [beginner] file parsing question > Sorry so lengthy but here goes: > > I am a Perl newbie and trying to parse a file. Dependi

Re: [beginner] file parsing question

2001-04-24 Thread Paul
--- Timothy Kimball <[EMAIL PROTECTED]> wrote: > Ah, yes, one of the most frustrating bugs in the world: > : if ($REFln[1] = "SN") { > This *assigns* the value "SN" to $REFln[1]. What you want to do is > *test* it. String comparisons in Perl are done with "eq" (and numeric > comparisons with

Re: [beginner] file parsing question

2001-04-24 Thread Paul Johnson
On Tue, Apr 24, 2001 at 04:33:00PM -0400, Timothy Kimball wrote: > You can avoid this by always writing comparisons with the constant > (if there is one) on the left-hand side: > > if ("SN" eq $REFln) > > but I rarely see people actually do that. I think that's because it feels so unnatu

Re: [beginner] file parsing question

2001-04-24 Thread Kevin Meltzer
Hi Joel, Did you type this in by hand? :) > parseRef ($testln); > sub parseREF { You would want to change one of those! Anyways.. Your problem is in this line: > if ($REFln[1] = "SN") { = is for assignments. You want this to be: if ($REFln[1] eq "SN") { To lear

Re: [beginner] file parsing question

2001-04-24 Thread Timothy Kimball
Ah, yes, one of the most frustrating bugs in the world: : if ($REFln[1] = "SN") { This *assigns* the value "SN" to $REFln[1]. What you want to do is *test* it. String comparisons in Perl are done with "eq" (and numeric comparisons with "=="). So you want this: if ($REFln eq "SN")

[beginner] file parsing question

2001-04-24 Thread Stout, Joel R
Sorry so lengthy but here goes: I am a Perl newbie and trying to parse a file. Depending on the tags in the data I want to parse each line a different way. I built the following program to test my process. use strict; my (@lines, $testln, @REFln); while (<>) { chomp; testType