$out = Maasha::Biopieces::write_stream( $options->{ "stream_out" } );
if ( defined $options->{ 'genome' } ) {
- $index = "$ENV{ 'BP_DATA' }/genomes/$options->{ 'genome' }/bowtie/$options->{ 'genome' }";
+ $index = "$ENV{ 'BP_DATA' }/genomes/$options->{ 'genome' }/bwa/$options->{ 'genome' }";
} elsif (defined $options->{ 'index_name' } ) {
$index = $options->{ 'index_name' };
}
while ( $record = Maasha::Biopieces::get_record( $in ) )
{
- if ( $entry = Maasha::Fastq::biopiece2fastq( $record ) ) {
+ if ( $entry = Maasha::Fastq::biopiece2fastq( $record ) )
+ {
+ $entry->[ 2 ] =~ s/(.)/chr( ( ord( $1 ) - 64 ) + 33 )/ge; # convert scores from phred-64 to phred-33
Maasha::Fastq::put_entry( $entry, $fh_out );
}
$fh_in = Maasha::Filesys::file_read_open( $tmp_sam );
-while ( $entry = Maasha::SAM::get_entry( $fh_in ) )
+while ( $entry = Maasha::SAM::sam_entry_get( $fh_in ) )
{
if ( $record = Maasha::SAM::sam2biopiece( $entry ) ) {
Maasha::Biopieces::put_record( $record, $out );