- $subseq = substr $record->{ "SEQ" }, $i, $options->{ "word_size" };
-
- if ( $options->{ "uniq" } and not $lookup{ $subseq } )
- {
- $new_record->{ "SEQ_NAME" } = $record->{ "SEQ_NAME" } . "[" . ( $i + 1 ) . "-" . ( $i + $options->{ "word_size" } ) . "]";
- $new_record->{ "SEQ" } = $subseq;
- $new_record->{ "SEQ_LEN" } = $options->{ "word_size" };
-
- Maasha::Biopieces::put_record( $new_record, $out );
-
- $lookup{ $subseq } = 1;
- }
- else
- {
- $new_record->{ "SEQ_NAME" } = $record->{ "SEQ_NAME" } . "[" . ( $i + 1 ) . "-" . ( $i + $options->{ "word_size" } ) . "]";
- $new_record->{ "SEQ" } = $subseq;
- $new_record->{ "SEQ_LEN" } = $options->{ "word_size" };
-
- Maasha::Biopieces::put_record( $new_record, $out );
- }
+ $subseq = substr $record->{ "SEQ" }, $i, $options->{ "word_size" };
+ $subqual = substr $record->{ "SCORES" }, $i, $options->{ "word_size" } if $record->{ "SCORES" };
+
+ $new_record->{ "SEQ_NAME" } = $record->{ "SEQ_NAME" } . "[" . ( $i + 1 ) . "-" . ( $i + $options->{ "word_size" } ) . "]";
+ $new_record->{ "SEQ" } = $subseq;
+ $new_record->{ "SCORES" } = $subqual if $record->{ "SCORES" };
+ $new_record->{ "SEQ_LEN" } = $options->{ "word_size" };
+
+ Maasha::Biopieces::put_record( $new_record, $out );