40
41
Bioperl modules. Send your comments and suggestions preferably to one
41
42
of the Bioperl mailing lists. Your participation is much appreciated.
43
bioperl-l@bioperl.org - General discussion
44
http://bio.perl.org/MailList.html - About the mailing lists
44
bioperl-l@bioperl.org - General discussion
45
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
46
47
=head2 Reporting Bugs
48
49
Report bugs to the Bioperl bug tracking system to help us keep track
49
the bugs and their resolution. Bug reports can be submitted via email
52
bioperl-bugs@bio.perl.org
53
http://bugzilla.bioperl.org/
55
=head1 AUTHOR - Fugu Team
50
the bugs and their resolution. Bug reports can be submitted via the
53
http://bugzilla.open-bio.org/
55
=head1 AUTHOR - Fugu Team, Jason Stajich
57
57
Email: fugui@worf.fugu-sg.org
58
Email: jason-at-bioperl.org
61
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
62
The rest of the documentation details each of the object
63
methods. Internal methods are usually preceded with a _
210
215
sub _parse_genes {
214
my ($score,$prot_id,$target_id);
216
while ( defined($_ = $self->_readline) ) {
217
$self->debug( $_ ) if( $self->verbose > 0);
218
($score) = $_=~ m/Score\s+(\d+[\.][\d]+)/o;
219
$self->_score($score) unless defined $self->_score;
220
($prot_id) = $_=~ m/Query (?:protein|model):\s+(\S+)/o;
221
$self->_prot_id($prot_id) unless defined $self->_prot_id;
222
($target_id) = $_=~ m/Target Sequence\s+(\S+)/o;
223
$self->_target_id($target_id) unless defined $self->_target_id;
224
next unless /Gene\s+\d+\n/o;
226
my @genes_txt = split(/Gene\s+\d+\n/);
227
shift @genes_txt; #remove first empty entry
220
while ( defined($_ = $self->_readline) ) {
221
$self->debug( $_ ) if( $self->verbose > 0);
222
if( /Score\s+(\-?\d+(\.\d+)?)/ ) {
223
$self->_score($1);# unless defined $self->_score;
225
if( /Query\s+(?:protein|model)\:\s+(\S+)/ ) {
226
$self->_prot_id($1); #unless defined $self->_prot_id;
229
if( /Target Sequence\s+(\S+)/ ) {
230
$self->_target_id($1);# unless defined $self->_target_id;
232
next unless /Gene\s+\d+\n/;
234
my @genes_txt = split(/Gene\s+\d+\n/,$_);
235
shift @genes_txt; #remove first empty entry
229
foreach my $gene_txt (@genes_txt) {
237
foreach my $gene_txt (@genes_txt) {
230
238
# If genewise has assigned a strand to the gene as a whole
231
239
# overall gene start and end
232
my ($g_start, $g_end,
233
$type) = $gene_txt =~ m/Gene\s+
234
(\d+)\s+ # start (1-based)
240
my ($g_start, $g_end, $type) =
241
$gene_txt =~ m/Gene\s+
242
(\d+)[\s-]+ # start (1-based)
239
247
my $source_tag = $type ? "$Srctag". "_$type" : $Srctag;
240
248
my $genes = new Bio::SeqFeature::Gene::GeneStructure
241
(-source => $source_tag);
249
(-source => $source_tag);
242
250
my $transcript = new Bio::SeqFeature::Gene::Transcript
243
(-source => $source_tag,
251
(-source => $source_tag,
244
252
-score => $self->_score);
245
253
($g_start, $g_end, $g_strand) = $self->_get_strand($g_start,$g_end);
246
254
$genes->strand($g_strand);
248
#grab exon + supporting feature info
256
# grab exon + supporting feature info
250
258
unless ( @exons = $gene_txt =~ m/(Exon .+\s+Supporting .+)/g ) {
251
@exons = $gene_txt =~ m/(Exon .+\s+)/g;
259
@exons = $gene_txt =~ m/(Exon .+\s+)/g;
254
#loop through each exon-supporting feature pair
262
# loop through each exon-supporting feature pair
255
263
foreach my $e (@exons){
257
$phase) = $e =~ m/Exon\s+
258
(\d+)\s+ # start (1 based)
260
phase\s+(\d+) # phase
264
my ($e_start,$e_end,$phase) =
266
(\d+)[\s-]+ # start (1 based)
268
phase\s+(\d+) # phase
263
271
($e_start,$e_end,$e_strand) = $self->_get_strand($e_start,
278
286
$exon->add_tag_value('Target',"Protein:".$self->_prot_id);
280
288
$exon->add_tag_value("Exon",$nbr++);
281
if( $e =~ m/Supporting\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/o) {
289
if( $e =~ m/Supporting\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/) {
282
290
my ($geno_start,$geno_end,
283
291
$prot_start, $prot_end) = ($1,$2,$3,$4);