in reply to Genbank file parsing
if u want to extract Origin to // in the text file globally
you try this
undef $/; open (FILE, $ARGV[0]) or die "unable to open FILE\n"; my $input=<FILE>; close(FILE); my @final=(); while ($input=~m#ORIGIN(.*?)//#gsi) { push(@final,$1); } print @final;
input file "text.txt" contains
**********************************************
FEATURES Location/Qualifiers
/note="blah blah"
COUNT 200
ORIGIN
1 lots of nice info
61 lots of nice info
121 lots of nice info
//
ORIGIN
1 lots of nice info
61 lots of nice info
121 lots of nice info
//
ORIGIN
1 lots of nice info
61 lots of nice info
121 lots of nice info
//
ORIGIN
1 lots of nice info
61 lots of nice info
121 lots of nice info
//
***********************************
output file is look
**********************
1 lots of nice info
61 lots of nice info
121 lots of nice info
1 lots of nice info
61 lots of nice info
121 lots of nice info
1 lots of nice info
61 lots of nice info
121 lots of nice info
1 lots of nice info
61 lots of nice info
121 lots of nice info
Regards,
Senthi Kumar.k
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Genbank file parsing
by YuckFoo (Abbot) on Jan 11, 2005 at 23:08 UTC |