Proteins perform important roles in organisms and their structure and function can be studied by determining their amino acid sequence. There are several steps to determine the sequence, including isolating the protein, determining the number of peptide chains, identifying the N- and C-terminals, and Edman degradation which sequentially removes amino acids from the N-terminal for identification. Mass spectrometry can also be used to analyze protein structure. Higher levels of structure can be analyzed using techniques like X-ray crystallography and NMR spectroscopy.