Although you CAN use simple greps to get things, I would advise the use of http://www.bioperl.org/wiki/HOWTO:SeqIO It understands the Standard Chromatogram Format (SCF) and can grab exactly what you will ever need.

use Bio::SeqIO; $in = new Bio::SeqIO -file => 'p122.gel', -format=>'SCF'; $seq = $in->next_seq(); # if you want to look at the various comment field data: while ( ($key, $val) = each %{$seq->names()} ) { print "$key\t$val\n"; }

If this is just your Computer Science homework, then you should do proper investigation first (i.e. learn), instead of asking us. For example, the SCF format is:

SCF Done: E(RHF) = -113.873389817 A.U. after 11 cycles /SCF Done.*=\s?([\-\d\.]*\d+)/

Perl uses regular expressions that are very precise, hence, the suggestion it would look like:

SCF Done= -113.873389817. /SCF Done=\s?([\-\d\.]*\d+)/

Would, in the eyes of Perl, make it totally different. Where the first line is the line of the SCF file, and the second a Perl patternmatch that will grab that part. You can see differences...

perl -ne '$V{$1}=$ARGV if /SCF Done.*=\s*([\-\d\.]*\d+)/; END{@_=sort +keys %V;print "Lowest value is $_[0] in file $V{$_[0]}\n"}' *.log

So, the big question is still: We can help, but only if you make an effort, and show us what you have up to this point. Do you have a loop, which variables are you going to use. Will you use a single or a double pass over the files. How do you think that 3th column should be retrieved, etc. Show us some code first.


In reply to Re: Making commond for large number of files by FreeBeerReekingMonk
in thread Making commond for large number of files by acrobat118

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.