LSMA

LONDON SCHOOL OF MULTIOMICS & AI

Free course

Free course

0 of 73 lessons

Lesson 2 of 9

Module 7 · From genes to function

Protein families, domains and motifs

Protein families, domains and motifs

Protein families, domains and motifs

Proteins are built from reusable parts. Learn how domains, families and short motifs hint at function, search CFTR for a real sequence pattern, and see why most pattern matches are not real sites.

⏱ 15 min readModule 7 · From genes to functionFree
Lesson at a glance5 steps · about 15 min
  1. Proteins are built from parts
  2. Pfam and InterPro
  3. Motifs and patterns
  4. Searching CFTR for the sequon
  5. Low-complexity and disordered regions

Proteins are built from parts

Finding genes and annotating a genome ended with a list of predicted proteins. The next question is what each one does. Comparing a whole protein with known ones, as in Module 4, is the first step. A second, often more telling step is to look at its parts.

A domain is a section of a protein, typically somewhere between about 50 and 250 amino acids, that folds into its own compact shape and often has its own job, such as binding DNA, binding ATP or crossing a membrane. Domains are reused: evolution copies, shuffles and recombines them, so the same kind of domain turns up in many different proteins, and one protein can carry several. The order of a protein's domains is called its domain architecture.

A familiar example is the receptor tyrosine kinases, the cell-surface receptors for many growth factors. Each has domains outside the cell that bind its signal, a single helix that crosses the membrane, and a kinase domain inside the cell that adds phosphate groups to tyrosines. The kinase domain on the inside is shared with hundreds of other human kinases, while the parts outside differ from receptor to receptor. Reading the architecture tells you, before any experiment, roughly how such a protein works: something binds outside, and a kinase is switched on inside.

A protein family is a group of proteins, or of domains, that share a common ancestor and so have similar sequences and shapes. If an unknown protein contains a domain from a well-studied family, you have a strong clue to at least part of its function.

Why look at parts at all, when Module 4 already showed how to compare whole proteins? Because whole-protein comparison can mislead in two ways. A protein that shares one domain with a well-studied protein can score a respectable match even though the rest of it is entirely different, and inherit a name it does not deserve. And a distant relative may share too little overall sequence to give a convincing whole-protein match, while its most conserved domain is still clearly recognisable. Looking domain by domain keeps both errors in view.

The code in this lesson uses only tools built into Python, plus an internet connection to fetch data from UniProt. Nothing needs installing.

Pfam and InterPro

Pfam is a large collection of protein families and domains. Each family is described by a profile hidden Markov model, a statistical summary of an alignment of many family members that records which amino acids are likely at each position and where gaps are common. Searching a new protein against these models can detect family members whose sequences have drifted a long way, well beyond what a simple pairwise comparison would find.

The reason a profile is more sensitive is that it knows which positions matter. In an alignment of hundreds of family members, some positions are almost always the same amino acid, often because they hold the shape together or form the active site, while others vary freely. A pairwise comparison treats every position alike; a profile rewards a match at a conserved position far more than one at a variable position, and is lenient about gaps where the family often has them. Each Pfam family also has a curated score threshold, its gathering threshold, chosen by the curators so that known members score above it and unrelated proteins below. A match that clears it is reported as significant; one just below it is worth a second look but not a conclusion.

InterPro, run at EMBL-EBI, brings together the signatures of many such databases, Pfam among them, along with PROSITE, SMART, PANTHER and others, and merges overlapping ones into single entries with a description and, often, Gene Ontology terms (Pathways and enrichment analysis). Pfam itself is now served through the InterPro website. You can paste a sequence into InterPro's web search, or run its program, InterProScan, on a whole proteome. UniProt shows the InterPro and Pfam matches for every entry in its "Family and domains" section, which you saw in Reading a gene record and a protein record.

On real data, the usual first pass is to run InterProScan on every protein predicted in Finding genes and annotating a genome and read the result as a table: one row per match, with the protein, the database, the signature accession, the start and end positions, and a score. A typical outcome for a newly annotated genome is that a large share of proteins carry at least one recognisable domain, and a sizeable minority carry none. Those without matches are not failures of the method; many are short, species-specific or disordered proteins, or gene predictions that are not real genes at all.

Protein families, domains and motifs · LSMA free course A bar represents the 1,480 amino acids of human CFTR. Along it sit five parts: transmembrane domain 1 (residues 81 to 365), nucleotide-binding domain 1 (423 to 646), the disordered R region (654 to 831), transmembrane domain 2 (859 to 1155) and nucleotide-binding domain 2 (1210 to 1443). Above the bar, twelve ticks mark every match to the pattern N, not P, S or T, not P. Only two, at asparagines 894 and 900, are highlighted as annotated glycosylation sites; both lie in an extracellular loop of the second transmembrane domain. HUMAN CFTR · 1,480 AMINO ACIDS · UNIPROT P13569 12 pattern matches N894, N900 · annotated sites TMD1 NBD1 R TMD2 NBD2 181–365423–646654–831859–11551210–14431480 TMD · transmembrane NBD · nucleotide-binding R · regulatory region six helices each, crossingthe membrane; togetherthey form the channel bind and use ATP; thesame family is found inmany ABC transporters no fixed fold: anintrinsically disorderedregion, switched by kinases
Human CFTR, from UniProt P13569. Its five parts are two transmembrane domains, two nucleotide-binding domains and a disordered regulatory region. The ticks are the twelve pattern matches found by the code below; only the two in red are annotated as glycosylated. Positions to scale along the bar.

How to read this figure

The long line is the protein chain, from residue 1 at the left to 1,480 at the right, drawn to scale. Boxes are domains, labelled with their residue ranges underneath. The two shaded boxes belong to the same family, as do the two navy outlined ones: CFTR carries two copies of each, which is the classic layout of an ABC transporter. The dashed box is the R region, which has no stable fold. The ticks above the bar come from the code in this lesson; read them after you have run it.

The standard references are Mistry et al. 2021, Nucleic Acids Research, for Pfam, and Paysan-Lafosse et al. 2023, Nucleic Acids Research, for InterPro. Both describe a specific release, and both databases change: families are added, merged and redrawn, and boundaries move. When you report that a protein "contains a Pfam domain", give the family accession (such as PF00005), the database release and the tool version, for example of InterProScan. A domain match is evidence of shared ancestry for that region only. It does not say that the whole protein, or its exact function, matches the family's best-known member.

Motifs and patterns

A motif is a short stretch, often fewer than 20 amino acids, that recurs in many proteins and is linked to a particular role: a site where a sugar or a phosphate is added, a signal that sends a protein to a part of the cell, or the loop in a nucleotide-binding domain that grips ATP. A motif is much smaller than a domain and does not fold on its own.

The PROSITE database describes many motifs as patterns, written in a compact notation, one position at a time, separated by dashes:

  • A single letter, such as N, means that amino acid exactly.
  • Square brackets, [ST], mean any one of the letters inside: here serine or threonine.
  • Curly brackets, {P}, mean any amino acid except those inside: here anything but proline.
  • x means any amino acid, and x(2) means any two.

Our example is the site where cells attach sugar chains to asparagine, called N-linked glycosylation. It happens to proteins as they pass through the endoplasmic reticulum, so it affects secreted proteins and the parts of membrane proteins that end up outside the cell. The sequence required, called the sequon, is N-{P}-[ST]-{P}: an asparagine, any amino acid but proline, a serine or threonine, and again anything but proline.

Why exclude proline? Proline's side chain loops back onto the protein backbone, which makes the chain stiff and bends it. A proline next to the asparagine, or just after the serine or threonine, holds the stretch in a shape the sugar-adding enzyme cannot use. This is typical of motifs: each rule in the pattern usually reflects a physical requirement of the enzyme or partner that recognises the site, and knowing that requirement helps you judge a borderline match.

Protein families, domains and motifs · LSMA free course Four boxes, one per position. Position 1 must be N, asparagine. Position 2 may be anything except P. Position 3 must be S or T. Position 4 may be anything except P. Below, the same pattern written as the Python regular expression N, then not P, then S or T, then not P. Two examples follow: NSTH matches, and NPSA does not, because P sits at position 2. ONE PATTERN, FOUR POSITIONS N{P}[ST]{P} asparagineanything but prolineserine or threonineanything but proline As a regular expression: N[^P][ST][^P] NSTH matches · NPSA does not: P at position 2
The PROSITE pattern and the regular expression say the same thing. In a regular expression, [^P] means "any character except P". Schematic.

How to read this figure

Read the boxes left to right, as you would read the protein from its start. Each box is one position and says what is allowed there. The bottom lines show the same rule as a Python regular expression, which you met in Finding genes and annotating a genome, and test it on two four-letter examples.

Searching CFTR for the sequon

CFTR, the protein behind cystic fibrosis, was the gene you followed through every database in Module 2. Here the code fetches its sequence straight from UniProt and scans it.

Python
import re
import urllib.request

url = "https://rest.uniprot.org/uniprotkb/P13569.fasta"
text = urllib.request.urlopen(url).read().decode()
lines = text.strip().split("\n")
seq = "".join(lines[1:])                     # join the sequence lines
print(lines[0][:60])
print(len(seq), "amino acids")

pattern = r"(?=(N[^P][ST][^P]))"             # N-{P}-[ST]-{P}, overlaps allowed
hits = [(m.start() + 1, m.group(1)) for m in re.finditer(pattern, seq)]
print(len(hits), "matches")
print(hits)

What this does

  • urllib.request.urlopen(url) downloads the FASTA file for UniProt entry P13569 from the UniProt REST API, a web address that returns data rather than a web page. .decode() turns the raw bytes into text.
  • The first line of a FASTA file is the header; the rest is the sequence, split over many lines. "".join(lines[1:]) glues those lines into one string.
  • [^P] means "not P". The pattern is wrapped in (?=( ... )), a lookahead, which lets matches overlap. In a stretch such as NNSTA, both the first N (NNST) and the second (NSTA) fit the pattern; without the lookahead, the search would skip the second.
  • m.start() + 1 turns Python's count from 0 into the residue number used by UniProt, which counts from 1.
>sp|P13569|CFTR_HUMAN Cystic fibrosis transmembrane conducta 1480 amino acids 12 matches [(48, 'NLSE'), (306, 'NSSA'), (386, 'NLTT'), (396, 'NVTA'), (432, 'NFSL'), (597, 'NKTR'), (801, 'NLTE'), (894, 'NSTH'), (900, 'NNSY'), (1148, 'NSSI'), (1229, 'NISF'), (1454, 'NSSK')]

Reading the output

The header confirms the entry: human CFTR, cut to 60 characters. The protein is 1,480 amino acids long. The pattern matches 12 times, and the list gives each match as a pair: the residue number of the asparagine, then the four letters. Two of them, at 894 and 900, sit only six residues apart.

Twelve matches does not mean twelve sugar chains. Next, the code fetches UniProt's full record for the same protein, in a structured text format called JSON, and checks two things: which sites UniProt annotates as glycosylated, and which of the matches lie outside the cell.

Python
import json

data = json.load(urllib.request.urlopen("https://rest.uniprot.org/uniprotkb/P13569.json"))
outside = []                                 # extracellular stretches
for f in data["features"]:
    start = f["location"]["start"]["value"]
    end = f["location"]["end"]["value"]
    if f["type"] == "Glycosylation":
        print("Annotated glycosylation at", start)
    if f["type"] == "Topological domain" and f["description"] == "Extracellular":
        outside.append((start, end))

for pos, motif in hits:
    out = any(s <= pos <= e for s, e in outside)
    print(pos, motif, "extracellular" if out else "inside the cell or membrane")

What this does

  • json.load(...) reads the record into Python as nested lists and dictionaries. data["features"] is the list of annotated features, the same ones shown in the "Features" part of the UniProt web page.
  • For each feature, the code reads its type and its start and end positions. It prints any of type "Glycosylation", and it saves the start and end of every "Topological domain" described as "Extracellular": the loops that face the outside of the cell.
  • any(s <= pos <= e ...) is true if a match position falls inside any of those outside loops.
Annotated glycosylation at 894 Annotated glycosylation at 900 48 NLSE inside the cell or membrane 306 NSSA inside the cell or membrane 386 NLTT inside the cell or membrane 396 NVTA inside the cell or membrane 432 NFSL inside the cell or membrane 597 NKTR inside the cell or membrane 801 NLTE inside the cell or membrane 894 NSTH extracellular 900 NNSY extracellular 1148 NSSI inside the cell or membrane 1229 NISF inside the cell or membrane 1454 NSSK inside the cell or membrane

Reading the output

UniProt annotates exactly two N-linked glycosylation sites, at asparagines 894 and 900. They are also the only two of the twelve matches that fall in an extracellular loop, which lies between two helices of the second transmembrane domain. The other ten face the inside of the cell or sit within the membrane, where the glycosylation machinery cannot reach them. So the pattern found every real site, but most of its matches are false alarms, and knowing where each part of the protein sits explained which ones count.

Worked example · how many sequons by chance?

How many matches would you expect in a random protein of the same length and make-up? In CFTR, 54 of 1,480 residues are N, 45 are P, and 206 are S or T.

P(N) = 54/1480 ≈ 0.037 P(not P) = 1 − 45/1480 ≈ 0.970
P(S or T) = 206/1480 ≈ 0.139
per position: 0.037 × 0.970 × 0.139 × 0.970 ≈ 0.0048
× 1,477 starting positions ≈ 7 matches by chance

Step by step. A match needs four positions in a row to fit. If residues were placed at random, the chance that each fits is simply its share of the protein, and the four chances multiply. That gives about 0.0048, or roughly 1 in 210 positions. A four-letter window can start at 1,477 places in a 1,480-residue chain, so you would expect about 1,477 × 0.0048, or 7, matches with no biology at all.

What the answer means. Twelve is not far above 7. Short patterns with loose rules match often by chance, so a match is a possibility to check, not a finding. Context does the real work: where the residue sits, whether it faces the right compartment, and whether experiments confirm it. PROSITE flags this pattern as one that matches so often that its scanning tool skips it unless you ask for it.

Go deeper: not every sequon gets a sugar

The sequon is necessary for N-linked glycosylation, but not enough. The enzyme that adds the sugar, oligosaccharyltransferase, works on the chain as it enters the endoplasmic reticulum, and it prefers some sequons to others. Sequons with threonine (N-x-T) are generally used more efficiently than those with serine (N-x-S). Sites very close to a membrane-crossing segment, or right at the end of the chain, are often skipped because the enzyme cannot reach them in time.

Occupancy can also be partial: the same site may carry a sugar on some copies of a protein and not on others. And there are rare exceptions the pattern misses, such as N-x-C, with cysteine in the third position. This is why glycosylation sites in UniProt are best trusted when they come with experimental evidence, often from mass spectrometry of glycopeptides, rather than from the pattern alone.

Low-complexity and disordered regions

Not every part of a protein folds. A low-complexity region is a stretch made from only a few kinds of amino acid, such as a long run of glutamines or a stretch rich in serine and glycine. CFTR's last eleven residues, for example, are marked as rich in acidic residues. Such regions cause trouble in searches: two unrelated proteins that both contain a run of glutamines will look similar for no evolutionary reason. Search tools therefore usually mask them, hiding them from the comparison.

This is the protein version of the repeat masking you met in Finding genes and annotating a genome, where transposons are marked so they are not mistaken for genes. BLAST, for example, offers a low-complexity filter for protein searches. A pitfall is to search with a query full of such runs and the filter off: many of the hits returned are then unrelated proteins that happen to share a glutamine or serine run, and they can swamp the real relatives. If a hit list looks surprisingly long, check whether the matches all fall in the same simple stretch.

An intrinsically disordered region is a part of a protein that has no single stable shape in its natural state and instead keeps moving between many. That does not make it useless. Disordered regions often carry binding motifs and sites where phosphate groups are added, and some fold only when they bind a partner. CFTR's R region, in the figure, is a good example: it is disordered, and adding phosphates to it is what switches the channel on. Predictors such as IUPred estimate disorder from sequence, and in AlphaFold models (Protein structure: from sequence to fold) disordered regions usually show up with low confidence scores.

These regions matter for interpretation. A domain search will report nothing in them, which can look like a gap in knowledge when it is really a different kind of protein part. They also explain why an experimental structure often covers only some of a protein: the disordered pieces do not hold still long enough to be seen.

Key point

Domains tell you a protein's main working parts; motifs are short clues that match often by chance. Read every pattern match in context: where it sits in the protein, and what the evidence says.

A second example: a phosphorylation motif predicts dozens of possible sites in a large protein. Sites in a disordered, exposed region that a kinase can reach are plausible; sites buried in the core of a folded domain are much less so. The same pattern, read with structure in mind, gives a far shorter and more useful list.

Further reading · Module 7InterPro documentation, including how Pfam is now served. · PROSITE and its ScanProsite search tool. · UniProt: programmatic access, the REST API used here. · All reading for this course

Check your understanding

1. A new protein has no close match to any known protein, but InterPro finds a kinase domain in it. What does this suggest?

2. The pattern N-{P}-[ST]-{P} matches 12 times in CFTR, but only 2 sites are glycosylated. What best explains the gap?

3. Why do search tools often mask low-complexity regions?

Up next

Lesson 3

Protein structure: from sequence to fold

Ask BioTutor

Create a free website with Framer, the website builder loved by startups, designers and agencies.