len|l=s
flank|f=s
mask|m
+ splice|s
);
}
elsif ( $script eq "get_genome_align" )
# Returns nothing.
- my ( $record, $genome, $genome_file, $index_file, $index, $fh, $index_head, $index_beg, $index_len, $beg, $len, %lookup_hash, @begs, @lens, $i );
+ my ( $record, $genome, $genome_file, $index_file, $index, $fh, $index_head, $index_beg, $index_len, $beg, $len, %lookup_hash, @begs, @lens, $i, $seq );
$options->{ "flank" } ||= 0;
if ( $options->{ "mask" } )
{
- if ( $record->{ "BLOCKCOUNT" } > 1 ) # uppercase hit block segments and lowercase the rest.
+ if ( $record->{ "BLOCK_COUNT" } > 1 ) # uppercase hit block segments and lowercase the rest.
{
$record->{ "SEQ" } = lc $record->{ "SEQ" };
@begs = split ",", $record->{ "Q_BEGS" };
- @lens = split ",", $record->{ "BLOCKSIZES" };
+ @lens = split ",", $record->{ "BLOCK_LENS" };
for ( $i = 0; $i < @begs; $i++ ) {
substr $record->{ "SEQ" }, $begs[ $i ], $lens[ $i ], uc substr $record->{ "SEQ" }, $begs[ $i ], $lens[ $i ];
}
}
}
+ elsif ( $options->{ "splice" } )
+ {
+ if ( $record->{ "BLOCK_COUNT" } > 1 ) # splice block sequences
+ {
+ $seq = "";
+ @begs = split ",", $record->{ "Q_BEGS" };
+ @lens = split ",", $record->{ "BLOCK_LENS" };
+
+ for ( $i = 0; $i < @begs; $i++ ) {
+ $seq .= substr $record->{ "SEQ" }, $begs[ $i ], $lens[ $i ];
+ }
+ }
+ }
}
put_record( $record, $out );