<html><head><style type="text/css">body{font:12px Arial;margin:3px;overflow-y:auto;overflow-x:auto}p{margin:0px;}blockquote, ol, ul{margin-top:0px;margin-bottom:0px;}</style></head>
<body><div style="display: block; font-family: Arial; font-size: 12px;">Hi, as I told to this list some time ago, I want to ouput heterozygous dna sequences of different individuals.<br>We need to output variations in the following manner:<br>[a/g] if there is a loci where one allele has an "a" and the other has a "g". (Also known as BIC db format or something like this)<br>My approach is to use the Bio::LiveSeq::Mutation (class ?) to change the specific position in the sequence.<br><br><br>Bio::SeqUtils->mutate($seqobj, Bio::LiveSeq::Mutation->new(<br>
-seq => "[a/g]",<br>
-seqori => $seqori,<br>
-pos => $pos,<br>
-len => $length));<br><br>But unfortunatly this would rise an exception, that some unexpected chars occur. Hence I went in to the code of Root.pm and made a small change: commenting out line 359 in Root.pm :<br><br>if( $ERRORLOADED ) {<br># print STDERR " Calling Error::throw\n\n";<br><br> # Enable re-throwing of Error objects.<br> # If the error is not derived from Bio::Root::Exception,<br> # we can't guarantee that the Error's value was set properly<br> # and, ipso facto, that it will be catchable from an eval{}.<br> # But chances are, if you're re-throwing non-Bio::Root::Exceptions,<br> # you're probably using Error::try(), not eval{}.<br> # TODO: Fix the MSG: line of the re
-thrown error. Has an extra line<br> # containing the '----- EXCEPTION -----' banner.<br> if( ref($args[0])) {<br> if( $args[0]->isa('Error')) {<br> my $class = ref $args[0];<br> $class->throw( @args );<br> } else {<br> my $text .= "\nWARNING: Attempt to throw a non-Error.pm object: " . ref$args[0];<br> my $class = "Bio::Root::Exception";<br> $class->throw( '-text'
=> $text, '-value' => $args[0] );<br> }<br> } else {<br> $class ||= "Bio::Root::Exception";<br><br> my %args;<br> if( @args % 2 == 0 && $args[0] =~ /^-/ ) {<br> %args = @args;<br> $args{-text} = $text;<br> $args{-object} = $self;<br> }<br><br>(Line 359:) #$class->throw( scalar keys %args > 0 ? %args : @args ); # (%args || @args) puts %args in scalar context!<br> &nbs
p; }<br> }<br><br><br>After I did alter this line all is working fine. But I know that this can be considered in the best case as a work around.<br><br>2 Questions:<br><br>Do you think it is worth to provide some class which are natively able to cope with that matter ?<br>Do I need to expect some unwanted behavior of some scripts resp. classes ?<br><br>Regards,<br>Marian<br><br><br><br><br><br><br></br><p style="margin-top:11px;padding-top:3px;background-image: url(http://mail.lycos.co.uk/Images/Mail/_content/dot.gif);background-repeat: repeat-x;background-position: 0px 0px;"><br>
_________________________________
<br>
<font face="Verdana" size="1" color="#000000"> Stelle Deine Fragen bei Lycos iQ <a href=" http://iq.lycos.de/qa/ask/">http://iq.lycos.de/qa/ask/</a></div></body></html>