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

Installing the required software with Docker

Docker is the most widely used framework for implementing operating system-level virtualization. This technology allows you to have an independent container: a layer that is lighter than a virtual machine but still allows you to compartmentalize software. This mostly isolates all processes, making it feel like each container is a virtual machine. Containers will be discussed in more detail in Chapter 14, Cloud Basics.

Docker works quite well at both extremes of the development spectrum: it’s an expedient way to set up the content of this book for learning purposes and could become your platform of choice for deploying your applications in complex environments.

Conda and Docker are key tools to help maintain software compatibility and reproducibility across different systems and libraries. We’ll discuss reproducibility more in Chapter 15, Workflow Systems.

Note

This recipe is an alternative to the previous recipe. Normally, if you have a Mac and are using it for your Jupyter notebooks, you will not need the Docker container. If you have a Windows machine or cannot get certain code to work in your environment, the Docker container can be useful to provide you with an environment that is set up properly already for you.

Getting ready

The first thing you have to do is install Docker. Go to https://www.docker.com/. Install Docker Desktop for your appropriate operating system (remember to check the Apple versus Intel silicon discussion in the Technical requirements section if you are using macOS). You’ll also need to sign up for a Docker account and record your username and password.

How to do it...

Docker Desktop must be running and you need to be signed in before downloading the Docker file. To get started, follow these steps:

  1. Use the following command from your Terminal:
    docker build -t bio https://github.com/PacktPublishing/Bioinformatics-with-Python-Cookbook-Fourth-Edition.git#main:docker/main

Tip

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository. Doing so will help you avoid any potential errors related to the copying and pasting of code.

You can find the commands for this section in the chapter’s README.md file.

  1. Now you are ready to run the container, as follows:
    docker run -ti -p 9875:9875 -v YOUR_DIRECTORY:/data bio
  2. Replace YOUR_DIRECTORY with a directory on your operating system. This will be shared between your host operating system and the Docker container. YOUR_DIRECTORY will be seen in the container in /data and vice versa.

    In this case, -p 9875:9875 will expose the container’s TCP port 9875 on the host computer port, 9875.

    Especially on Windows (and maybe on macOS), make sure that your directory is actually visible inside the Docker shell environment. If not, check the official Docker documentation on how to expose directories. To access the Docker image while it’s running, hover over the Docker Desktop icon. All the files available in the book’s GitHub repository will be mirrored in the Docker image.

  3. Now you are ready to use the system. Point your browser to http://localhost:9875 and you should get the Jupyter environment.

If this does not work on Windows, check the official Docker documentation (https://docs.docker.com/manuals/) on how to expose ports.

See also

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 €18.99/month. Cancel anytime
Modal Close icon
Modal Close icon