[Bioperl-guts-l]
bioperl-live/scripts/searchio fastam9_to_table.PLS, 1.5, 1.6
Jason Stajich
jason at pub.open-bio.org
Mon Apr 25 15:24:24 EDT 2005
Update of /home/repository/bioperl/bioperl-live/scripts/searchio
In directory pub.open-bio.org:/tmp/cvs-serv29148
Modified Files:
fastam9_to_table.PLS
Log Message:
deal with TFASTX [f] or [r] fields, properly report querylen as well for these
Index: fastam9_to_table.PLS
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/scripts/searchio/fastam9_to_table.PLS,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fastam9_to_table.PLS 4 Mar 2005 15:56:41 -0000 1.5
--- fastam9_to_table.PLS 25 Apr 2005 19:24:22 -0000 1.6
***************
*** 1,4 ****
! #!perl -w
! use strict;
=head1 NAME
--- 1,3 ----
! #!/usr/bin/perl -w
=head1 NAME
***************
*** 24,49 ****
with the standard NCBI -m9 columns.
! queryname
! hit name
! percent identity
! alignment length
! number mismatches
! number gaps
! query start (if on rev-strand start > end)
! query end
! hit start (if on rev-strand start > end)
! hit end
! evalue
! bit score
Additionally 3 more columns are provided
!
! fasta score
! sw-score
! percent similar
! query length
! hit length
! query gaps
! hit gaps
=head1 AUTHOR - Jason Stajich
--- 23,47 ----
with the standard NCBI -m9 columns.
! queryname
! hit name
! percent identity
! alignment length
! number mismatches
! number gaps
! query start (if on rev-strand start > end)
! query end
! hit start (if on rev-strand start > end)
! hit end
! evalue
! bit score
Additionally 3 more columns are provided
! fasta score
! sw-score
! percent similar
! query length
! hit length
! query gaps
! hit gaps
=head1 AUTHOR - Jason Stajich
***************
*** 53,57 ****
=cut
!
use Getopt::Long;
my $hitsection = 0;
--- 51,55 ----
=cut
! use strict;
use Getopt::Long;
my $hitsection = 0;
***************
*** 80,84 ****
my @fields = qw(qname hname percid alen mmcount gapcount
! qstart qend hstart hend evalue score bits score sw-score
percsim qlen hlen qgap hgap);
print $outfh "#",uc(join("", map{ sprintf("%-10s",$_) } @fields)), "\n" if $header;
--- 78,82 ----
my @fields = qw(qname hname percid alen mmcount gapcount
! qstart qend hstart hend evalue score bits fs sw-score
percsim qlen hlen qgap hgap);
print $outfh "#",uc(join("", map{ sprintf("%-10s",$_) } @fields)), "\n" if $header;
***************
*** 88,92 ****
if( /^\s*\d+>>>(\S+).+/ ) {
$data{'qname'} = $1;
! if( /\-\s+(\d+)\s+aa\s+$/ ){
$data{'qlen'} = $1;
}
--- 86,90 ----
if( /^\s*\d+>>>(\S+).+/ ) {
$data{'qname'} = $1;
! if( /\-\s+(\d+)\s+(aa|nt)\s+$/ ){
$data{'qlen'} = $1;
}
***************
*** 99,102 ****
--- 97,101 ----
if( s/^(\S+)\s+(.+)\(\s*(\d+)\)\s+// ) {
my ($hit, $desc,$hitlen) = ($1,$2,$3);
+ my ($dir) = ( s/^\[(r|f)\]\s+// );
my @line = split(/\s+/,$_);
$data{'hname'} = $hit;
***************
*** 112,121 ****
$data{'qstart'} = shift @line;
$data{'qend'} = shift @line;
! my $pn0 = shift @line; # pn0
! $data{'qlen'} = shift @line; # px0
$data{'hstart'} = shift @line; # an1
$data{'hend'} = shift @line; # ax1
! my $pn1 = shift @line; # pn1
! $data{'qlen'} = shift @line; # px1
# query + hit gaps
$data{'qgap'} = shift @line;
--- 111,120 ----
$data{'qstart'} = shift @line;
$data{'qend'} = shift @line;
! $data{'pn0'} = shift @line; # pn0
! $data{'px0'} = shift @line; # px0
$data{'hstart'} = shift @line; # an1
$data{'hend'} = shift @line; # ax1
! $data{'pn1'} = shift @line; # pn1
! $data{'px1'} = shift @line; # px1
# query + hit gaps
$data{'qgap'} = shift @line;
More information about the Bioperl-guts-l
mailing list