-
Notifications
You must be signed in to change notification settings - Fork 3
/
bl2seq.pl
100 lines (78 loc) · 2.89 KB
/
bl2seq.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Code base of Animesh Sharma [ [email protected] ]
#!/usr/bin/perl
# bl2seq.pl krishna_bhakt@BHAKTI-YOGA 2006/09/05 06:14:58
use warnings;
use strict;
use Bio::Tools::BPbl2seq;
use Bio::Root::IO;
my $report = new Bio::Tools::BPbl2seq(-file => "filer", -report_type => 'blastn');
while( my $hsp = $report->next_feature ) {
#while( my $hit = $report->next_feature ) {
# print "\thit name: ", $hit->name(),"\n";
# while( my $hsp = $hit->next_hsp()) {
#print "E: ", $hsp->evalue(), " frac_identical: ", $hsp->frac_identical(), "\n"; # }}
my $strand=$hsp->strand;
#foreach (keys %stran){print "$_=>stran{$_}";}
if($hsp->score>0){
print join("\t",
"Score", $hsp->score,
"Bits", $hsp->bits,
"Percent", int $hsp->percent,
"P-Value", $hsp->P,
"Match", $hsp->match,
"Positive", $hsp->positive,
"Start", $hsp->start,
"End", $hsp->end,
"Length", $hsp->length,
"QuerySeq", $hsp->querySeq,
"SubSeq", $hsp->sbjctSeq,
"Homology", $hsp->homologySeq,
"Query start" , $hsp->query->start,
"Query end",$hsp->query->end,
"Query Strand", $hsp->query->strand,
"Query ID", $hsp->query->seq_id,
"Hit start", $hsp->hit->start,
"Hit end", $hsp->hit->end,
"Hit Strand", $hsp->hit->strand,
"Hit ID", $hsp->hit->seq_id,
"Sub start", $hsp->sbjct->start,
"Sub end", $hsp->sbjct->end,
"Sub Strand", $hsp->sbjct->strand,
"Sub ID", $hsp->sbjct->seq_id,
"Direction", $hsp->strand,
"Gaps", $hsp->gaps,
"SubjectName", $report->sbjctName,
"Dir", $hsp->hit->strand), "\n";
}}
__END__
=head1 NAME
bl2seq.pl
=head1 SYNOPSIS
=head1 DESCRIPTION
Stub documentation for bl2seq.pl,
created by template.el.
It looks like the author of this script was negligent
enough to leave the stub unedited.
=head1 AUTHOR
, E<lt>krishna_bhakt@BHAKTI-YOGAE<gt>
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2006 by
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.2 or,
at your option, any later version of Perl 5 you may have available.
=head1 BUGS
None reported... yet.
=cut