how can i get rid of these new line characters?

--0-1742231517-1033743619=:31985
Content-Type: text/plain; charset=us-ascii


i have just started writing some scripts in PERL and i am trying to catch a deadline, i really wish i could get some help for this problem. any suggestion is greatly appreciated.

i have a set of files with sequences aligned in the following format. i wonder how i can eliminate the new line characters within each sequence without touching those between sequences? 

......

2 chr1 10761 10775 chr19 46520370 46520384 + 941
acaGGAAAAGAACAA
acaggaaaagaaggg

3 chr1 10776 11241 chrUn 45411478 45411944 - 12857
AAGAAGGAAGAAGAGGGTAGAGGAGAAGTGCAGCAAGGGTGGAGGGAGGTGCCCGCGCTGGGTCGGAGGAGCAGGAGTAT
GGAGGGAAGACTCCTGGGTGGCATGGAGCTCTTGCACCTCTAGGCACTGCCCAGCCCTGTGTCAGCCAGGGCTGAACCCCCACAGGATAAGGAACCTGTGTGTGTGACCAACAATCAAAG
CTACATCTGTGACACAACAGGACACTGCTATGGGCAGTCTCAGTTCTGGCTCGCGTGGACCATCACCATCA
TCCTGAGCTGCTGCTGTGTCTGCCACCACAGCCAAGCCAGCCCTCAAGTCCAGCAGTAGCAACATGAAATCAA
CCTGCCTGCCTATCCAGAAGCCCGCAATTACTCAGTGCTACCATTTTATTTCACCAAACTATTTATTACCTT
CTTATGAGGAAGTGGTGAAC
AAGAAGGAAGCAGAGGGAAGAAGAAATGAAGGAGGAGGGTGATAGTGCCATGGTGGAGAAACAGGAGGAG
CAGGGGCAGGGGCACTCTACACTGGACACTGTAGTGGACAGTCTCAGTGCTCCAGCTCTGAA
TTCTGGTATAAGTCCTTGCCTAGGGAGTTATTGGCATCCCAGGGTCTCAGTTACTGCCTCTGCTCCACAGGCAGAGG
AAAGCATGGGGTGTCCAGCCTTTTCTCACTCTTAGGGACAATGTTGACTTCTGACTGATGTGGACCATCATCATCT
TCCGGAGCTGCTGCTGTGTCTGCCACCAATGCTGAGCCCAGGCACTGCCTTCAGACCCAGCAATGACAGCATGAAATCAA
ATTGATGGCCTACCAGGAAGCCCACAATTACTCATCACTGCCATTTTAGTTCAGGTTTTTGCCAAACTATTTATTACCTC
CTTATGAGGAAGTGATGAAC

4 11242 11268 25467376 25467402 - 294
TAACCTCCACCTGTTTCCCTCCCTGTC
ATCTTCCAATCCCTTCCCCACCCTACC


 



---------------------------------
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
--0-1742231517-1033743619=:31985--
0
swang130
10/4/2002 3:00:19 PM
perl.beginners 29362 articles. 3 followers. Follow

8 Replies
433 Views

Similar Articles

[PageSpeed] 52

Hmmm. One way of doing it could be to read each sequence in the file, 
reading the header and the actual sequence in different variables. And then, 
format the sequence variable to remove all newlines using a regular 
expression. And then write them back to another file.

Hope this helps.

Prachi.


----Original Message Follows----
From: s wang <swang130@yahoo.com>
To: beginners@perl.org
Subject: how can i get rid of these new line characters?
Date: Fri, 4 Oct 2002 08:00:19 -0700 (PDT)


i have just started writing some scripts in PERL and i am trying to catch a 
deadline, i really wish i could get some help for this problem. any 
suggestion is greatly appreciated.

i have a set of files with sequences aligned in the following format. i 
wonder how i can eliminate the new line characters within each sequence 
without touching those between sequences?

.......

2 chr1 10761 10775 chr19 46520370 46520384 + 941
acaGGAAAAGAACAA
acaggaaaagaaggg

3 chr1 10776 11241 chrUn 45411478 45411944 - 12857
AAGAAGGAAGAAGAGGGTAGAGGAGAAGTGCAGCAAGGGTGGAGGGAGGTGCCCGCGCTGGGTCGGAGGAGCAGGAGTAT
GGAGGGAAGACTCCTGGGTGGCATGGAGCTCTTGCACCTCTAGGCACTGCCCAGCCCTGTGTCAGCCAGGGCTGAACCCCCACAGGATAAGGAACCTGTGTGTGTGACCAACAATCAAAG
CTACATCTGTGACACAACAGGACACTGCTATGGGCAGTCTCAGTTCTGGCTCGCGTGGACCATCACCATCA
TCCTGAGCTGCTGCTGTGTCTGCCACCACAGCCAAGCCAGCCCTCAAGTCCAGCAGTAGCAACATGAAATCAA
CCTGCCTGCCTATCCAGAAGCCCGCAATTACTCAGTGCTACCATTTTATTTCACCAAACTATTTATTACCTT
CTTATGAGGAAGTGGTGAAC
AAGAAGGAAGCAGAGGGAAGAAGAAATGAAGGAGGAGGGTGATAGTGCCATGGTGGAGAAACAGGAGGAG
CAGGGGCAGGGGCACTCTACACTGGACACTGTAGTGGACAGTCTCAGTGCTCCAGCTCTGAA
TTCTGGTATAAGTCCTTGCCTAGGGAGTTATTGGCATCCCAGGGTCTCAGTTACTGCCTCTGCTCCACAGGCAGAGG
AAAGCATGGGGTGTCCAGCCTTTTCTCACTCTTAGGGACAATGTTGACTTCTGACTGATGTGGACCATCATCATCT
TCCGGAGCTGCTGCTGTGTCTGCCACCAATGCTGAGCCCAGGCACTGCCTTCAGACCCAGCAATGACAGCATGAAATCAA
ATTGATGGCCTACCAGGAAGCCCACAATTACTCATCACTGCCATTTTAGTTCAGGTTTTTGCCAAACTATTTATTACCTC
CTTATGAGGAAGTGATGAAC

4 11242 11268 25467376 25467402 - 294
TAACCTCCACCTGTTTCCCTCCCTGTC
ATCTTCCAATCCCTTCCCCACCCTACC






---------------------------------
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!




_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx

0
prachi_shroff
10/4/2002 3:09:09 PM
A simple, if not elegant, way of doing it assumes that you have each sequence 
in its own variable, say in an array.  Then:

$sequence =~ s/\n//g; #remove ALL newlines
$sequence .= "\n"; #re-add the terminal newline

>===== Original Message From "Prachi Shah" <prachi_shroff@hotmail.com> =====
>Hmmm. One way of doing it could be to read each sequence in the file,
>reading the header and the actual sequence in different variables. And then,
>format the sequence variable to remove all newlines using a regular
>expression. And then write them back to another file.
>
>Hope this helps.
>
>Prachi.
>
>
>----Original Message Follows----
>From: s wang <swang130@yahoo.com>
>To: beginners@perl.org
>Subject: how can i get rid of these new line characters?
>Date: Fri, 4 Oct 2002 08:00:19 -0700 (PDT)
>
>
>i have just started writing some scripts in PERL and i am trying to catch a
>deadline, i really wish i could get some help for this problem. any
>suggestion is greatly appreciated.
>
>i have a set of files with sequences aligned in the following format. i
>wonder how i can eliminate the new line characters within each sequence
>without touching those between sequences?
>
>.....
>
>2 chr1 10761 10775 chr19 46520370 46520384 + 941
>acaGGAAAAGAACAA
>acaggaaaagaaggg
>
>3 chr1 10776 11241 chrUn 45411478 45411944 - 12857
>AAGAAGGAAGAAGAGGGTAGAGGAGAAGTGCAGCAAGGGTGGAGGGAGGTGCCCGCGCTGGGTCGGAGGAGCAGGAG
TAT
>GGAGGGAAGACTCCTGGGTGGCATGGAGCTCTTGCACCTCTAGGCACTGCCCAGCCCTGTGTCAGCCAGGGCTGAAC
CCCCACAGGATAAGGAACCTGTGTGTGTGACCAACAATCAAAG
>CTACATCTGTGACACAACAGGACACTGCTATGGGCAGTCTCAGTTCTGGCTCGCGTGGACCATCACCATCA
>TCCTGAGCTGCTGCTGTGTCTGCCACCACAGCCAAGCCAGCCCTCAAGTCCAGCAGTAGCAACATGAAATCAA
>CCTGCCTGCCTATCCAGAAGCCCGCAATTACTCAGTGCTACCATTTTATTTCACCAAACTATTTATTACCTT
>CTTATGAGGAAGTGGTGAAC
>AAGAAGGAAGCAGAGGGAAGAAGAAATGAAGGAGGAGGGTGATAGTGCCATGGTGGAGAAACAGGAGGAG
>CAGGGGCAGGGGCACTCTACACTGGACACTGTAGTGGACAGTCTCAGTGCTCCAGCTCTGAA
>TTCTGGTATAAGTCCTTGCCTAGGGAGTTATTGGCATCCCAGGGTCTCAGTTACTGCCTCTGCTCCACAGGCAGAGG
>AAAGCATGGGGTGTCCAGCCTTTTCTCACTCTTAGGGACAATGTTGACTTCTGACTGATGTGGACCATCATCATCT
>TCCGGAGCTGCTGCTGTGTCTGCCACCAATGCTGAGCCCAGGCACTGCCTTCAGACCCAGCAATGACAGCATGAAAT
CAA
>ATTGATGGCCTACCAGGAAGCCCACAATTACTCATCACTGCCATTTTAGTTCAGGTTTTTGCCAAACTATTTATTAC
CTC
>CTTATGAGGAAGTGATGAAC
>
>4 11242 11268 25467376 25467402 - 294
>TAACCTCCACCTGTTTCCCTCCCTGTC
>ATCTTCCAATCCCTTCCCCACCCTACC
>
>
>
>
>
>
>---------------------------------
>Do you Yahoo!?
>New DSL Internet Access from SBC & Yahoo!
>
>
>
>
>_________________________________________________________________
>MSN Photos is the easiest way to share and print your photos:
>http://photos.msn.com/support/worldwide.aspx
>
>
>--
>To unsubscribe, e-mail: beginners-unsubscribe@perl.org
>For additional commands, e-mail: beginners-help@perl.org

"Ain't no blood in my body, it's liquid soul in my veins"
~Roots Manuva

0
nkuipers
10/4/2002 3:25:09 PM
On Oct 4, s wang said:

>i have just started writing some scripts in PERL and i am trying to catch
>a deadline, i really wish i could get some help for this problem. any
>suggestion is greatly appreciated.
>
>i have a set of files with sequences aligned in the following format. i
>wonder how i can eliminate the new line characters within each sequence
>without touching those between sequences?

I think the easiest way is to read in a line, then read the next line.  If
the next line is NOT "\n", then remove the last character from the
previous line:

  open DNA, "< dna.txt" or die "can't read dna.txt: $!";
  open NEW_DNA, "> dna.txt.new" or die "can't write dna.txt.new: $!";

  my $prev = <DNA>;
  until (eof DNA) {
    my $line = <DNA>;
    if ($line ne "\n") {
    chomp $prev if $line ne "\n" and $prev ne "\n";
    print NEW_DNA $prev;
    $prev = $line;
  }
  print NEW_DNA $prev;

  close NEW_DNA;
  close DNA;

  rename "dna.txt" => "dna.txt.old"
    or die "can't rename dna.txt to dna.txt.old: $!";

  rename "dna.txt.new" => "dna.txt"
    or die "can't rename dna.txt.new to dna.txt: $!";

-- 
Jeff "japhy" Pinyan      japhy@pobox.com      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]

0
japhy
10/4/2002 3:27:21 PM
On Oct 4, s wang said:

>i have just started writing some scripts in PERL and i am trying to catch
>a deadline, i really wish i could get some help for this problem. any
>suggestion is greatly appreciated.
>
>i have a set of files with sequences aligned in the following format. i
>wonder how i can eliminate the new line characters within each sequence
>without touching those between sequences?

Heh, a much simpler way is:

  open DNA, "< dna.txt" or die "can't read dna.txt: $!";
  open NEW_DNA, "> dna.txt.new" or die "can't write dna.txt.new: $!";

  {
    local $/ = "";
    while (<DNA>) {
      chomp;  # get rid of the newlines at the end...
      tr/\n//d;  # get rid of the newlines in the text...
      print NEW_DNA "$_\n\n";  # and replace the newlines at the end
    }
  }

  close NEW_DNA;
  close DNA;

-- 
Jeff "japhy" Pinyan      japhy@pobox.com      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]

0
japhy
10/4/2002 3:30:09 PM
With something like the script below.  (I haven't tested it.)  I  
assumed the blank lines in the sample data really exist.  If they  
don't, you'll need to change it a bit.

#!/usr/bin/perl

use strict;
use warnings;

my $long_line = '';
while (<>) {
	if (/^\s*$/) {
		print "$long_line\n\n";
		$long_line = '';
	}
	else { $long_line .= $_; }
}

__END__

On Friday, October 4, 2002, at 10:00  AM, s wang wrote:

>
> i have just started writing some scripts in PERL and i am trying to  
> catch a deadline, i really wish i could get some help for this  
> problem. any suggestion is greatly appreciated.
>
> i have a set of files with sequences aligned in the following format.  
> i wonder how i can eliminate the new line characters within each  
> sequence without touching those between sequences?
>
> .....
>
> 2 chr1 10761 10775 chr19 46520370 46520384 + 941
> acaGGAAAAGAACAA
> acaggaaaagaaggg
>
> 3 chr1 10776 11241 chrUn 45411478 45411944 - 12857
> AAGAAGGAAGAAGAGGGTAGAGGAGAAGTGCAGCAAGGGTGGAGGGAGGTGCCCGCGCTGGGTCGGAGGAG 
> CAGGAGTAT
> GGAGGGAAGACTCCTGGGTGGCATGGAGCTCTTGCACCTCTAGGCACTGCCCAGCCCTGTGTCAGCCAGGG 
> CTGAACCCCCACAGGATAAGGAACCTGTGTGTGTGACCAACAATCAAAG
> CTACATCTGTGACACAACAGGACACTGCTATGGGCAGTCTCAGTTCTGGCTCGCGTGGACCATCACCATCA
> TCCTGAGCTGCTGCTGTGTCTGCCACCACAGCCAAGCCAGCCCTCAAGTCCAGCAGTAGCAACATGAAATC 
> AA
> CCTGCCTGCCTATCCAGAAGCCCGCAATTACTCAGTGCTACCATTTTATTTCACCAAACTATTTATTACCT 
> T
> CTTATGAGGAAGTGGTGAAC
> AAGAAGGAAGCAGAGGGAAGAAGAAATGAAGGAGGAGGGTGATAGTGCCATGGTGGAGAAACAGGAGGAG
> CAGGGGCAGGGGCACTCTACACTGGACACTGTAGTGGACAGTCTCAGTGCTCCAGCTCTGAA
> TTCTGGTATAAGTCCTTGCCTAGGGAGTTATTGGCATCCCAGGGTCTCAGTTACTGCCTCTGCTCCACAGG 
> CAGAGG
> AAAGCATGGGGTGTCCAGCCTTTTCTCACTCTTAGGGACAATGTTGACTTCTGACTGATGTGGACCATCAT 
> CATCT
> TCCGGAGCTGCTGCTGTGTCTGCCACCAATGCTGAGCCCAGGCACTGCCTTCAGACCCAGCAATGACAGCA 
> TGAAATCAA
> ATTGATGGCCTACCAGGAAGCCCACAATTACTCATCACTGCCATTTTAGTTCAGGTTTTTGCCAAACTATT 
> TATTACCTC
> CTTATGAGGAAGTGATGAAC
>
> 4 11242 11268 25467376 25467402 - 294
> TAACCTCCACCTGTTTCCCTCCCTGTC
> ATCTTCCAATCCCTTCCCCACCCTACC
>
>
>
>
>
>
> ---------------------------------
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!

0
james
10/4/2002 3:30:40 PM
Oops, forgot those newlines.  Need to add the 'chomp' below...

On Friday, October 4, 2002, at 10:30  AM, James Edward Gray II wrote:

> With something like the script below.  (I haven't tested it.)  I  
> assumed the blank lines in the sample data really exist.  If they  
> don't, you'll need to change it a bit.
>
> #!/usr/bin/perl
>
> use strict;
> use warnings;
>
> my $long_line = '';
> while (<>) {

	chomp;

> 	if (/^\s*$/) {
> 		print "$long_line\n\n";
> 		$long_line = '';
> 	}
> 	else { $long_line .= $_; }
> }
>
> __END__
>
> On Friday, October 4, 2002, at 10:00  AM, s wang wrote:
>
>>
>> i have just started writing some scripts in PERL and i am trying to  
>> catch a deadline, i really wish i could get some help for this  
>> problem. any suggestion is greatly appreciated.
>>
>> i have a set of files with sequences aligned in the following format.  
>> i wonder how i can eliminate the new line characters within each  
>> sequence without touching those between sequences?
>>
>> .....
>>
>> 2 chr1 10761 10775 chr19 46520370 46520384 + 941
>> acaGGAAAAGAACAA
>> acaggaaaagaaggg
>>
>> 3 chr1 10776 11241 chrUn 45411478 45411944 - 12857
>> AAGAAGGAAGAAGAGGGTAGAGGAGAAGTGCAGCAAGGGTGGAGGGAGGTGCCCGCGCTGGGTCGGAGGA 
>> GCAGGAGTAT
>> GGAGGGAAGACTCCTGGGTGGCATGGAGCTCTTGCACCTCTAGGCACTGCCCAGCCCTGTGTCAGCCAGG 
>> GCTGAACCCCCACAGGATAAGGAACCTGTGTGTGTGACCAACAATCAAAG
>> CTACATCTGTGACACAACAGGACACTGCTATGGGCAGTCTCAGTTCTGGCTCGCGTGGACCATCACCATC 
>> A
>> TCCTGAGCTGCTGCTGTGTCTGCCACCACAGCCAAGCCAGCCCTCAAGTCCAGCAGTAGCAACATGAAAT 
>> CAA
>> CCTGCCTGCCTATCCAGAAGCCCGCAATTACTCAGTGCTACCATTTTATTTCACCAAACTATTTATTACC 
>> TT
>> CTTATGAGGAAGTGGTGAAC
>> AAGAAGGAAGCAGAGGGAAGAAGAAATGAAGGAGGAGGGTGATAGTGCCATGGTGGAGAAACAGGAGGAG
>> CAGGGGCAGGGGCACTCTACACTGGACACTGTAGTGGACAGTCTCAGTGCTCCAGCTCTGAA
>> TTCTGGTATAAGTCCTTGCCTAGGGAGTTATTGGCATCCCAGGGTCTCAGTTACTGCCTCTGCTCCACAG 
>> GCAGAGG
>> AAAGCATGGGGTGTCCAGCCTTTTCTCACTCTTAGGGACAATGTTGACTTCTGACTGATGTGGACCATCA 
>> TCATCT
>> TCCGGAGCTGCTGCTGTGTCTGCCACCAATGCTGAGCCCAGGCACTGCCTTCAGACCCAGCAATGACAGC 
>> ATGAAATCAA
>> ATTGATGGCCTACCAGGAAGCCCACAATTACTCATCACTGCCATTTTAGTTCAGGTTTTTGCCAAACTAT 
>> TTATTACCTC
>> CTTATGAGGAAGTGATGAAC
>>
>> 4 11242 11268 25467376 25467402 - 294
>> TAACCTCCACCTGTTTCCCTCCCTGTC
>> ATCTTCCAATCCCTTCCCCACCCTACC
>>
>>
>>
>>
>>
>>
>> ---------------------------------
>> Do you Yahoo!?
>> New DSL Internet Access from SBC & Yahoo!
>

0
james
10/4/2002 3:34:51 PM
> -----Original Message-----
> From: s wang [mailto:swang130@yahoo.com]
> Sent: Friday, October 04, 2002 11:00 AM
> To: beginners@perl.org
> Subject: how can i get rid of these new line characters?
> 
> 
> 
> i have just started writing some scripts in PERL and i am 
> trying to catch a deadline, i really wish i could get some 
> help for this problem. any suggestion is greatly appreciated.
> 
> i have a set of files with sequences aligned in the following 
> format. i wonder how i can eliminate the new line characters 
> within each sequence without touching those between sequences? 

Here's an attempt at a one-liner that does what I think you want:

perl -000 -i.bak -lpe 's/(?<=\n)(.*?)\n/$1/g' myfile

It reads and writes by "paragraphs".

It then strips the newlines after the first, since it appears you want the
first line of each paragraph to remain a separate line.

> 
> .....
> 
> 2 chr1 10761 10775 chr19 46520370 46520384 + 941
> acaGGAAAAGAACAA
> acaggaaaagaaggg
> 
> 3 chr1 10776 11241 chrUn 45411478 45411944 - 12857
> AAGAAGGAAGAAGAGGGTAGAGGAGAAGTGCAGCAAGGGTGGAGGGAGGTGCCCGCGCTGGG
> TCGGAGGAGCAGGAGTAT
> GGAGGGAAGACTCCTGGGTGGCATGGAGCTCTTGCACCTCTAGGCACTGCCCAGCCCTGTGT
> CAGCCAGGGCTGAACCCCCACAGGATAAGGAACCTGTGTGTGTGACCAACAATCAAAG
> CTACATCTGTGACACAACAGGACACTGCTATGGGCAGTCTCAGTTCTGGCTCGCGTGGACCA
> TCACCATCA
> TCCTGAGCTGCTGCTGTGTCTGCCACCACAGCCAAGCCAGCCCTCAAGTCCAGCAGTAGCAA
> CATGAAATCAA
> CCTGCCTGCCTATCCAGAAGCCCGCAATTACTCAGTGCTACCATTTTATTTCACCAAACTAT
> TTATTACCTT
> CTTATGAGGAAGTGGTGAAC
> AAGAAGGAAGCAGAGGGAAGAAGAAATGAAGGAGGAGGGTGATAGTGCCATGGTGGAGAAACAGGAGGAG
> CAGGGGCAGGGGCACTCTACACTGGACACTGTAGTGGACAGTCTCAGTGCTCCAGCTCTGAA
> TTCTGGTATAAGTCCTTGCCTAGGGAGTTATTGGCATCCCAGGGTCTCAGTTACTGCCTCTG
> CTCCACAGGCAGAGG
> AAAGCATGGGGTGTCCAGCCTTTTCTCACTCTTAGGGACAATGTTGACTTCTGACTGATGTG
> GACCATCATCATCT
> TCCGGAGCTGCTGCTGTGTCTGCCACCAATGCTGAGCCCAGGCACTGCCTTCAGACCCAGCA
> ATGACAGCATGAAATCAA
> ATTGATGGCCTACCAGGAAGCCCACAATTACTCATCACTGCCATTTTAGTTCAGGTTTTTGC
> CAAACTATTTATTACCTC
> CTTATGAGGAAGTGATGAAC
> 
> 4 11242 11268 25467376 25467402 - 294
> TAACCTCCACCTGTTTCCCTCCCTGTC
> ATCTTCCAATCCCTTCCCCACCCTACC
0
Bob_Showalter
10/4/2002 3:49:30 PM
S Wang wrote:
> 
> i have just started writing some scripts in PERL and i am trying to
> catch a deadline, i really wish i could get some help for this problem.
> any suggestion is greatly appreciated.
> 
> i have a set of files with sequences aligned in the following format.
> i wonder how i can eliminate the new line characters within each sequence
> without touching those between sequences?
> 
> .....
> 
> 2 chr1 10761 10775 chr19 46520370 46520384 + 941
> acaGGAAAAGAACAA
> acaggaaaagaaggg
> 
> 3 chr1 10776 11241 chrUn 45411478 45411944 - 12857
> AAGAAGGAAGAAGAGGGTAGAGGAGAAGTGCAGCAAGGGTGGAGGGAGGTGCCCGCGCTGGGTCGGAGGAGCAGGAGTAT
> GGAGGGAAGACTCCTGGGTGGCATGGAGCTCTTGCACCTCTAGGCACTGCCCAGCCCTGTGTCAGCCAGGGCTGAACCCCCACAGGATAAGGAACCTGTGTGTGTGACCAACAATCAAAG
> CTACATCTGTGACACAACAGGACACTGCTATGGGCAGTCTCAGTTCTGGCTCGCGTGGACCATCACCATCA
> TCCTGAGCTGCTGCTGTGTCTGCCACCACAGCCAAGCCAGCCCTCAAGTCCAGCAGTAGCAACATGAAATCAA
> CCTGCCTGCCTATCCAGAAGCCCGCAATTACTCAGTGCTACCATTTTATTTCACCAAACTATTTATTACCTT
> CTTATGAGGAAGTGGTGAAC
> AAGAAGGAAGCAGAGGGAAGAAGAAATGAAGGAGGAGGGTGATAGTGCCATGGTGGAGAAACAGGAGGAG
> CAGGGGCAGGGGCACTCTACACTGGACACTGTAGTGGACAGTCTCAGTGCTCCAGCTCTGAA
> TTCTGGTATAAGTCCTTGCCTAGGGAGTTATTGGCATCCCAGGGTCTCAGTTACTGCCTCTGCTCCACAGGCAGAGG
> AAAGCATGGGGTGTCCAGCCTTTTCTCACTCTTAGGGACAATGTTGACTTCTGACTGATGTGGACCATCATCATCT
> TCCGGAGCTGCTGCTGTGTCTGCCACCAATGCTGAGCCCAGGCACTGCCTTCAGACCCAGCAATGACAGCATGAAATCAA
> ATTGATGGCCTACCAGGAAGCCCACAATTACTCATCACTGCCATTTTAGTTCAGGTTTTTGCCAAACTATTTATTACCTC
> CTTATGAGGAAGTGATGAAC
> 
> 4 11242 11268 25467376 25467402 - 294
> TAACCTCCACCTGTTTCCCTCCCTGTC
> ATCTTCCAATCCCTTCCCCACCCTACC

perl -i~ pe'/^[acgt]+$/i and chomp' yourfile


John
-- 
use Perl;
program
fulfillment
0
krahnj
10/4/2002 4:08:15 PM
Reply: