Gist e3718d6464d2ba18e5a08233edd0aeb1
✓ Published0🌍 Public
NNpfn
Last edited Feb 8, 2019
Created on Feb 8, 2019
This Perl script splits a multi-sequence FASTA file into individual FASTA files, one per sequence. It reads the input file line by line, opens a new output file whenever a header line starting with `>` is encountered, and writes the header and subsequent sequence lines to that file. The code uses the `open`, `close`, and `shift` built-in functions to manage up to 248 output files named `CEG0.fasta` through `CEG247.fasta`. The script demonstrates a simple file-parsing and output-splitting workflow for bioinformatics sequence data.
AI-generated description