-my ( $options, $in, $out, $record, $tmp_dir, $tmp_file, $fh_out, $fh_in, $entry, $chunk, @lines, $line, $s_id, $type, $s_beg, $s_end, $strand, @fields, $def );
-
-$options = Maasha::Biopieces::parse_options();
-
-$in = Maasha::Biopieces::read_stream( $options->{ "stream_in" } );
-$out = Maasha::Biopieces::write_stream( $options->{ "stream_out" } );
-
-$tmp_dir = Maasha::Biopieces::get_tmpdir();
-$tmp_file = "$tmp_dir/tmp.seq";
-$fh_out = Maasha::Filesys::file_write_open( $tmp_file );
-
-while ( $record = Maasha::Biopieces::get_record( $in ) )
-{
- if ( $entry = Maasha::Fasta::biopiece2fasta( $record ) ) {
- Maasha::Fasta::put_entry( $entry, $fh_out );
- }
-
- Maasha::Biopieces::put_record( $record, $out );
-}
-
-if ( $options->{ 'verbise' } ) {
- Maasha::Common::run( "prodigal", "< $tmp_file > $tmp_file.out" );
-} else {
- Maasha::Common::run( "prodigal", "< $tmp_file > $tmp_file.out 2> /dev/null" );
-}
-
-$fh_in = Maasha::Filesys::file_read_open( "$tmp_file.out" );
-
-$/ = "//\n";
-
-while ( $chunk = <$fh_in> )
-{
- chomp $chunk;
-
- @lines = split /\n/, $chunk;