I have a file contain multiple gene >sequences. I want to separate into a file with gene ID perl or python script 
  This is a python script for splitting FASTA file into an individual file.

    from Bio import SeqIO
    import argparse

    parser = argparse.ArgumentParser(description="Split the fasta file into individual file with each gene seq")
    parser.add_argument('-f', action='store', dest='fasta_file', help='Input fasta file')
    result = parser.parse_args()

    f_open = open(result.fasta_file, "rU")

    for rec in SeqIO.parse(f_open, "fasta"):
       id = rec.id
       seq = rec.seq
       id_file = open(id, "w")
       id_file.write(">"+str(id)+"\n"+str(seq))
       id_file.close()

    f_open.close()

To run above code, (save the above code in code.py file)
            
    python code.py -f fasta_file

Note: You need to install Biopython module SeqIO to run this code.