From 64c246ca3a549d00f67d2fdbf6e1f8610e1709f1 Mon Sep 17 00:00:00 2001 From: martinahansen Date: Wed, 21 Oct 2009 06:04:03 +0000 Subject: [PATCH] fixed dna/DNA bug in Align.pm git-svn-id: http://biopieces.googlecode.com/svn/trunk@699 74ccb610-7750-0410-82ae-013aeee3265d --- bp_bin/bowtie_seq | 1 + code_perl/Maasha/Align.pm | 4 ++-- code_perl/Maasha/XHTML.pm | 17 ++++++++++++++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/bp_bin/bowtie_seq b/bp_bin/bowtie_seq index dc8b09e..6c1659b 100755 --- a/bp_bin/bowtie_seq +++ b/bp_bin/bowtie_seq @@ -160,6 +160,7 @@ sub bowtie2biopiece $record->{ 'SCORES' } = $entry->[ 5 ]; $record->{ 'SCORE' } = $entry->[ 6 ] + 1; $record->{ 'DESCRIPTOR' } = $entry->[ 7 ]; + $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 diff --git a/code_perl/Maasha/Align.pm b/code_perl/Maasha/Align.pm index 55b4c2f..622846d 100644 --- a/code_perl/Maasha/Align.pm +++ b/code_perl/Maasha/Align.pm @@ -480,9 +480,9 @@ sub align_tile $type = Maasha::Seq::seq_guess_type( $seq1 ); - if ( $type eq "rna" ) { + if ( $type =~ /rna/i ) { $seq2 = Maasha::Seq::rna_revcomp( $seq1 ); - } elsif ( $type eq "dna" ) { + } elsif ( $type =~ /dna/i ) { $seq2 = Maasha::Seq::dna_revcomp( $seq1 ); } else { Maasha::Common::error( qq(Bad sequence type->$type) ); diff --git a/code_perl/Maasha/XHTML.pm b/code_perl/Maasha/XHTML.pm index 4aeba31..44a72ba 100755 --- a/code_perl/Maasha/XHTML.pm +++ b/code_perl/Maasha/XHTML.pm @@ -622,7 +622,7 @@ sub mailto } -# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> IMG <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< +# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> IMG & OBJECT <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< sub img @@ -640,6 +640,21 @@ sub img } +sub object +{ + # Martin A. Hansen, October 2009. + + # HTML element + + my ( %args, + ) = @_; + + # Returns string + + return &tag_single( "object", \%args ); +} + + # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> DIV & SPAN <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -- 2.39.5