Skip to main content
100%

Gist c994b5a229194ab2c98a8580d48f54ef

✓ Published0🌍 Public
NNpfn
Last edited Feb 8, 2019
Created on Feb 8, 2019

This example shows a Perl script that corrects FASTA sequence headers by replacing pipe characters with hyphens, making the files compatible with the CEGMA genome analysis tool. The script reads an input FASTA file and writes the corrected output to a second file. It uses the standard Perl file I/O operations `open`, `close`, and the regex substitution operator to modify only the header lines that begin with `>[A-Z]{3}`. The script also checks for an existing output file to prevent accidental overwriting, and it prints a usage message if the correct number of arguments is not provided.

AI-generated description

Similar vizzes