Multi fasta to single fasta files $ perl -ne 'if (/^>(\S+)/) { close OUT; open OUT, ">$1.fasta" } print OUT' genome.fasta #Multi-fasta #fasta#multi#genome#files
One liner to remove the description information from a fasta file and just keep the identifier $ perl -p -i -e 's/>(.+?) .+/>$1/g' sample1.fa #clean#header#fasta