sub new
{ my($class,@args) = @_;
my $self = $class->SUPER::new(@args);
$self->_initialize_io(@args);
return $self; } |
sub next_result
{ my ($self) = @_;
while ($_=$self->_readline()) {
if (/no repetitive sequences detected/) {
print STDERR "RepeatMasker didn't find any repetitive sequences\n";
return ;
}
if (/\d+/) { my @element = split;
next if ($element[11-13] =~ /-/);
my (%feat1, %feat2);
my ($score, $query_name, $query_start, $query_end, $strand,
$repeat_name, $repeat_class ) = (split)[0, 4, 5, 6, 8, 9, 10];
my ($hit_start,$hit_end);
if ($strand eq '+') {
($hit_start, $hit_end) = (split)[11, 12];
$strand = 1;
}
elsif ($strand eq 'C') {
($hit_start, $hit_end) = (split)[12, 13];
$strand = -1;
}
my $rf = Bio::SeqFeature::Generic->new;
$rf->seq_id ($query_name);
$rf->score ($score);
$rf->start ($query_start);
$rf->end ($query_end);
$rf->strand ($strand);
$rf->source_tag ("RepeatMasker");
$rf->primary_tag ($repeat_class);
my $rf2 = Bio::SeqFeature::Generic->new;
$rf2->seq_id ($repeat_name);
$rf2->score ($score);
$rf2->start ($hit_start);
$rf2->end ($hit_end);
$rf2->strand ($strand);
$rf2->source_tag ("RepeatMasker");
$rf->primary_tag ($repeat_class);
my $fp = Bio::SeqFeature::FeaturePair->new(-feature1=>$rf,
-feature2=>$rf2);
return $fp;
}
}
}
1; } |
User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to
the Bioperl mailing list. Your participation is much appreciated.
bioperl-l@bioperl.org - General discussion
http://bioperl.org/MailList.shtml - About the mailing lists
Report bugs to the Bioperl bug tracking system to help us keep track
of the bugs and their resolution. Bug reports can be submitted via
email or the web:
bioperl-bugs@bioperl.org
http://bugzilla.bioperl.org/
The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _