[Bioperl-l] parsing sim4 results

Jason Stajich jason at cgt.mc.duke.edu
Fri Mar 14 15:22:06 EST 2003


Docs are wrong, you want this:

   # to preset the order of EST and genomic file as given on the sim4
   # command line:
   my $sim4 = Bio::Tools::Sim4::Results->new(-file => 'result.sim4',
                                             -estfirst => 1);

On Fri, 14 Mar 2003, Charles Hauser wrote:

> 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";
>     }
> }
>
>
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
>

--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu


More information about the Bioperl-l mailing list