$record->{ 'STRAND' } = 'X';
}
$record->{ 'STRAND' } = 'X';
}
- if ( $record->{ 'S_BEG' } and $record->{ 'S_END' } )
+ if ( defined $record->{ 'S_BEG' } and defined $record->{ 'S_END' } )
{
for ( $i = $record->{ 'S_BEG' }; $i <= $record->{ 'S_END' }; $i++ ) {
$contig_hash->{ $record->{ 'S_ID' } }->{ $record->{ 'Q_ID' } }->{ $record->{ 'STRAND' } }->[ $i ]++;
}
}
{
for ( $i = $record->{ 'S_BEG' }; $i <= $record->{ 'S_END' }; $i++ ) {
$contig_hash->{ $record->{ 'S_ID' } }->{ $record->{ 'Q_ID' } }->{ $record->{ 'STRAND' } }->[ $i ]++;
}
}
- if ( $record->{ 'S_BEG1' } and $record->{ 'S_END1' } and $record->{ 'S_BEG2' } and $record->{ 'S_END2' } )
+ if ( defined $record->{ 'S_BEG1' } and defined $record->{ 'S_END1' } and
+ defined $record->{ 'S_BEG2' } and defined $record->{ 'S_END2' } )
{
if ( $options->{ 'bridge' } )
{
{
if ( $options->{ 'bridge' } )
{
Sam.open(tmp_sam, 'r') do |io_sam|
io_sam.each do |entry|
Sam.open(tmp_sam, 'r') do |io_sam|
io_sam.each do |entry|
- output.puts Sam.to_bp(entry)
+ output.puts Sam.to_bp(entry) unless entry[:RNAME] == '*'