Exercise: Neural networks
Biological background: signal peptides
In eukaryotic cells, the vast majority of secretory proteins are synthesized with an N-terminal address tag called the signal peptide. The signal peptide functions as a signal for protein translocation across the membrane of the Endoplasmic Reticulum (ER). Once the protein is in the ER, it will be packed in vesicles and transported further to the Golgi apparatus and from there to the cell surface, unless it has additional signals for retention in the ER or the Golgi, or for transport to the endosome/lysosome system.
![]()
The function of signal peptides in protein synthesis in a eukaryotic cell. Step 1: The SRP (signal recognition particle) binds an emerging signal peptide (the first part of the nascent protein chain), and protein synthesis is paused. Step 2: The ribosome-SRP complex binds to the SRP receptor at the ER membrane. Step 3: The SRP is released, and protein synthesis resumes, while the nascent protein is threaded through the translocon. Step 4: The signal peptidase cleaves off the signal peptide. Step 5: The mature protein is released to the ER lumen.
Signal peptides from different secretory proteins are not identical, but they do share some common features. The are generally described as having three regions: an n-region with a preference for positively charged side chains, an h-region with hydrophobic side chains, and a c-region with more polar side chains, where the residues in positions -3 and -1 relative to the cleavage site are occupied by small, neutral side chains. Signal peptides vary in length, but most are between 15 and 30 amino acids.
The data: eukaryotic signal peptides
Prediction of signal peptides from sequence has two aspects:
- Given any sequence, find out whether it is a signal peptide or not;
- Given the sequence of a protein with a signal peptide; find out where it will be cleaved.
Today, we are going to focus on Aspect 2 only.
Below, you will find links to the eukaryotic part of the positive data from the SignalP 6.0 data set.
- EUK_SP_0.fasta, 699 sequences
- EUK_SP_1.fasta, 675 sequences
- EUK_SP_2.fasta, 666 sequences
The data have been homology partitioned to 30% using the GraphPart algorithm, i.e it is assured that no sequence in one partition (0, 1, or 2) has more than 30% identity to any sequence in another partition.
The data are in a FASTA-inspired 3-line format, which typically looks like this:
>B0JFB8|EUKARYA|SP|0 MKAVITLLFLACILVVTYGDLICGTNYCKDHPCTSPIARASCRSPATYRANHSGKCACCPACVTLLRERA SSSSSSSSSSSSSSSSSSSOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
The first line is the header, containing the UniProt Accession code; the second line is the sequence truncated to 70 residues; while the third line is the annotation where all residues within the signal peptide are marked with "S". The example shown is therefore cleaved between "TYG" and "DLI".
You first task is to assign one partition each as the training, validation, and test set. The training set is used for finding the values of the parameters (weights and biases) of the neural network. The validation set is used for choosing the hyperparameters of the neural network (the architecture and the duration of the training). The test set is used for measuring the performance of the final network. See Training, validation, and test data sets (Wikipedia).
Neural network prediction of signal peptide cleavage sites
For the exercise Signal Peptides (in partitions)
In the exercise you will get to test:
- Select the splits (parts used for train, test and, validation)
- Input window size
- w/o Hidden layer
- Hidden layer changes
- onehot (or Sparse) vs Blosum
The exercise continues here: https://teaching.healthtech.dtu.dk/22111/jupyter.php
You will need your student number and password to login to the server
Here there is a guide of how to interact with the cluster and run the Notebook
Please make a copy of the file into your environment using this command:
cp /home/projects/22111/ANN/ANN_exercise-vs.ipynb ~/.
If you want to run the code on your own computer, bypassing the need to login to the server, you need the Notebook file which is found here: https://teaching.healthtech.dtu.dk/material/22111/NN/ANN_exercise-vs.ipynb
For your records, we have also saved a "dead" HTML version of the Notebook file here: https://teaching.healthtech.dtu.dk/material/22111/NN/ANN_exercise-vs.html . It can be used for reading the questions and the code, but not for running the code. There is also a PDF version, printed in landscape mode to allow for long code lines.