From 097fec274cd08ef7f8cdaeca19163a638ae00a11 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Wed, 13 Oct 2010 09:27:48 +0000 Subject: [PATCH] changed bowtie_seq to use phred64 git-svn-id: http://biopieces.googlecode.com/svn/trunk@1126 74ccb610-7750-0410-82ae-013aeee3265d --- bp_bin/bowtie_seq | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bp_bin/bowtie_seq b/bp_bin/bowtie_seq index 8ccd201..cd0aeb2 100755 --- a/bp_bin/bowtie_seq +++ b/bp_bin/bowtie_seq @@ -96,6 +96,7 @@ push @args, "-n $options->{ 'mismatches' }"; push @args, "-v $options->{ 'mismatches' }"; # DANGER: using seed mismatches as alignment mismatches - may work, may not! push @args, "-f" if $type eq "FASTA"; push @args, "-p $options->{ 'cpus' }"; +push @args, "--phred64-quals"; if ( defined $options->{ 'max_hits' } ) { push @args, "-k $options->{ 'max_hits' }"; @@ -164,8 +165,7 @@ sub bowtie2biopiece $record->{ 'S_LEN' } = length $entry->[ 4 ]; $record->{ 'SEQ_LEN' } = length $entry->[ 4 ]; $record->{ 'S_END' } = $record->{ 'S_BEG' } + $record->{ 'SEQ_LEN' } - 1; - $record->{ 'SCORES' } =~ s/(.)/ord( $1 ) - 33 . ";"/ge; # http://maq.sourceforge.net/fastq.shtml - $record->{ 'SCORE_MEAN' } = sprintf( "%.2f", Maasha::Calc::mean( [ split /;/, $record->{ 'SCORES' } ] ) ); + $record->{ 'SCORES' } =~ s/(.)/chr( ( ord( $1 ) - 33 ) + 64 )/ge; # convert phred scores to illumina scores $record->{ 'HITS' } = '.'; $record->{ 'REC_TYPE' } = "BOWTIE"; -- 2.39.2