[Bioperl-l] parsing sim4 results
Charles Hauser
chauser at duke.edu
Fri Mar 14 15:02:35 EST 2003
All,
I'm trying to parse output from sim4 w/ script below.
Looking at docs, Bio::Tools::Sim4 has exon & results modules.
I get the error:Can't locate Bio/Tools/Sim4.pm in @INC, which of course
because there is no Sim4.pm.
Suggestions?
Charles
use strict;
use Bio::Tools::Sim4;
my $filename = shift @ARGV;
if( $filename =~ /\.gz/ ) {
open(FH, "zcat $filename |") || die("cannot run zcat on $filename:
$!");
} else {
open(FH, $filename) || die("cannot open $filename: $!");
}
print STDERR "Processing: ",$filename, "\n";
my $sim4 = Bio::Tools::Sim4->new( -fh => \*FH );
while(my $exonset = $sim4->next_exonset()) {
print "Delimited on sequence ", $exonset->seq_id(),
"from ", $exonset->start(), " to ", $exonset->end(), "\n";
foreach my $exon ( $exonset->sub_SeqFeature() ) {
print "Exon from ", $exon->start, " to ", $exon->end,
" on strand ", $exon->strand(), "\n";
my $homol = $exon->est_hit();
print "Matched to sequence ", $homol->seq_id,
" at ", $homol->start," to ", $homol->end, "\n";
}
}
More information about the Bioperl-l
mailing list