Skip to content
Tutorials Center
My learning

Topics

Lesson 2 of 49 ยท Getting Started

Chapter 1 overview: getting started

Chapter 1 shows how biology becomes data: DNA, RNA and protein as strings, the genetic code, and the Python skills you need to analyze sequences.

Before you align a single sequence or build a single tree, you need two skills. You need to see a molecule as a piece of data, and you need to manipulate that data with code. This chapter gives you both. It is deliberately gentle: every later chapter assumes you can reverse-complement a strand, translate a gene, count k-mers and read a FASTA file without looking anything up.

Four cards showing a sample, a sequencer, a computer and an insight chart, linked by arrows labelled reads, FASTQ and plots
Caption: bioinformatics sits between the sequencer and the insight; it turns text from machines into answers about biology.

What you will learn

  • Why a DNA molecule can be treated as a string over a four-letter alphabet.
  • What the chapter's two content lessons cover and how they connect.
  • How the wet lab, the sequencer and your code fit into one workflow.

The big picture

Every bioinformatics project follows the same arc. A biologist collects a sample (blood, soil, leaf tissue, a bacterial culture). A sequencing machine converts the DNA or RNA in that sample into text: millions of short reads, each a string of A, C, G and T together with a quality score for every letter. Your job begins when the files arrive. You clean them, compare them with reference data, count things, build models and finally draw a conclusion that a biologist can test at the bench.

Two facts keep this arc manageable. First, the alphabet is tiny: four letters for DNA, four for RNA, twenty for proteins. Second, the questions repeat. "Where does this read come from?" is alignment. "How different are these two genomes?" is a distance. "How many copies of this gene are there?" is counting. Learn the small set of operations well and they apply everywhere.

Biology becomes text

DNA Strings of A, C, G, T
RNA Same, but U instead of T
Protein 20 amino acid letters
1 / 3

What each lesson covers

  1. DNA, RNA and protein as data turns the central dogma into code: complements, reverse complements, transcription, the codon table, reading frames and translation.
  2. Working with sequences in Python builds a small toolkit: counting, GC content, sliding windows, k-mers and a FASTA parser.
  3. Chapter 1 review pulls everything into one picture and a ten-question quiz.

How to use this chapter

Read the two content lessons in order, and run every example as you go. The first lesson gives you the biology as strings, and the second gives you the Python to manipulate them, so the second assumes the first. Keep a notebook (a plain text file is fine) where you paste your own versions of the functions: a reverse complement, a translator, a GC calculator and a k-mer counter. By the end of the chapter that notebook is a personal toolkit you will reuse in chapters 2 to 9.

A good test of understanding is to explain, without notes, why the reverse complement needs both steps, why a stretch of DNA has six reading frames, and why the last k-mer of a sequence starts at position L minus k. If you can explain those three things, the rest of the chapter will feel easy, because everything else is a variation on the same few string operations. If you cannot, reread the relevant lesson and trace a short example on paper before trying again.

Common misconceptions

  • "I need to be a biologist first." You need the vocabulary in this chapter, nothing more. Later chapters introduce each new biological idea when it is needed.
  • "I need to be a software engineer first." The programs here are short. Clear thinking matters more than clever syntax.

Try it

Python Alphabet sizes and information

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

From sample to insight, step by step

Check your understanding

Quick check ยท 3 questions

of 3 answered You scored / 3 ยท perfect!

  1. 1. Why is a DNA sequence convenient to treat as data?

    A four-letter alphabet makes DNA easy to store and process as a string.
  2. 2. Which step of the workflow is the main job of a bioinformatician?

    Bioinformatics begins when sequence files arrive and ends with an interpretable result.
  3. 3. A sequencing read is stored together with what extra information?

    FASTQ records pair each base with a quality score, which chapter 2 explains.

Summary

  • Biology becomes data when molecules are written as strings over small alphabets.
  • The same few operations (compare, count, align, model) apply across the whole field.
  • This chapter gives you the vocabulary (codons, frames, k-mers) and the Python toolkit for the rest of the course.

Next: DNA, RNA and protein as data