maverick.usb has asked for the
wisdom of the Perl Monks concerning the following question:
I have a large text file that is has a bunch of records. Each record starts with a header line that starts with the ">" character. Then there are several lines under that line that contain sequences of letters.
For example, a file might look like:
>TEXT ID=2L TEXT
>TEXT ID=3R TEXT
I can send you the actual file if you would like to see it. All I want is a PERL script that inputs a file in the following format:
Where ID is an identifier for the record (in the above record 1 has identifier of 2L and record 2 has identifier of 3R and start and stop are first and last positions of a subsequence in the record. Then there is a space and a SEQUENCE.
I want the script to use the ranges to pull out the subsequence from the big record text file and then see if it matches the SEQUENCE in the input. The big record file is large so you can't load the whole file into memory, you need to stream it.
The output would be the subsequence from the record and a space and a YES or NO for where it matches.