map { Maasha::Biopieces::put_record( $_, $out ) } @{ $results };
}
-elsif ( @entries == 2 )
+else
{
- $results = Maasha::Match::match_mummer( [ $entries[ 0 ] ], [ $entries[ 1 ] ], $options, $tmp_dir );
+ $results = Maasha::Match::match_mummer( [ shift @entries ], \@entries, $options, $tmp_dir );
map { Maasha::Biopieces::put_record( $_, $out ) } @{ $results };
}
{
# Martin A. Hansen, January 2007.
- # Writes FASTA entries to STDOUT or file.
+ # Writes a FASTA entry to a file handle.
my ( $entry, # a FASTA entries
$fh, # file handle to output file - OPTIONAL
}
+sub put_entries
+{
+ # Martin A. Hansen, September 2009
+
+ # Write FASTA entries to a file.
+
+ my ( $entries, # list of FASTA entries
+ $file, # output file
+ $wrap, # line width - OPTIONAL
+ ) = @_;
+
+ # Returns nothing
+
+ my ( $fh );
+
+ $fh = Maasha::Filesys::file_write_open( $file );
+
+ map { put_entry( $_, $fh, $wrap ) } @{ $entries };
+
+ close $fh;
+}
+
+
sub wrap
{
# Martin A. Hansen, June 2007
push @results, dclone $result;
}
-
}
unlink $file_in1;
for ( $i = 1; $i < scalar @{ $data->[ 0 ] } + 1; $i++ )
{
- $title = $options->{ 'keys' }->[ $i - 1 ] || $options->{ 'list' };
- push @plot_cmd, qq("$tmp_file" using $i with lines title "$title");
+ if ( ( $i % 5 ) == 0 )
+ {
+ $title = $options->{ 'keys' }->[ $i - 1 ] || $options->{ 'list' };
+ push @plot_cmd, qq("$tmp_file" using $i with lines title "$title");
+ }
}
print $fh_in "plot " . join( ", ", @plot_cmd ) . "\n";