Re: how to parse complex table

2011-04-25 Thread charley
On Apr 23, 11:56 am, abuali...@gmail.com (galeb abu-ali) wrote: > thank you for the advice Shawn, I'll try what you suggest! > BTW, it's not homework, It's supporting metadata for my research and I'm > trying to parse it in a format that will be easier to lookup later. > > thanks again > > galeb H

Re: Fwd: how to parse complex table

2011-04-25 Thread galeb abu-ali
thanks Peter, code looks elegant now! "like chiseling away everything that is not David from a block of marble :-) " very cool reference!

Re: Fwd: how to parse complex table

2011-04-24 Thread Peter Scott
On Sun, 24 Apr 2011 18:14:52 -0400, galeb abu-ali wrote: > I revised the code to the following: [...] > for my $file( @ARGV ) { > open( my $IN, "<", $file ) or die "Failed to open: $!\n"; > > my( %cog_cat, %cog_id, @cogs, $oid, $locus, $source, $cluster_info > ); > > while( my $li

Fwd: how to parse complex table

2011-04-24 Thread galeb abu-ali
Mike, many thanks for the help, particularly your comments which were as valuable as your code! I revised the code to the following: #!/usr/bin/perl # parse_IMG_gene_info4.pl use strict; use warnings; for my $file( @ARGV ) { open( my $IN, "<", $file ) or die "Failed to open: $!\n"; my

Re: how to parse complex table

2011-04-23 Thread Mike McClain
On Sat, Apr 23, 2011 at 10:27:07AM -0400, galeb abu-ali wrote: > Hi, > > I'm trying to parse a table containing information about genes in a > bacterial chromosome. Below is a sample for one gene, and there's about 4500 > such blocks in a file: > My problem is that some genes have 2 entries for

Re: how to parse complex table

2011-04-23 Thread Shawn H Corey
On 11-04-23 02:54 PM, galeb abu-ali wrote: using it do homework is considered abuse Using to do your homework is abuse. Using it to ask about homework isn't. The difference how much effort you put in. Some guidelines: 1. Say it's homework from the start. 2. Include the code you have so

Re: how to parse complex table

2011-04-23 Thread galeb abu-ali
i guess the sensitivity stemmed from reading random snippets from the thread 'the nature of this list' and how using it do homework is considered abuse, so i didn't want to fall in that category. thanks again galeb On Sat, Apr 23, 2011 at 12:51 PM, shawn wilson wrote: > On Sat, Apr 23, 2011 at

Re: how to parse complex table

2011-04-23 Thread shawn wilson
On Sat, Apr 23, 2011 at 11:56 AM, galeb abu-ali wrote: > BTW, it's not homework, It's supporting metadata for my research and I'm > trying to parse it in a format that will be easier to lookup later. > it was a joke. i figured you were either a graduate student, researcher, or hacking around wit

Re: how to parse complex table

2011-04-23 Thread galeb abu-ali
thank you for the advice Shawn, I'll try what you suggest! BTW, it's not homework, It's supporting metadata for my research and I'm trying to parse it in a format that will be easier to lookup later. thanks again galeb On Sat, Apr 23, 2011 at 11:10 AM, shawn wilson wrote: > now, here's a homew

Re: how to parse complex table

2011-04-23 Thread shawn wilson
now, here's a homework question!! :) On Sat, Apr 23, 2011 at 10:27 AM, galeb abu-ali wrote: > Hi, > > I'm trying to parse a table containing information about genes in a > bacterial chromosome. Below is a sample for one gene, and there's about 4500 > such blocks in a file: > > gene_oid    Locus T

how to parse complex table

2011-04-23 Thread galeb abu-ali
Hi, I'm trying to parse a table containing information about genes in a bacterial chromosome. Below is a sample for one gene, and there's about 4500 such blocks in a file: gene_oidLocus TagSourceCluster InformationGene InformationE-value 642745051SeSA_B0001COG_category