I have a large FASTA file (a genetic sequence, an entire chromosome), where each line contains 50 characters (bases a,g,t, and c). There are about 4 million lines in this file. It is downloaded from UCSC downloads page.
I want to reorganize the file so that each character of a line in the FASTA file is placed in its own line of a new file. That is, turn each 50-character line in the original file into 50, single-character lines. This will result in the entire sequence rewritten as a single column. Ultimately, I want the sequence as a single column so I can then place an adjacent column containing the genomic coordinate position for each base. The purpose is to use the new file to retrieve sequences of genetic elements, the coordinates of which I find in other files that contain genomic annotation information (where specific genes are in terms of coordinates). These two kinds of information, sequence and coordinates, do not seem to be combined in a single file from the UCSC downloads page. Any advice?
perl
database
sequence