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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |