|
Posted by Amy Lee on May 2, 2008, 12:04 pm
Please log in for more thread options
On Fri, 02 May 2008 15:51:34 +0000, Glenn Jackman wrote:
> At 2008-05-02 11:04AM, "Mirco Wahab" wrote:
>> Amy Lee wrote:
>> > while (<$FILE_IN>)
>> > {
>> > unless (/^>.*$/)
>> > {
>> > reverse $_;
>>
>> You need to reverse the order of the reverse
>> operator, before reversing the text:
>>
>> $_ =reverse;
>
> Also, the newline character will be reversed, so that should be removed
> first:
>
> while (<$FILE_IN>) {
> chomp;
> $_ = reverse unless /^>/;
> print "$_\n";
> }
Thank you very much. However, I still have a problem which I can't
understand well. What if my file content is
>seq1
ACGGTC
ACTG
>seq2
CGATCC
ACCTC
In fact, the sequence is
>seq1
ACGGTCACTG
>seq2
CGATCCACCTC
So if I use the above codes to do that, I can't acquire the correct
sequences. I hope I can process the file that I mention.
Thank you very much~
Amy Lee
|