Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Bioinformatics with Python Cookbook

You're reading from   Bioinformatics with Python Cookbook Solve advanced computational biology problems and build production pipelines with Python and AI tools

Arrow left icon
Product type Paperback
Published in Dec 2025
Publisher Packt
ISBN-13 9781836642756
Length 618 pages
Edition 4th Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Shane Brubaker Shane Brubaker
Author Profile Icon Shane Brubaker
Shane Brubaker
Arrow right icon
View More author details
Toc

Table of Contents (22) Chapters Close

Preface 1. Chapter 1: Computer Specifications and Python Setup 2. Chapter 2: Basics of Data Manipulation FREE CHAPTER 3. Chapter 3: Modern Coding Practices and AI-Generated Coding 4. Chapter 4: Data Science and Graphing 5. Chapter 5: Alignment and Variant Calling 6. Chapter 6: Annotation and Biological Interpretation 7. Chapter 7: Genomes and Genome Assembly 8. Chapter 8: Accessing Public Databases 9. Chapter 9: Protein Structure and Proteomics 10. Chapter 10: Phylogenetics 11. Chapter 11: Population Genetics 12. Chapter 12: Metabolic Modeling and Other Applications 13. Chapter 13: Genome Editing 14. Chapter 14: Cloud Basics 15. Chapter 15: Workflow Systems 16. Chapter 16: More Workflow Systems 17. Chapter 17: Deep Learning and LLMs for Nucleic Acid and Protein Design 18. Chapter 18: Single-Cell Technology and Imaging 19. Chapter 19: Unlock Your Exclusive Benefits 20. Index 21. Other Books You May Enjoy

Read alignment

Next, let’s look at building a little more sophisticated example using ChatGPT. In this recipe, we will write code to align two reads together, a common bioinformatics task.

A core algorithm in bioinformatics is alignment. This is the task of taking two or more sequences and seeing how the sequences can optimally line up with each other. Alignment is used in many bioinformatics tasks – for example, to see how different species may relate to each other (phylogenetics), how proteins may have evolved, or to take many sequencing reads and align them to a reference to do variant calling.

How to do it...

Here are the steps to try this recipe:

  1. Go into ChatGPT and get ready to give it the following prompt: Write an example that aligns two DNA sequences.
  2. This will write example code that uses Biopython’s Bio.Align module. The code will work; however, we notice that it uses the pairwise2 algorithm. When you paste this code into your notebook...
lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Bioinformatics with Python Cookbook
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Modal Close icon
Modal Close icon