Editing
AI for Genomics and Bioinformatics
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== <span style="color: #FFFFFF;">Applying</span> == '''Protein secondary structure prediction with a sequence transformer:''' <syntaxhighlight lang="python"> from transformers import AutoTokenizer, AutoModelForTokenClassification import torch # ESM-2: Facebook's protein language model # Fine-tuned for secondary structure prediction (Helix/Sheet/Coil per residue) tokenizer = AutoTokenizer.from_pretrained("facebook/esm2_t33_650M_UR50D") model = AutoModelForTokenClassification.from_pretrained( "facebook/esm2_t33_650M_UR50D", num_labels=3 # H (helix), E (sheet), C (coil) ) # Protein sequence protein = "MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQAPILSRVGDGTQDNLSGAEKAVQVKVKALPDAQFEVVHSLAKWKRQTLGQHDFSAGEGLYTHMKALRPDEDRLSPLHSVYVDQWDWERVMGDGERQFSTLKSTVEAIWAGIKATEAAVSEEFGLAPFLPDQIHFVHSQELLSRYPDLDAKGRERAIAKDLGAVFLVGIGGKLSDGHRHDVRAPDYDDWSTPSELGHAGLNGDILVWNPVLEDAFELSSMGIRVDADTLKHQLALTGDEDRLELEWHQALLRGEMPQTIGGGIGQSRLTMLLLQLPHIGQVQAGVWPAAVRESVPSLL" inputs = tokenizer(protein, return_tensors="pt") with torch.no_grad(): outputs = model(**inputs) predictions = outputs.logits.argmax(dim=-1)[0][1:-1] # Remove CLS/EOS labels = {0: "H", 1: "E", 2: "C"} structure = "".join([labels[p.item()] for p in predictions]) print(f"Sequence: {protein[:50]}...") print(f"Structure: {structure[:50]}...") # AlphaFold for full 3D structure (use via ColabFold for accessible inference) # from colabfold.run import run # run(queries=[("protein", protein)], result_dir="./structures/") </syntaxhighlight> ; Genomics AI tools and resources : '''Protein structure''' β AlphaFold2/3 (ColabFold for easy access), ESMFold, RoseTTAFold : '''Gene expression''' β Enformer (sequence β expression), Geneformer, scGPT : '''Variant interpretation''' β DeepVariant (variant calling), PrimateAI (pathogenicity) : '''CRISPR design''' β CRISPR-ML (off-target prediction), DeepCRISPR : '''Genomics pipelines''' β Bioconductor (R), Scanpy/Seurat (single-cell), GATK (variant calling) </div> <div style="background-color: #8B4500; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;">
Summary:
Please note that all contributions to BloomWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BloomWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information