[Bio] / FigMetagenomeTools / headfiles.pl Repository:
ViewVC logotype

View of /FigMetagenomeTools/headfiles.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (download) (as text) (annotate) (vendor branch)
Mon Feb 19 17:15:26 2007 UTC (13 years, 1 month ago) by olson
Branch: x, MAIN
CVS Tags: mgrast_dev_08112011, mgrast_dev_08022011, mgrast_dev_05262011, mgrast_dev_04082011, mgrast_version_3_2, mgrast_dev_12152011, mgrast_dev_06072011, mgrast_rel_2008_0806, mgrast_dev_10262011, mgrast_dev_02212011, mgrast_rel_2008_0923, mgrast_release_3_0, mgrast_dev_03252011, mgrast_rel_2008_0924, mgrast_rel_2008_1110_v2, mgrast_rel_2008_0625, mgrast_release_3_0_4, mgrast_release_3_0_2, mgrast_release_3_0_3, mgrast_release_3_0_1, mgrast_dev_03312011, mgrast_release_3_1_2, mgrast_release_3_1_1, mgrast_release_3_1_0, mgrast_dev_04132011, mgrast_dev_04012011, mgrast_rel_2008_0919, mgrast_rel_2008_1110, myrast_33, mgrast_rel_2008_0917, mgrast_dev_04052011, mgrast_dev_02222011, y, HEAD
Changes since 1.1: +0 -0 lines
Initial import

#!/usr/bin/perl -w


# get information from some files


#/home/rob/bin/phredphrap/bin/phrap pedulla.fasta.screen -minmatch 14 -maxmatch 30 -bandwidth 14 -minscore 30 -vector_bound 99 -bypasslevel 1 -maxgap 30 -repeat_stringency 0.95 -new_ace -view

use strict;

my @words=(qw[minmatch maxmatch bandwidth minscore vector_bound bypasslevel maxgap repeat_stringency]);

my %min; my %max;
foreach my $wd (@words) {$min{$wd}=[10000, 'unknown']; $max{$wd}=[0, 'unknown']}

my $pwd=`pwd`; chomp($pwd);
print STDERR "Working on $pwd\n";
opendir(DIR, $pwd) || die "Can't open .";
while (my $f=readdir(DIR)) {
 next unless ($f =~ /.phrap.out/);
 my $h= join " ", `head -n 1 $f`;
 foreach my $wd (@words) {
  $h =~ /$wd\s+(\S+)/;
  my $val=$1;
  next unless ($val);
  unless ($val =~ /^\d+$/ || $val =~ /^\d+\.\d+$/) {print STDERR "$val is not a number\n"; next}
  if ($val < $min{$wd}->[0]) {$min{$wd}=[$val, $f]}
  if ($val > $max{$wd}->[0]) {$max{$wd}=[$val, $f]}
 }
}

foreach my $wd (@words) {
 print join "\t", $wd, @{$min{$wd}}, @{$max{$wd}}, "\n";
}

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3