I have never made a script in my life.
The ploblem is how to change the fasta names like this input file:
>Glyma04g14800|Glyma04g14800.3 MMLETVAAVPGMVAGMLLHCKSLRRFEHSGGWIKALLEEAENERMHLMTFMEVAKPKWYE >Glyma05g24460|Glyma05g24460.1 SNVSIDLTKHHVPKNFLDKVAYRTVKLLRIPTDLFFKRRYGCRAMMLETVAAVPGMVGGM
in this output file (change original names to numbers in ascending order, starting with 1):
>1 MMLETVAAVPGMVAGMLLHCKSLRRFEHSGGWIKALLEEAENERMHLMTFMEVAKPKWYE >2 SNVSIDLTKHHVPKNFLDKVAYRTVKLLRIPTDLFFKRRYGCRAMMLETVAAVPGMVGGM
I'm so grateful for helping. Regards, Naka