Make is flowchart form and give also easy point to understand in simple way. Give the short information about each main points and subpoints (2 to 3 points) At the end create image in JPG format
mkdir -p /home/daytona/workspace/protein-flowchart && ls /home/daytona/workspace/protein-flowchart/
~/protein-flowchart/flowchart.py
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from matplotlib.patches import FancyBboxPatch, FancyArrowPatch
fig, ax = plt.subplots(figsize=(28, 48))
ax.set_xlim(0, 28)
ax.set_ylim(0, 48)
ax.axis('off')
fig.patch.set_facecolor('#F0F4FF')
# ─── Helper functions ───────────────────────────────────────────────
def box(ax, x, y, w, h, text, fc='#2C3E7A', tc='white', fs=11, fw='bold',
style='round,pad=0.1', ec='#1A255A', lw=1.5, ha='center', va='center', wrap=False):
rect = FancyBboxPatch((x - w/2, y - h/2), w, h,
boxstyle=style, facecolor=fc, edgecolor=ec, linewidth=lw, zorder=3)
ax.add_patch(rect)
ax.text(x, y, text, color=tc, fontsize=fs, fontweight=fw,
ha=ha, va=va, zorder=4, wrap=wrap,
multialignment='center')
def arrow(ax, x1, y1, x2, y2, color='#555555'):
ax.annotate('', xy=(x2, y2), xytext=(x1, y1),
arrowprops=dict(arrowstyle='->', color=color, lw=2.0), zorder=2)
def info_box(ax, x, y, w, h, title, bullets, fc='#EAF4FB', tc='#1A3A6C', ts=9.5, bs=8.8):
rect = FancyBboxPatch((x - w/2, y - h/2), w, h,
boxstyle='round,pad=0.08', facecolor=fc, edgecolor='#7EB6D9', linewidth=1.2, zorder=3)
ax.add_patch(rect)
ax.text(x, y + h/2 - 0.22, title, color=tc, fontsize=ts, fontweight='bold',
ha='center', va='top', zorder=4)
for i, b in enumerate(bullets):
ax.text(x - w/2 + 0.18, y + h/2 - 0.55 - i*0.38, f'• {b}',
color='#333333', fontsize=bs, ha='left', va='top', zorder=4)
# ═══════════════════════════════════════════════════════
# TITLE
# ═══════════════════════════════════════════════════════
box(ax, 14, 47.0, 26, 0.9,
'A. Classification of Proteins by Physicochemical Properties',
fc='#1A3A6C', tc='white', fs=14, fw='bold', lw=2.5)
arrow(ax, 14, 46.55, 14, 45.95)
# ═══════════════════════════════════════════════════════
# THREE MAIN CATEGORIES
# ═══════════════════════════════════════════════════════
# 1. Simple Proteins
box(ax, 4.5, 45.5, 7.5, 0.75, '1. Simple Proteins', fc='#1976D2', tc='white', fs=12)
# 2. Conjugated Proteins
box(ax, 14, 45.5, 7.5, 0.75, '2. Conjugated Proteins', fc='#388E3C', tc='white', fs=12)
# 3. Derived Proteins
box(ax, 23.5, 45.5, 7.5, 0.75, '3. Derived Proteins', fc='#7B1FA2', tc='white', fs=12)
# connectors from title to 3 cats
ax.annotate('', xy=(4.5, 45.87), xytext=(14, 46.55),
arrowprops=dict(arrowstyle='->', color='#555', lw=1.8))
ax.annotate('', xy=(14, 45.87), xytext=(14, 45.95),
arrowprops=dict(arrowstyle='->', color='#555', lw=1.8))
ax.annotate('', xy=(23.5, 45.87), xytext=(14, 46.55),
arrowprops=dict(arrowstyle='->', color='#555', lw=1.8))
# ═══════════════════════════════════════════════════════
# ── 1. SIMPLE PROTEINS ──
# ═══════════════════════════════════════════════════════
# a) Globular
box(ax, 4.5, 44.6, 6.5, 0.65, 'a) Globular Proteins', fc='#42A5F5', tc='white', fs=10.5)
arrow(ax, 4.5, 45.12, 4.5, 44.93)
# info box for globular
info_box(ax, 4.5, 43.3, 6.8, 1.6,
'Globular Proteins',
['Soluble in water/salt solutions',
'Spherical/elliptical shape',
'e.g. Albumins, Globulins, Histones, Lectins'])
arrow(ax, 4.5, 44.27, 4.5, 44.1)
# sub-items globular
globular_items = ['i) Albumins', 'ii) Globulins', 'iii) Glutelins',
'iv) Prolamines', 'v) Protamines',
'vi) Histones', 'vii) Globins', 'viii) Lectins']
glob_descriptions = [
'Blood plasma protein;\nmaintains osmotic pressure',
'Immune proteins;\nmake antibodies',
'Plant storage proteins;\ne.g. wheat glutenin',
'Rich in proline;\nfound in cereal seeds',
'Small, basic proteins;\nbind nucleic acids',
'Bind DNA in nucleosomes;\nregulate gene expression',
'Oxygen-carrying proteins;\ne.g. hemoglobin subunits',
'Bind carbohydrates;\ncell recognition proteins',
]
start_y = 42.0
for i, (item, desc) in enumerate(zip(globular_items, glob_descriptions)):
cy = start_y - i * 1.2
box(ax, 3.2, cy, 4.5, 0.55, item, fc='#BBDEFB', tc='#1A3A6C', fs=9, fw='bold', ec='#90CAF9')
# description beside
ax.text(5.6, cy, desc, color='#333', fontsize=8, ha='left', va='center', zorder=4,
bbox=dict(boxstyle='round,pad=0.15', fc='#E3F2FD', ec='#90CAF9', lw=0.8))
if i == 0:
arrow(ax, 4.5, 42.42, 4.5, 42.27)
else:
arrow(ax, 3.2, cy + 0.575, 3.2, cy + 0.28)
# b) Fibrous
fib_y = start_y - len(globular_items)*1.2 - 0.3
box(ax, 4.5, fib_y, 6.5, 0.65, 'b) Fibrous Proteins', fc='#1565C0', tc='white', fs=10.5)
arrow(ax, 3.2, fib_y + 0.85, 3.2, fib_y + 0.33)
info_box(ax, 4.5, fib_y - 1.0, 6.8, 1.5,
'Fibrous Proteins',
['Insoluble, elongated shape',
'Structural/mechanical roles',
'e.g. Collagen, Elastin, Keratin'])
arrow(ax, 4.5, fib_y - 0.33, 4.5, fib_y - 0.25)
fibrous_items = [
('i) Collagen\n(connective tissue)',
'Most abundant protein;\nbone, skin, tendons'),
('ii) Elastin\n(connective tissue)',
'Elastic recoil in skin,\narteries, lungs'),
('iii) Keratin\n(ectodermal tissue)',
'Nails, hair, hoofs;\nprotective barrier'),
]
for j, (item, desc) in enumerate(fibrous_items):
cy = fib_y - 1.85 - j*1.15
box(ax, 3.2, cy, 4.5, 0.65, item, fc='#BBDEFB', tc='#1A3A6C', fs=8.5, fw='bold', ec='#90CAF9')
ax.text(5.6, cy, desc, color='#333', fontsize=8, ha='left', va='center', zorder=4,
bbox=dict(boxstyle='round,pad=0.15', fc='#E3F2FD', ec='#90CAF9', lw=0.8))
if j == 0:
arrow(ax, 4.5, fib_y - 1.25, 4.5, fib_y - 1.52)
else:
arrow(ax, 3.2, cy + 0.73, 3.2, cy + 0.33)
# ═══════════════════════════════════════════════════════
# ── 2. CONJUGATED PROTEINS ──
# ═══════════════════════════════════════════════════════
conj_items = [
('i) Nucleoproteins',
'Nucleohistones,\nnucleoprotamines;\nbind DNA/RNA'),
('ii) Glycoproteins',
'Mucins, Immunoglobulins,\nComplements;\ncell surface recognition'),
('iii) Mucoproteins\n(Mucoids)',
'Mucin (saliva), blood group\nsubstances, FSH, LH;\nhigh CHO content'),
('iv) Lipoproteins',
'LDL, VLDL, HDL;\ntransport fats in blood'),
('v) Phosphoproteins',
'Casein (milk), vitellin\n(egg yolk);\nstore phosphate'),
('vi) Chromoproteins',
'Hemoglobin, flavoproteins,\nrhodopsin;\ncolored prosthetic group'),
('vii) Metalloproteins',
'Ferritin (Fe),\nCeruloplasmin (Cu);\nbind metal ions'),
]
arrow(ax, 14, 45.12, 14, 44.55)
for k, (item, desc) in enumerate(conj_items):
cy = 44.2 - k * 1.55
box(ax, 12.5, cy, 5.0, 0.75, item, fc='#A5D6A7', tc='#1B5E20', fs=9, fw='bold', ec='#66BB6A')
ax.text(15.15, cy, desc, color='#333', fontsize=8, ha='left', va='center', zorder=4,
bbox=dict(boxstyle='round,pad=0.15', fc='#E8F5E9', ec='#81C784', lw=0.8))
if k == 0:
arrow(ax, 14, 44.55, 14, 44.58)
else:
arrow(ax, 12.5, cy + 0.78, 12.5, cy + 0.38)
# ═══════════════════════════════════════════════════════
# ── 3. DERIVED PROTEINS ──
# ═══════════════════════════════════════════════════════
arrow(ax, 23.5, 45.12, 23.5, 44.55)
# a) Primary Derived
box(ax, 23.5, 44.2, 6.5, 0.65, 'a) Primary Derived Proteins', fc='#CE93D8', tc='white', fs=10, fw='bold')
arrow(ax, 23.5, 44.55, 23.5, 44.53)
info_box(ax, 23.5, 43.1, 6.8, 1.5,
'Primary Derived',
['Formed by mild denaturation',
'Native structure slightly altered',
'e.g. Coagulated proteins, Proteans'])
arrow(ax, 23.5, 43.87, 23.5, 43.85)
prim_items = [
('i) Coagulated Proteins',
'Insoluble after heat/acid;\ne.g. boiled egg white'),
('ii) Proteans',
'First products of\nprotein hydrolysis;\nslightly insoluble'),
('iii) Metaproteins',
'Formed by strong acid/alkali;\nsoluble in weak acids/bases'),
]
for m, (item, desc) in enumerate(prim_items):
cy = 42.4 - m * 1.2
box(ax, 22.2, cy, 4.5, 0.65, item, fc='#F3E5F5', tc='#4A148C', fs=9, fw='bold', ec='#CE93D8')
ax.text(24.55, cy, desc, color='#333', fontsize=8, ha='left', va='center', zorder=4,
bbox=dict(boxstyle='round,pad=0.15', fc='#F3E5F5', ec='#CE93D8', lw=0.8))
if m == 0:
arrow(ax, 23.5, 43.35, 23.5, 42.73)
else:
arrow(ax, 22.2, cy + 0.73, 22.2, cy + 0.33)
# b) Secondary Derived
sec_y = 42.4 - len(prim_items)*1.2 - 0.5
box(ax, 23.5, sec_y, 6.5, 0.65, 'b) Secondary Derived Proteins', fc='#8E24AA', tc='white', fs=10, fw='bold')
arrow(ax, 22.2, sec_y + 0.9, 22.2, sec_y + 0.33)
info_box(ax, 23.5, sec_y - 1.0, 6.8, 1.5,
'Secondary Derived',
['Formed by prolonged hydrolysis',
'Smaller fragments than primary',
'e.g. Proteoses, Peptones, Peptides'])
arrow(ax, 23.5, sec_y - 0.33, 23.5, sec_y - 0.25)
sec_items = [
('i) Proteoses\n(Albumoses)',
'Large hydrolytic fragments;\nsoluble, coagulable'),
('ii) Peptones',
'Smaller than proteoses;\nnot coagulated by heat'),
('iii) Peptides',
'Hydrolytic products of peptones;\nshort amino acid chains'),
]
for n, (item, desc) in enumerate(sec_items):
cy = sec_y - 1.9 - n * 1.2
box(ax, 22.2, cy, 4.5, 0.75, item, fc='#F3E5F5', tc='#4A148C', fs=9, fw='bold', ec='#CE93D8')
ax.text(24.55, cy, desc, color='#333', fontsize=8, ha='left', va='center', zorder=4,
bbox=dict(boxstyle='round,pad=0.15', fc='#F3E5F5', ec='#CE93D8', lw=0.8))
if n == 0:
arrow(ax, 23.5, sec_y - 1.25, 23.5, sec_y - 1.52)
else:
arrow(ax, 22.2, cy + 0.78, 22.2, cy + 0.38)
# ═══════════════════════════════════════════════════════
# LEGEND
# ═══════════════════════════════════════════════════════
legend_y = 1.5
legend_items = [
('#1976D2', 'Simple Proteins'),
('#388E3C', 'Conjugated Proteins'),
('#7B1FA2', 'Derived Proteins'),
('#42A5F5', 'Sub-category'),
('#A5D6A7', 'Conjugated Sub-type'),
('#F3E5F5', 'Derived Sub-type'),
]
ax.text(1, legend_y + 0.7, 'Legend:', fontsize=10, fontweight='bold', color='#1A3A6C')
for li, (col, label) in enumerate(legend_items):
lx = 1 + (li % 3) * 8.5
ly = legend_y - (li // 3) * 0.55
rect = FancyBboxPatch((lx - 0.5, ly - 0.18), 0.9, 0.36,
boxstyle='round,pad=0.05', facecolor=col, edgecolor='#555', lw=0.8, zorder=3)
ax.add_patch(rect)
ax.text(lx + 0.6, ly, label, fontsize=8.5, va='center', color='#333')
# Footer
ax.text(14, 0.4, 'Classification of Proteins by Physicochemical Properties • Biochemistry Reference',
fontsize=9, ha='center', color='#888', style='italic')
plt.tight_layout(pad=0.5)
plt.savefig('/home/daytona/workspace/protein-flowchart/protein_classification_flowchart.jpg',
dpi=150, format='jpeg', bbox_inches='tight',
facecolor=fig.get_facecolor())
print("Saved successfully!")
cd /home/daytona/workspace/protein-flowchart && python flowchart.py 2>&1
Made of only amino acids — no extra components attached.
| Protein | Key Points |
|---|---|
| i) Albumins | Found in blood plasma; maintain osmotic pressure; most abundant serum protein |
| ii) Globulins | Make antibodies (immunoglobulins); found in blood and tissues |
| iii) Glutelins | Plant storage proteins (e.g., wheat glutenin); insoluble in water |
| iv) Prolamines | Rich in proline amino acid; found in cereal seeds (corn, wheat) |
| v) Protamines | Small, basic proteins; bind tightly to nucleic acids |
| vi) Histones | Wrap DNA in nucleosomes; regulate gene expression |
| vii) Globins | Subunits of hemoglobin; carry oxygen in red blood cells |
| viii) Lectins | Bind carbohydrates; involved in cell recognition and signaling |
| Protein | Key Points |
|---|---|
| i) Collagen | Most abundant protein in body; found in bone, skin, tendons |
| ii) Elastin | Provides elasticity to skin, arteries, and lungs |
| iii) Keratin | Found in nails, hair, hoofs; forms protective outer layer |
Proteins attached to a non-protein group (prosthetic group).
| Type | Prosthetic Group | Examples |
|---|---|---|
| i) Nucleoproteins | Nucleic acids (DNA/RNA) | Nucleohistones, nucleoprotamines |
| ii) Glycoproteins | Carbohydrates | Mucins, immunoglobulins, complements |
| iii) Mucoproteins | High carbohydrate (>4%) | Mucin (saliva), blood group substances, FSH, LH |
| iv) Lipoproteins | Lipids | LDL, VLDL, HDL — transport fats in blood |
| v) Phosphoproteins | Phosphoric acid | Casein (milk), vitellin (egg yolk) |
| vi) Chromoproteins | Colored prosthetic group | Hemoglobin, flavoproteins, rhodopsin |
| vii) Metalloproteins | Metal ions | Ferritin (Fe), Ceruloplasmin (Cu) |
Products of hydrolysis or denaturation of native proteins.
| Type | Key Points |
|---|---|
| i) Coagulated Proteins | Formed by heat/acid; e.g., boiled egg white |
| ii) Proteans | First products of hydrolysis; slightly insoluble |
| iii) Metaproteins | Formed by strong acid/alkali; soluble in weak acids/bases |
| Type | Key Points |
|---|---|
| i) Proteoses (Albumoses) | Large hydrolytic fragments; soluble but coagulable |
| ii) Peptones | Smaller than proteoses; not coagulated by heat |
| iii) Peptides | Hydrolytic products of peptones; short chains of amino acids |
protein classification flowchart
Image · JPG