How to Split Multi line FASTA Files with PERL Script

Recently someone anonymous (surprisingly most of the reader who comment on this blog are anonymous) asked for a PERL script to split a multi line fasta file to induvidual fasta file with single sequence. Some times if you have hundreds of sequences in a single file and want them to handle separately or in smaller size them it is really helpful to split them or separate them in several files. SO PERL scripts given below do the same job to split big multi line fasta files to small fasta files.

Script: split_fasta.pl 

Uses
perl split_fasta.pl -i input.txt -o result.txt -n 1000

The best thing about this script is that you can control the number of sequence per file you want. For example, if you have 60,000 sequences in a files and you will run the command given above so it will create 6,000 different files.






  • How to Extract Multiple Sequence from Multi Fasta File with PERL
  • How to save perl script
  • Easiest Way To Install Perl on Windows
  • 3 comments:

    1. HI,
      i tried to download split_fasta.pl but it is not available iim unable to download it kindly help me how i can get this script ???

      ReplyDelete
    2. Hi Priyanka Paul,
      I have a problem in downloading perl script from your site kindly help me how can i get scripts from your site ????
      Adeena

      ReplyDelete
      Replies
      1. Sorry for your inconvenience. You can copy the perl script to split the multiline fasta directly from post. Please let me know if you have any other issue. Thanks

        Delete

    Have Problem ?? Drop a comments here!