use Data::Dumper;
use Maasha::Common;
use Maasha::Filesys;
+use Maasha::Align;
use Maasha::SQL;
use vars qw( @ISA @EXPORT );
}
}
- print Dumper( "s_seq: $s_seq", "q_seq: $q_seq" ) and exit;
-}
-
-
-sub sam2kiss
-{
- my ( $sam_entry, # SAM entry
- ) = @_;
-
- # Returns a hashref
-
- my ( $cigar, $offset, $op, $len, @descriptors, $kiss_entry );
-
- $cigar = $sam_entry->{ 'CIGAR' };
-
- $cigar =~ tr/\*//d;
-
- $offset = 0;
-
- while ( length $cigar > 0 )
- {
- if ( $cigar =~ s/^([MINDSHP])(\d+)// )
- {
- $op = $1;
- $len = $2;
-
- print "CIGAR: $cigar OP: $op LEN: $len\n";
-
- if ( $op eq 'I' )
- {
-
- }
- elsif ( $op eq 'D' )
- {
-
- }
-
- $offset += $len;
- }
- else
- {
- Maasha::Common::error( qq(Bad CIGAR format: "$cigar") );
- }
- }
-
- return wantarray ? %{ $kiss_entry } : $kiss_entry;
+ Maasha::Align::align_print_pairwise( [ $entry->{ 'S_ID' }, $s_seq ], [ $entry->{ 'Q_ID' }, $q_seq ] );
}