OSCR

Cell-type-targeted mitochondrial transplantation rescues cell degeneration.

Code ↔ Paper

The paper beside its authors' code: matches between them have not been computed for this paper yet.

Paper

Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC

The paper is loaded when this pane is shown.

The authors' code

Jupyter notebook · 498 lines · 23 KB · MIT

  1. # %% [markdown]
  2. # <a href="https://colab.research.google.com/github/sokrypton/ColabFold/blob/main/AlphaFold2.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
  3. # %% [markdown]
  4. # <img src="https://raw.githubusercontent.com/sokrypton/ColabFold/main/.github/ColabFold_Marv_Logo_Small.png" height="200" align="right" style="height:240px">
  5. #
  6. # ##ColabFold v1.6.3: AlphaFold2 using MMseqs2
  7. #
  8. # Easy to use protein structure and complex prediction using [AlphaFold2](https://www.nature.com/articles/s41586-021-03819-2) and [Alphafold2-multimer](https://www.biorxiv.org/content/10.1101/2021.10.04.463034v1). Sequence alignments/templates are generated through [MMseqs2](mmseqs.com) and [HHsearch](https://github.com/soedinglab/hh-suite). For more details, see <a href="#Instructions">bottom</a> of the notebook, checkout the [ColabFold GitHub](https://github.com/sokrypton/ColabFold) and [Nature Protocols](https://www.nature.com/articles/s41596-024-01060-5).
  9. #
  10. # Old versions: [v1.4](https://colab.research.google.com/github/sokrypton/ColabFold/blob/v1.4.0/AlphaFold2.ipynb), [v1.5.1](https://colab.research.google.com/github/sokrypton/ColabFold/blob/v1.5.1/AlphaFold2.ipynb), [v1.5.2](https://colab.research.google.com/github/sokrypton/ColabFold/blob/v1.5.2/AlphaFold2.ipynb), [v1.5.3-patch](https://colab.research.google.com/github/sokrypton/ColabFold/blob/56c72044c7d51a311ca99b953a71e552fdc042e1/AlphaFold2.ipynb)
  11. #
  12. # [Mirdita M, Schütze K, Moriwaki Y, Heo L, Ovchinnikov S, Steinegger M. ColabFold: Making protein folding accessible to all.
  13. # *Nature Methods*, 2022](https://www.nature.com/articles/s41592-022-01488-1)
  14. # %%
  15. #@title Input protein sequence(s), then hit `Runtime` -> `Run all`
  16. from google.colab import files
  17. import os
  18. import re
  19. import hashlib
  20. import random
  21. def add_hash(x,y):
  22. return x+"_"+hashlib.sha1(y.encode()).hexdigest()[:5]
  23. query_sequence = 'PIAQIHILEGRSDEQKETLIREVSEAISRSLDAPLTSVRVIITEMAKGHFGIGGELASK' #@param {type:"string"}
  24. #@markdown - Use `:` to specify inter-protein chainbreaks for **modeling complexes** (supports homo- and hetro-oligomers). For example **PI...SK:PI...SK** for a homodimer
  25. jobname = 'test' #@param {type:"string"}
  26. # number of models to use
  27. num_relax = 0 #@param [0, 1, 5] {type:"raw"}
  28. #@markdown - specify how many of the top ranked structures to relax using amber
  29. template_mode = "none" #@param ["none", "pdb100","custom"]
  30. #@markdown - `none` = no template information is used. `pdb100` = detect templates in pdb100 (see [notes](#pdb100)). `custom` - upload and search own templates (PDB or mmCIF format, see [notes](#custom_templates))
  31. use_amber = num_relax > 0
  32. # remove whitespaces
  33. query_sequence = "".join(query_sequence.split())
  34. basejobname = "".join(jobname.split())
  35. basejobname = re.sub(r'\W+', '', basejobname)
  36. jobname = add_hash(basejobname, query_sequence)
  37. # check if directory with jobname exists
  38. def check(folder):
  39. if os.path.exists(folder):
  40. return False
  41. else:
  42. return True
  43. if not check(jobname):
  44. n = 0
  45. while not check(f"{jobname}_{n}"): n += 1
  46. jobname = f"{jobname}_{n}"
  47. # make directory to save results
  48. os.makedirs(jobname, exist_ok=True)
  49. # save queries
  50. queries_path = os.path.join(jobname, f"{jobname}.csv")
  51. with open(queries_path, "w") as text_file:
  52. text_file.write(f"id,sequence\n{jobname},{query_sequence}")
  53. if template_mode == "pdb100":
  54. use_templates = True
  55. custom_template_path = None
  56. elif template_mode == "custom":
  57. custom_template_path = os.path.join(jobname,f"template")
  58. os.makedirs(custom_template_path, exist_ok=True)
  59. uploaded = files.upload()
  60. use_templates = True
  61. for fn in uploaded.keys():
  62. os.rename(fn,os.path.join(custom_template_path,fn))
  63. else:
  64. custom_template_path = None
  65. use_templates = False
  66. print("jobname",jobname)
  67. print("sequence",query_sequence)
  68. print("length",len(query_sequence.replace(":","")))
  69. # %%
  70. #@title Install dependencies
  71. %%time
  72. import os
  73. USE_AMBER = use_amber
  74. EXTRAS = "alphafold-minus-jax,openmm" if USE_AMBER else "alphafold-minus-jax"
  75. OPENMM = ""
  76. if USE_AMBER:
  77. from importlib.metadata import distributions
  78. installed = {d.metadata["Name"] for d in distributions()}
  79. for cuda in ("cuda13", "cuda12"):
  80. if f"jax-{cuda}-plugin" in installed:
  81. OPENMM = f" 'openmm[{cuda}]'"
  82. break
  83. READY = "COLABFOLD_AMBER_READY" if USE_AMBER else "COLABFOLD_READY"
  84. if not os.path.isfile(READY):
  85. print("installing colabfold...")
  86. os.system(f"pip install -q --no-warn-conflicts 'colabfold[{EXTRAS}] @ git+https://github.com/sokrypton/ColabFold'{OPENMM}")
  87. if os.environ.get('TPU_NAME', False) != False:
  88. os.system("pip uninstall -y jax jaxlib")
  89. os.system("pip install --no-warn-conflicts --upgrade dm-haiku==0.0.10 'jax[cuda12_pip]'==0.3.25 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html")
  90. os.system("ln -s /usr/local/lib/python3.*/dist-packages/colabfold colabfold")
  91. os.system("ln -s /usr/local/lib/python3.*/dist-packages/alphafold alphafold")
  92. os.system(f"touch {READY}")
  93. # %%
  94. #@markdown ### MSA options (custom MSA upload, single sequence, pairing mode)
  95. msa_mode = "mmseqs2_uniref_env" #@param ["mmseqs2_uniref_env", "mmseqs2_uniref","single_sequence","custom"]
  96. pair_mode = "unpaired_paired" #@param ["unpaired_paired","paired","unpaired"] {type:"string"}
  97. #@markdown - "unpaired_paired" = pair sequences from same species + unpaired MSA, "unpaired" = seperate MSA for each chain, "paired" - only use paired sequences.
  98. # decide which a3m to use
  99. if "mmseqs2" in msa_mode:
  100. a3m_file = os.path.join(jobname,f"{jobname}.a3m")
  101. elif msa_mode == "custom":
  102. a3m_file = os.path.join(jobname,f"{jobname}.custom.a3m")
  103. if not os.path.isfile(a3m_file):
  104. custom_msa_dict = files.upload()
  105. custom_msa = list(custom_msa_dict.keys())[0]
  106. header = 0
  107. import fileinput
  108. for line in fileinput.FileInput(custom_msa,inplace=1):
  109. if line.startswith(">"):
  110. header = header + 1
  111. if not line.rstrip():
  112. continue
  113. if line.startswith(">") == False and header == 1:
  114. query_sequence = line.rstrip()
  115. print(line, end='')
  116. os.rename(custom_msa, a3m_file)
  117. queries_path=a3m_file
  118. print(f"moving {custom_msa} to {a3m_file}")
  119. else:
  120. a3m_file = os.path.join(jobname,f"{jobname}.single_sequence.a3m")
  121. with open(a3m_file, "w") as text_file:
  122. text_file.write(">1\n%s" % query_sequence)
  123. # %%
  124. #@markdown ### Advanced settings
  125. model_type = "auto" #@param ["auto", "alphafold2_ptm", "alphafold2_multimer_v1", "alphafold2_multimer_v2", "alphafold2_multimer_v3", "deepfold_v1", "alphafold2"]
  126. #@markdown - if `auto` selected, will use `alphafold2_ptm` for monomer prediction and `alphafold2_multimer_v3` for complex prediction.
  127. #@markdown Any of the mode_types can be used (regardless if input is monomer or complex).
  128. num_recycles = "3" #@param ["auto", "0", "1", "3", "6", "12", "24", "48"]
  129. #@markdown - if `auto` selected, will use `num_recycles=20` if `model_type=alphafold2_multimer_v3`, else `num_recycles=3` .
  130. recycle_early_stop_tolerance = "auto" #@param ["auto", "0.0", "0.5", "1.0"]
  131. #@markdown - if `auto` selected, will use `tol=0.5` if `model_type=alphafold2_multimer_v3` else `tol=0.0`.
  132. relax_max_iterations = 200 #@param [0, 200, 2000] {type:"raw"}
  133. #@markdown - max amber relax iterations, `0` = unlimited (AlphaFold2 default, can take very long)
  134. pairing_strategy = "greedy" #@param ["greedy", "complete"] {type:"string"}
  135. #@markdown - `greedy` = pair any taxonomically matching subsets, `complete` = all sequences have to match in one line.
  136. calc_extra_ptm = False #@param {type:"boolean"}
  137. #@markdown - return pairwise chain iptm/actifptm
  138. use_fast_kernels = False #@param {type:"boolean"}
  139. #@markdown - use fused kernels for faster prediction (experimental)
  140. #@markdown #### Sample settings
  141. #@markdown - enable dropouts and increase number of seeds to sample predictions from uncertainty of the model.
  142. #@markdown - decrease `max_msa` to increase uncertainity
  143. max_msa = "auto" #@param ["auto", "512:1024", "256:512", "64:128", "32:64", "16:32"]
  144. num_seeds = 1 #@param [1,2,4,8,16] {type:"raw"}
  145. use_dropout = False #@param {type:"boolean"}
  146. num_recycles = None if num_recycles == "auto" else int(num_recycles)
  147. recycle_early_stop_tolerance = None if recycle_early_stop_tolerance == "auto" else float(recycle_early_stop_tolerance)
  148. if max_msa == "auto": max_msa = None
  149. #@markdown #### Save settings
  150. save_all = False #@param {type:"boolean"}
  151. save_recycles = False #@param {type:"boolean"}
  152. save_to_google_drive = False #@param {type:"boolean"}
  153. #@markdown - if the save_to_google_drive option was selected, the result zip will be uploaded to your Google Drive
  154. dpi = 200 #@param {type:"integer"}
  155. #@markdown - set dpi for image resolution
  156. if save_to_google_drive:
  157. from pydrive2.drive import GoogleDrive
  158. from pydrive2.auth import GoogleAuth
  159. from google.colab import auth
  160. from oauth2client.client import GoogleCredentials
  161. auth.authenticate_user()
  162. gauth = GoogleAuth()
  163. gauth.credentials = GoogleCredentials.get_application_default()
  164. drive = GoogleDrive(gauth)
  165. print("You are logged into Google Drive and are good to go!")
  166. #@markdown Don't forget to hit `Runtime` -> `Run all` after updating the form.
  167. # %%
  168. #@title Run Prediction
  169. display_images = True #@param {type:"boolean"}
  170. import sys
  171. import warnings
  172. warnings.simplefilter(action='ignore', category=FutureWarning)
  173. from Bio import BiopythonDeprecationWarning
  174. warnings.simplefilter(action='ignore', category=BiopythonDeprecationWarning)
  175. from pathlib import Path
  176. from colabfold.download import download_alphafold_params, default_data_dir
  177. from colabfold.utils import setup_logging
  178. from colabfold.batch import get_queries, run, set_model_type
  179. from colabfold.plot import plot_msa_v2
  180. import os
  181. import numpy as np
  182. try:
  183. K80_chk = os.popen('nvidia-smi | grep "Tesla K80" | wc -l').read()
  184. except:
  185. K80_chk = "0"
  186. pass
  187. if "1" in K80_chk:
  188. print("WARNING: found GPU Tesla K80: limited to total length < 1000")
  189. if "TF_FORCE_UNIFIED_MEMORY" in os.environ:
  190. del os.environ["TF_FORCE_UNIFIED_MEMORY"]
  191. if "XLA_PYTHON_CLIENT_MEM_FRACTION" in os.environ:
  192. del os.environ["XLA_PYTHON_CLIENT_MEM_FRACTION"]
  193. from colabfold.colabfold import plot_protein
  194. from pathlib import Path
  195. import matplotlib.pyplot as plt
  196. def input_features_callback(input_features):
  197. if display_images:
  198. plot_msa_v2(input_features)
  199. plt.show()
  200. plt.close()
  201. def prediction_callback(protein_obj, length,
  202. prediction_result, input_features, mode):
  203. model_name, relaxed = mode
  204. if not relaxed:
  205. if display_images:
  206. fig = plot_protein(protein_obj, Ls=length, dpi=150)
  207. plt.show()
  208. plt.close()
  209. result_dir = jobname
  210. log_filename = os.path.join(jobname,"log.txt")
  211. setup_logging(Path(log_filename))
  212. queries, is_complex = get_queries(queries_path)
  213. model_type = set_model_type(is_complex, model_type)
  214. if "multimer" in model_type and max_msa is not None:
  215. use_cluster_profile = False
  216. else:
  217. use_cluster_profile = True
  218. download_alphafold_params(model_type, Path("."))
  219. results = run(
  220. queries=queries,
  221. result_dir=result_dir,
  222. use_templates=use_templates,
  223. custom_template_path=custom_template_path,
  224. num_relax=num_relax,
  225. msa_mode=msa_mode,
  226. model_type=model_type,
  227. num_models=5,
  228. num_recycles=num_recycles,
  229. relax_max_iterations=relax_max_iterations,
  230. recycle_early_stop_tolerance=recycle_early_stop_tolerance,
  231. num_seeds=num_seeds,
  232. use_dropout=use_dropout,
  233. use_fast_kernels=use_fast_kernels,
  234. model_order=[1,2,3,4,5],
  235. is_complex=is_complex,
  236. data_dir=Path("."),
  237. keep_existing_results=False,
  238. rank_by="auto",
  239. pair_mode=pair_mode,
  240. pairing_strategy=pairing_strategy,
  241. stop_at_score=float(100),
  242. prediction_callback=prediction_callback,
  243. dpi=dpi,
  244. zip_results=False,
  245. save_all=save_all,
  246. max_msa=max_msa,
  247. use_cluster_profile=use_cluster_profile,
  248. input_features_callback=input_features_callback,
  249. save_recycles=save_recycles,
  250. user_agent="colabfold/google-colab-main",
  251. calc_extra_ptm=calc_extra_ptm,
  252. )
  253. results_zip = f"{jobname}.result.zip"
  254. os.system(f"zip -r {results_zip} {jobname}")
  255. # %%
  256. #@title Display 3D structure {run: "auto"}
  257. import py3Dmol
  258. import glob
  259. import matplotlib.pyplot as plt
  260. from colabfold.colabfold import plot_plddt_legend
  261. from colabfold.colabfold import pymol_color_list, alphabet_list
  262. rank_num = 1 #@param ["1", "2", "3", "4", "5"] {type:"raw"}
  263. color = "lDDT" #@param ["chain", "lDDT", "rainbow"]
  264. show_sidechains = False #@param {type:"boolean"}
  265. show_mainchains = False #@param {type:"boolean"}
  266. tag = results["rank"][0][rank_num - 1]
  267. jobname_prefix = ".custom" if msa_mode == "custom" else ""
  268. pdb_filename = f"{jobname}/{jobname}{jobname_prefix}_unrelaxed_{tag}.pdb"
  269. pdb_file = glob.glob(pdb_filename)
  270. def show_pdb(rank_num=1, show_sidechains=False, show_mainchains=False, color="lDDT"):
  271. model_name = f"rank_{rank_num}"
  272. view = py3Dmol.view(js='https://3dmol.org/build/3Dmol.js',)
  273. view.addModel(open(pdb_file[0],'r').read(),'pdb')
  274. if color == "lDDT":
  275. view.setStyle({'cartoon': {'colorscheme': {'prop':'b','gradient': 'roygb','min':50,'max':90}}})
  276. elif color == "rainbow":
  277. view.setStyle({'cartoon': {'color':'spectrum'}})
  278. elif color == "chain":
  279. chains = len(queries[0][1]) + 1 if is_complex else 1
  280. for n,chain,color in zip(range(chains),alphabet_list,pymol_color_list):
  281. view.setStyle({'chain':chain},{'cartoon': {'color':color}})
  282. if show_sidechains:
  283. BB = ['C','O','N']
  284. view.addStyle({'and':[{'resn':["GLY","PRO"],'invert':True},{'atom':BB,'invert':True}]},
  285. {'stick':{'colorscheme':f"WhiteCarbon",'radius':0.3}})
  286. view.addStyle({'and':[{'resn':"GLY"},{'atom':'CA'}]},
  287. {'sphere':{'colorscheme':f"WhiteCarbon",'radius':0.3}})
  288. view.addStyle({'and':[{'resn':"PRO"},{'atom':['C','O'],'invert':True}]},
  289. {'stick':{'colorscheme':f"WhiteCarbon",'radius':0.3}})
  290. if show_mainchains:
  291. BB = ['C','O','N','CA']
  292. view.addStyle({'atom':BB},{'stick':{'colorscheme':f"WhiteCarbon",'radius':0.3}})
  293. view.zoomTo()
  294. return view
  295. show_pdb(rank_num, show_sidechains, show_mainchains, color).show()
  296. if color == "lDDT":
  297. plot_plddt_legend().show()
  298. # %%
  299. #@title Plots {run: "auto"}
  300. from IPython.display import display, HTML
  301. import base64
  302. from html import escape
  303. # see: https://stackoverflow.com/a/53688522
  304. def image_to_data_url(filename):
  305. ext = filename.split('.')[-1]
  306. prefix = f'data:image/{ext};base64,'
  307. with open(filename, 'rb') as f:
  308. img = f.read()
  309. return prefix + base64.b64encode(img).decode('utf-8')
  310. pae = ""
  311. pae_file = os.path.join(jobname,f"{jobname}{jobname_prefix}_pae.png")
  312. if os.path.isfile(pae_file):
  313. pae = image_to_data_url(pae_file)
  314. cov = image_to_data_url(os.path.join(jobname,f"{jobname}{jobname_prefix}_coverage.png"))
  315. plddt = image_to_data_url(os.path.join(jobname,f"{jobname}{jobname_prefix}_plddt.png"))
  316. display(HTML(f"""
  317. <style>
  318. img {{
  319. float:left;
  320. }}
  321. .full {{
  322. max-width:100%;
  323. }}
  324. .half {{
  325. max-width:50%;
  326. }}
  327. @media (max-width:640px) {{
  328. .half {{
  329. max-width:100%;
  330. }}
  331. }}
  332. </style>
  333. <div style="max-width:90%; padding:2em;">
  334. <h1>Plots for {escape(jobname)}</h1>
  335. { '<!--' if pae == '' else '' }<img src="{pae}" class="full" />{ '-->' if pae == '' else '' }
  336. <img src="{cov}" class="half" />
  337. <img src="{plddt}" class="half" />
  338. </div>
  339. """))
  340. # %%
  341. #@title Package and download results
  342. #@markdown If you are having issues downloading the result archive, try disabling your adblocker and run this cell again. If that fails click on the little folder icon to the left, navigate to file: `jobname.result.zip`, right-click and select \"Download\" (see [screenshot](https://pbs.twimg.com/media/E6wRW2lWUAEOuoe?format=jpg&name=small)).
  343. if msa_mode == "custom":
  344. print("Don't forget to cite your custom MSA generation method.")
  345. files.download(f"{jobname}.result.zip")
  346. if save_to_google_drive == True and drive:
  347. uploaded = drive.CreateFile({'title': f"{jobname}.result.zip"})
  348. uploaded.SetContentFile(f"{jobname}.result.zip")
  349. uploaded.Upload()
  350. print(f"Uploaded {jobname}.result.zip to Google Drive with ID {uploaded.get('id')}")
  351. # %% [markdown]
  352. # # Instructions <a name="Instructions"></a>
  353. # For detailed instructions, tips and tricks, see recently published paper at [Nature Protocols](https://www.nature.com/articles/s41596-024-01060-5)
  354. #
  355. # **Quick start**
  356. # 1. Paste your protein sequence(s) in the input field.
  357. # 2. Press "Runtime" -> "Run all".
  358. # 3. The pipeline consists of 5 steps. The currently running step is indicated by a circle with a stop sign next to it.
  359. #
  360. # **Result zip file contents**
  361. #
  362. # 1. PDB formatted structures sorted by avg. pLDDT and complexes are sorted by pTMscore. (unrelaxed and relaxed if `use_amber` is enabled).
  363. # 2. Plots of the model quality.
  364. # 3. Plots of the MSA coverage.
  365. # 4. Parameter log file.
  366. # 5. A3M formatted input MSA.
  367. # 6. A `predicted_aligned_error_v1.json` using [AlphaFold-DB's format](https://alphafold.ebi.ac.uk/faq#faq-7) and a `scores.json` for each model which contains an array (list of lists) for PAE, a list with the average pLDDT and the pTMscore.
  368. # 7. BibTeX file with citations for all used tools and databases.
  369. #
  370. # At the end of the job a download modal box will pop up with a `jobname.result.zip` file. Additionally, if the `save_to_google_drive` option was selected, the `jobname.result.zip` will be uploaded to your Google Drive.
  371. #
  372. # **MSA generation for complexes**
  373. #
  374. # For the complex prediction we use unpaired and paired MSAs. Unpaired MSA is generated the same way as for the protein structures prediction by searching the UniRef100 and environmental sequences three iterations each.
  375. #
  376. # The paired MSA is generated by searching the UniRef100 database and pairing the best hits sharing the same NCBI taxonomic identifier (=species or sub-species). We only pair sequences if all of the query sequences are present for the respective taxonomic identifier.
  377. #
  378. # **Using a custom MSA as input**
  379. #
  380. # To predict the structure with a custom MSA (A3M formatted): (1) Change the `msa_mode`: to "custom", (2) Wait for an upload box to appear at the end of the "MSA options ..." box. Upload your A3M. The first fasta entry of the A3M must be the query sequence without gaps.
  381. #
  382. # It is also possilbe to provide custom MSAs for complex predictions. Read more about the format [here](https://github.com/sokrypton/ColabFold/issues/76).
  383. #
  384. # As an alternative for MSA generation the [HHblits Toolkit server](https://toolkit.tuebingen.mpg.de/tools/hhblits) can be used. After submitting your query, click "Query Template MSA" -> "Download Full A3M". Download the A3M file and upload it in this notebook.
  385. #
  386. # **PDB100** <a name="pdb100"></a>
  387. #
  388. # As of 23/06/08, we have transitioned from using the PDB70 to a 100% clustered PDB, the PDB100. The construction methodology of PDB100 differs from that of PDB70.
  389. #
  390. # The PDB70 was constructed by running each PDB70 representative sequence through [HHblits](https://github.com/soedinglab/hh-suite) against the [Uniclust30](https://uniclust.mmseqs.com/). On the other hand, the PDB100 is built by searching each PDB100 representative structure with [Foldseek](https://github.com/steineggerlab/foldseek) against the [AlphaFold Database](https://alphafold.ebi.ac.uk).
  391. #
  392. # To maintain compatibility with older Notebook versions and local installations, the generated files and API responses will continue to be named "PDB70", even though we're now using the PDB100.
  393. #
  394. # **Using custom templates** <a name="custom_templates"></a>
  395. #
  396. # To predict the structure with a custom template (PDB or mmCIF formatted): (1) change the `template_mode` to "custom" in the execute cell and (2) wait for an upload box to appear at the end of the "Input Protein" box. Select and upload your templates (multiple choices are possible).
  397. #
  398. # * Templates must follow the four letter PDB naming with lower case letters.
  399. #
  400. # * Templates in mmCIF format must contain `_entity_poly_seq`. An error is thrown if this field is not present. The field `_pdbx_audit_revision_history.revision_date` is automatically generated if it is not present.
  401. #
  402. # * Templates in PDB format are automatically converted to the mmCIF format. `_entity_poly_seq` and `_pdbx_audit_revision_history.revision_date` are automatically generated.
  403. #
  404. # If you encounter problems, please report them to this [issue](https://github.com/sokrypton/ColabFold/issues/177).
  405. #
  406. # **Comparison to the full AlphaFold2 and AlphaFold2 Colab**
  407. #
  408. # This notebook replaces the homology detection and MSA pairing of AlphaFold2 with MMseqs2. For a comparison against the [AlphaFold2 Colab](https://colab.research.google.com/github/deepmind/alphafold/blob/main/notebooks/AlphaFold.ipynb) and the full [AlphaFold2](https://github.com/deepmind/alphafold) system read our [paper](https://www.nature.com/articles/s41592-022-01488-1).
  409. #
  410. # **Troubleshooting**
  411. # * Check that the runtime type is set to GPU at "Runtime" -> "Change runtime type".
  412. # * Try to restart the session "Runtime" -> "Factory reset runtime".
  413. # * Check your input sequence.
  414. #
  415. # **Known issues**
  416. # * Google Colab assigns different types of GPUs with varying amount of memory. Some might not have enough memory to predict the structure for a long sequence.
  417. # * Your browser can block the pop-up for downloading the result file. You can choose the `save_to_google_drive` option to upload to Google Drive instead or manually download the result file: Click on the little folder icon to the left, navigate to file: `jobname.result.zip`, right-click and select \"Download\" (see [screenshot](https://pbs.twimg.com/media/E6wRW2lWUAEOuoe?format=jpg&name=small)).
  418. #
  419. # **Limitations**
  420. # * Computing resources: Our MMseqs2 API can handle ~20-50k requests per day.
  421. # * MSAs: MMseqs2 is very precise and sensitive but might find less hits compared to HHblits/HMMer searched against BFD or MGnify.
  422. # * We recommend to additionally use the full [AlphaFold2 pipeline](https://github.com/deepmind/alphafold).
  423. #
  424. # **Description of the plots**
  425. # * **Number of sequences per position** - We want to see at least 30 sequences per position, for best performance, ideally 100 sequences.
  426. # * **Predicted lDDT per position** - model confidence (out of 100) at each position. The higher the better.
  427. # * **Predicted Alignment Error** - For homooligomers, this could be a useful metric to assess how confident the model is about the interface. The lower the better.
  428. #
  429. # **Bugs**
  430. # - If you encounter any bugs, please report the issue to https://github.com/sokrypton/ColabFold/issues
  431. #
  432. # **License**
  433. #
  434. # The source code of ColabFold is licensed under [MIT](https://raw.githubusercontent.com/sokrypton/ColabFold/main/LICENSE). Additionally, this notebook uses the AlphaFold2 source code and its parameters licensed under [Apache 2.0](https://raw.githubusercontent.com/deepmind/alphafold/main/LICENSE) and [CC BY 4.0](https://creativecommons.org/licenses/by-sa/4.0/) respectively. Read more about the AlphaFold license [here](https://github.com/deepmind/alphafold).
  435. #
  436. # **Acknowledgments**
  437. # - We thank the AlphaFold team for developing an excellent model and open sourcing the software.
  438. #
  439. # - [KOBIC](https://kobic.re.kr) and [Söding Lab](https://www.mpinat.mpg.de/soeding) for providing the computational resources for the MMseqs2 MSA server.
  440. #
  441. # - Richard Evans for helping to benchmark the ColabFold's Alphafold-multimer support.
  442. #
  443. # - [David Koes](https://github.com/dkoes) for his awesome [py3Dmol](https://3dmol.csb.pitt.edu/) plugin, without whom these notebooks would be quite boring!
  444. #
  445. # - Do-Yoon Kim for creating the ColabFold logo.
  446. #
  447. # - A colab by Sergey Ovchinnikov ([@sokrypton](https://twitter.com/sokrypton)), Milot Mirdita ([@milot_mirdita](https://twitter.com/milot_mirdita)) and Martin Steinegger ([@thesteinegger](https://twitter.com/thesteinegger)).

AlphaFold2.ipynb at commit efbf31c, under MIT · at the source

Overview

Authors: Temurkhan Ayupov1,2, Verónica Moreno-Juan1, Serena Curtoni1, Alex Fratzl1, Upnishad Sharma3, Susana Posada-Céspedes1, Ramona Ratiu1, Rei Morikawa1, Alexandra Graff Meyer4, Margherita Pezzoli5, Glenn Bantug5, Morgan Chevalier1, Yanyan Hou1, Sarah A Nadeau1, Álvaro Herrero-Navarro1, Vikram Ayinampudi1, Elizabeth Kastanaki1, Natasha Whitehead1, Rebecca A Siwicki1, Mariana M Ribeiro1
and 9 other authorsJi Hoon Han1,2, Annalisa Bucci1, Christoph Hess5,6, Simone Picelli1, Magdalena Renner1, Daniel J Müller3, Cameron S Cowan1, Simon Hansen1, Botond Roska1,2
  1. Institute of Molecular and Clinical Ophthalmology Basel, Basel, Switzerland
  2. Department of Ophthalmology, University of Basel, Basel, Switzerland
  3. Department of Biosystems Science and Engineering, ETH Zürich, Basel, Switzerland
  4. Facility for Advanced Imaging and Microscopy, Friedrich Miescher Institute for Biomedical Research, Basel, Switzerland
  5. Immunobiology Laboratory, Department of Biomedicine, University of Basel and University Hospital of Basel, Basel, Switzerland
  6. Cambridge Institute of Therapeutic Immunology & Infectious Disease (CITIID), Department of Medicine, University of Cambridge, Cambridge, UK
Institutions: University of Basel (Switzerland); Institute of Molecular and Clinical Ophthalmology Basel (Switzerland); ETH Zurich (Switzerland); Friedrich Miescher Institute (Switzerland); University Hospital of Basel (Switzerland); University of Cambridge (United Kingdom)
Journal: Nature, volume 653, issue 8113, pages 221-231
Dates: received 9 July 2024; accepted 10 March 2026; published online 15 April 2026; in print 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1038/s41586-026-10391-0 · PMID 41986718 · PMCID PMC13149334 · OpenAlex W7154507844
Open access: hybrid, a free copy (OpenAlex)
Status: code verified
Categories: human (organism), mouse (organism), cellular / molecular (subfield)
Methods: Spectral & time-frequency, Statistics, Evoked potentials, fMRI & imaging, Single-unit activity, calcium imaging, Physiology & signal measures
Keywords: Mitochondria, Neurodegeneration
MeSH: Mitochondria*, Animals, Cytosol, Endothelial Cells, Female, Humans, Male, Mice, Mice, Inbred C57BL, Mitochondrial Dynamics, Neurons, Retina (* major topic)
Topic: Mitochondrial Function and Pathology (Molecular Biology, Biochemistry, Genetics and Molecular Biology), according to OpenAlex
Funding: European Research Council (883781); Swiss National Science Foundation (141801, 182523)
Citations: cited by 16 papers (Europe PMC); 99 references in the paper

Abstract

The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.

Repositories

Its files are read in the Code ↔ Paper reader above.

sokrypton/colabfold

License: MIT
State: the link answers, verified on 27 September 2026
Evidence: files inventoried
Commit: efbf31c37cedb38cd09c69c1b991910a9866480e, 19 September 2026
Languages: Python (29), Jupyter (27), Shell (6)
Size: 122 files, 62 scripts
Software Heritage: not archived
Found in: the text, “AlphaFold2 and AlphaFold3 predictions”
Holds: README, license file, environment (Dockerfile, poetry.lock, pyproject.toml), tests, continuous integration, 27 notebooks
Not found: CITATION.cff, documentation
Tools: NumPy (32 files), Matplotlib (24 files), JAX (16 files), PyTorch (8 files), Biopython (7 files), TensorFlow (5 files), SciPy (4 files), PyTorch Lightning (3 files), pandas (3 files), scikit-learn (3 files), PyTorch Geometric (1 file), RDKit (1 file)
Availability: 1 check, the latest on 27 September 2026: the link answers
  • 27 September 2026: the link answers
64 files

alphafoldserver.com

License: none: the authors keep all their rights
State: the link answers, verified on 29 September 2026
Evidence: the link answers
Software Heritage: not checked
Found in: the text, “AlphaFold2 and AlphaFold3 predictions”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 29 September 2026: the link answers (HTTP 200)
  • 29 September 2026: the link answers (HTTP 200)
At the source: alphafoldserver.com/

Zenodo 17909630

License: CC-BY-NC-4.0
State: the link answers, verified on 29 September 2026
Evidence: files inventoried
Size: 5 files
Software Heritage: not checked
Found in: “Code availability”
Not found: README, license file, CITATION.cff, environment file, tests, continuous integration, documentation
Availability: 1 check, the latest on 29 September 2026: the link answers (HTTP 200)
  • 29 September 2026: the link answers (HTTP 200)
At the source:

Code availability statement

The paper has a code availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

  • it points to the authors' code: Zenodo 17909630
  • it says that the code is available on request

Read it in the paper: doi.org/10.1038/s41586-026-10391-0.

Tracing map

Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.

What the map holds:

  • 3 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
  • 62 scripts, each with its path and the digest of its content;
  • no match between paragraphs and code yet;
  • neither the text of the paper nor the code itself.

Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.

Data

Datasets cited

Data availability statement

The paper has a data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1038/s41586-026-10391-0.

Versions

The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.

Version 1, 29 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 29 authors, 2 keywords, 12 MeSH terms, 2 funders, 94 references.

Cite

This paper

Ayupov, T., Moreno-Juan, V., Curtoni, S., Fratzl, A., Sharma, U., Posada-Céspedes, S., Ratiu, R., Morikawa, R., Meyer, A. G., Pezzoli, M., Bantug, G., Chevalier, M., Hou, Y., Nadeau, S. A., Herrero-Navarro, Á., Ayinampudi, V., Kastanaki, E., Whitehead, N., Siwicki, R. A., . . . Roska, B. (2026). Cell-type-targeted mitochondrial transplantation rescues cell degeneration. Nature, 653(8113), 221-231. https://doi.org/10.1038/s41586-026-10391-0

BibTeX

@article{ayupov2026cell,
author = {Ayupov, Temurkhan and Moreno-Juan, Verónica and Curtoni, Serena and Fratzl, Alex and Sharma, Upnishad and Posada-Céspedes, Susana and Ratiu, Ramona and Morikawa, Rei and Meyer, Alexandra Graff and Pezzoli, Margherita and Bantug, Glenn and Chevalier, Morgan and Hou, Yanyan and Nadeau, Sarah A and Herrero-Navarro, Álvaro and Ayinampudi, Vikram and Kastanaki, Elizabeth and Whitehead, Natasha and Siwicki, Rebecca A and Ribeiro, Mariana M and Han, Ji Hoon and Bucci, Annalisa and Hess, Christoph and Picelli, Simone and Renner, Magdalena and Müller, Daniel J and Cowan, Cameron S and Hansen, Simon and Roska, Botond},
title = {{Cell-type-targeted mitochondrial transplantation rescues cell degeneration}},
journal = {Nature},
year = {2026},
month = apr,
volume = {653},
number = {8113},
pages = {221--231},
publisher = {Nature Portfolio},
issn = {0028-0836},
doi = {10.1038/s41586-026-10391-0},
url = {https://doi.org/10.1038/s41586-026-10391-0},
pmid = {41986718},
pmcid = {PMC13149334}
}

RIS

TY - JOUR
AU - Ayupov, Temurkhan
AU - Moreno-Juan, Verónica
AU - Curtoni, Serena
AU - Fratzl, Alex
AU - Sharma, Upnishad
AU - Posada-Céspedes, Susana
AU - Ratiu, Ramona
AU - Morikawa, Rei
AU - Meyer, Alexandra Graff
AU - Pezzoli, Margherita
AU - Bantug, Glenn
AU - Chevalier, Morgan
AU - Hou, Yanyan
AU - Nadeau, Sarah A
AU - Herrero-Navarro, Álvaro
AU - Ayinampudi, Vikram
AU - Kastanaki, Elizabeth
AU - Whitehead, Natasha
AU - Siwicki, Rebecca A
AU - Ribeiro, Mariana M
AU - Han, Ji Hoon
AU - Bucci, Annalisa
AU - Hess, Christoph
AU - Picelli, Simone
AU - Renner, Magdalena
AU - Müller, Daniel J
AU - Cowan, Cameron S
AU - Hansen, Simon
AU - Roska, Botond
TI - Cell-type-targeted mitochondrial transplantation rescues cell degeneration
T2 - Nature
J2 - Nature
PY - 2026
DA - 2026/04/15
VL - 653
IS - 8113
SP - 221
EP - 231
SN - 0028-0836
PB - Nature Portfolio
DO - 10.1038/s41586-026-10391-0
UR - https://doi.org/10.1038/s41586-026-10391-0
LA - en
ER -

CSL-JSON

{
"id": "10.1038/s41586-026-10391-0",
"type": "article-journal",
"title": "Cell-type-targeted mitochondrial transplantation rescues cell degeneration",
"container-title": "Nature",
"author": [
{
"family": "Ayupov",
"given": "Temurkhan"
},
{
"family": "Moreno-Juan",
"given": "Verónica"
},
{
"family": "Curtoni",
"given": "Serena"
},
{
"family": "Fratzl",
"given": "Alex"
},
{
"family": "Sharma",
"given": "Upnishad"
},
{
"family": "Posada-Céspedes",
"given": "Susana"
},
{
"family": "Ratiu",
"given": "Ramona"
},
{
"family": "Morikawa",
"given": "Rei"
},
{
"family": "Meyer",
"given": "Alexandra Graff"
},
{
"family": "Pezzoli",
"given": "Margherita"
},
{
"family": "Bantug",
"given": "Glenn"
},
{
"family": "Chevalier",
"given": "Morgan"
},
{
"family": "Hou",
"given": "Yanyan"
},
{
"family": "Nadeau",
"given": "Sarah A"
},
{
"family": "Herrero-Navarro",
"given": "Álvaro"
},
{
"family": "Ayinampudi",
"given": "Vikram"
},
{
"family": "Kastanaki",
"given": "Elizabeth"
},
{
"family": "Whitehead",
"given": "Natasha"
},
{
"family": "Siwicki",
"given": "Rebecca A"
},
{
"family": "Ribeiro",
"given": "Mariana M"
},
{
"family": "Han",
"given": "Ji Hoon"
},
{
"family": "Bucci",
"given": "Annalisa"
},
{
"family": "Hess",
"given": "Christoph"
},
{
"family": "Picelli",
"given": "Simone"
},
{
"family": "Renner",
"given": "Magdalena"
},
{
"family": "Müller",
"given": "Daniel J"
},
{
"family": "Cowan",
"given": "Cameron S"
},
{
"family": "Hansen",
"given": "Simon"
},
{
"family": "Roska",
"given": "Botond"
}
],
"container-title-short": "Nature",
"volume": "653",
"issue": "8113",
"page": "221-231",
"DOI": "10.1038/s41586-026-10391-0",
"PMID": "41986718",
"PMCID": "PMC13149334",
"ISSN": "0028-0836",
"publisher": "Nature Portfolio",
"URL": "https://doi.org/10.1038/s41586-026-10391-0",
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
15
]
]
}
}

The tracing map gets a citation of its own once an author has validated it and it has a DOI.

Similar papers

The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.

[1] doi:10.3390/ijms27156614 [code]
Candidalysin Inhibits &lt;i&gt;Porphyromonas gingivalis&lt;/i&gt; Lipoprotein-Induced IL-1β Production in BV-2 Microglia via Hydrophobic Microbial Interactions.
Journal: International journal of molecular sciences
In common: RDKit, JAX, PyTorch Lightning, 9 other tools, mouse, cellular / molecular, 1 reference
[2] doi:10.1038/s41598-026-53415-5 [code]
Computational design and immunoinformatics validation of a T cell multi-epitope vaccine targeting glioblastoma stem cells.
Journal: Scientific reports
In common: RDKit, JAX, PyTorch Lightning, 9 other tools, cellular / molecular, 1 reference
[3] doi:10.1021/acs.biochem.5c00596 [code]
Cargo Recognition of Nesprin-2 by the Dynein Adapter Bicaudal D2 for a Nuclear Positioning Pathway That Is Important for Brain Development.
Journal: Biochemistry
In common: RDKit, JAX, PyTorch Lightning, 9 other tools, cellular / molecular, 1 reference
[4] doi:10.1038/s42003-026-10957-8 [code]
Brain defence by the extracellular matrix protein Cochlin.
Journal: Communications biology
In common: RDKit, JAX, PyTorch Lightning, 8 other tools, mouse, cellular / molecular
[5] doi:10.1016/j.molcel.2026.07.006 [code]
DeorphaNN: Virtual screening of GPCR peptide agonists using AlphaFold-predicted active-state complexes and deep learning embeddings.
Journal: Molecular cell
In common: JAX, Biopython, PyTorch Geometric, 7 other tools, cellular / molecular, 2 references
[6] doi:10.1016/j.xcrm.2026.102904 [code]
High-dose furmonertinib as first-line treatment for untreated EGFR-mutated advanced NSCLC with central nervous system metastases: A phase 2 trial.
Journal: Cell reports. Medicine
In common: PyTorch Lightning, Biopython, PyTorch, 4 other tools, 3 references
[7] doi:10.1038/s41467-026-75444-4 [code]
Structural insights enable drug discovery for the neuronal NBCn2 carbonate transporter.
Journal: Nature communications
In common: RDKit, JAX, Biopython, 4 other tools, mouse, cellular / molecular, 1 reference
[8] doi:10.1038/s41467-026-72130-3 [code]
Retinoic acid drives cell fate specification, maturation and retinal regionality in human retinal organoids.
Journal: Nature communications
In common: PyTorch, SciPy, Matplotlib, 1 other tool, 5 references
[9] doi:10.1021/acsomega.5c09368 [code]
Structure-Based and AI-Assisted Identification of AGPS Inhibitors for Glioma via Integrated Docking, Molecular Dynamics, and Binding Affinity Screening.
Journal: ACS omega
In common: RDKit, Biopython, PyTorch Geometric, 6 other tools
[10] doi:10.1523/eneuro.0362-25.2026 [code]
Similarities between &lt;i&gt;Ciona&lt;/i&gt; Dorsal Motor Ganglion and Vertebrate Cerebellum: Did a Chordate Ancestor Already Show D/V Subdivision within a Hindbrain Precursor?
Journal: eNeuro
In common: PyTorch Lightning, Biopython, PyTorch Geometric, 6 other tools

Contribute

The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.

Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.

Request its removal

To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).

Discussion, reproductions, activity

Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.

Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.

Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.