]> git.donarmstrong.com Git - biopieces.git/blobdiff - code_perl/Maasha/SAM.pm
added missing files
[biopieces.git] / code_perl / Maasha / SAM.pm
index 197a957619021f11718b923e4940e2dab4bdf657..ff8cb66e61dc8682db2aea75bec1b84fe2bbbdf7 100644 (file)
@@ -118,6 +118,7 @@ sub sam2biopiece
     $record->{ 'ISIZE' }    = $entry->[ ISIZE ];
     $record->{ 'SEQ' }      = $entry->[ SEQ ];
     $record->{ 'SCORES' }   = $entry->[ QUAL ];
+    $record->{ 'SCORES' }   =~ s/(.)/chr( ( ord( $1 ) - 33 ) + 64 )/ge; # convert phred-33 to phred-64 scores
     $record->{ 'SCORE' }    = sprintf( "%.2f", Maasha::Fastq::phred_str_mean( $entry->[ QUAL ] ) );
 
     $record->{ 'S_BEG' } -= 1 if $record->{ 'S_BEG' }  != 0;