The for loop in the function will stop if it doesn't find a match between protein identifiers and the fasta file. It doesn't show an error if this is the case. This should be corrected.