while ( $record = Maasha::Biopieces::get_record( $in ) )
{
+ Maasha::Biopieces::put_record( $record, $out );
+
if ( exists $record->{ 'SEQ' } )
{
$gaps = find_gaps( $record->{ 'SEQ' }, $options->{ 'min_len' } );
Maasha::Biopieces::put_record( $gap, $out );
}
}
-
- Maasha::Biopieces::put_record( $record, $out );
}
Maasha::Biopieces::close_stream( $in );
# Returns a list.
- my ( @gaps, $block, $beg, $end );
+ my ( $gap_char, @gaps, $block, $beg, $end );
+
+ $gap_char = 'N';
$seq = uc $seq;
- $block = 'N' x $min;
+ $block = $gap_char x $min;
$beg = 0;
$end = $beg;
- while ( substr( $seq, $end, 1 ) eq 'N' ) {
+ while ( substr( $seq, $end, 1 ) eq $gap_char ) {
$end++;
}