Grade by Grade
D. Topics in Computer Science · Topics in Computer Science: Sustainability, Emerging Research and Careers

Computer Science Meets Other Fields: Interdisciplinary Research

D2.2About 70 minutes
Learning goals
  • I can explain what interdisciplinary research is and give examples that combine computer science with another field.
  • I can describe bioinformatics and computational linguistics and write simple Python programs for each.
  • I can describe how computing is used in health informatics, climatology, geology, economics, sociology and art.
  • I can explain why experts from both fields are needed in interdisciplinary work.

Words to know

interdisciplinary research
Research that combines the knowledge and methods of two or more fields to solve a problem neither could solve alone.
bioinformatics
Using computing to store, search and analyse biological data, such as DNA and protein sequences.
genome
All of an organism's DNA. The human genome has about 3 billion base pairs.
health informatics
Using computing to manage and analyse health information, such as electronic health records and medical images.
computational linguistics
Using computing to study and process human language, for example in translation, speech recognition and spell-checking.
motif
A short, meaningful pattern that appears in a DNA or protein sequence.
corpus
A large collection of texts used for studying language.

Computer science is a team player

Some of the most exciting computer science today does not happen in computer science departments alone. Biologists use it to read DNA, doctors use it to find tumours in scans, climate scientists use it to model the atmosphere, linguists use it to build translation tools, and artists use it to make new kinds of art. Research that combines two or more fields is called interdisciplinary research, and the curriculum asks you to understand it.

BioinformaticsDNA and proteinsHealth informaticspatient records, imagingClimatologyclimate modelsGeologyearthquake dataEconomicsmarket modelsSociologysocial networksArtgenerative art, restorationLinguisticstranslation, speechComputerscience
Computer science connects to almost every field. The curriculum gives these examples of interdisciplinary research.

Bioinformatics

DNA is written in an alphabet of four bases: A, C, G and T. The human genome is about 3 billion base pairs long. The international Human Genome Project, completed in 2003, produced the first reference sequence of the human genome. Storing and searching sequences like these is impossible by hand, so biology needed computer science.

To a programmer, a DNA sequence is a string. Many bioinformatics tasks are string tasks:

  • Counting: what fraction of bases are G or C (the GC content)?
  • Pairing: on the partner strand, A pairs with T and C with G, so the partner can be computed.
  • Searching: where does a pattern (a motif) occur? Which genes are similar in two species?

The same ideas power real tools that compare a new virus's genome to known ones, or find genetic variants linked to disease.

ATTAGCCGGCCGATTATAATGCCGstrandpartnerA pairs with T, and C pairs with GGC content of the top strand: 6 of 12 bases are G or C = 50%
DNA is two strands of bases. Each base pairs with a fixed partner, so a program can compute one strand from the other, which makes DNA a natural fit for string algorithms.
dna = "ATGCGCATTAGC"
gc = dna.count("G") + dna.count("C")
print("GC content:", round(100 * gc / len(dna), 1), "%")
pair = {"A": "T", "T": "A", "C": "G", "G": "C"}
comp = ""
for base in dna:
comp += pair[base]
print("Complement:", comp)
print("Reverse complement:", comp[::-1])
positions = [i for i in range(len(dna) - 1) if dna[i:i + 2] == "GC"]
print("GC found at positions:", positions)

Basic bioinformatics with strings: counting, complementing and searching for a short pattern (a motif). Output (one line each): GC content: 50.0 % / Complement: TACGCGTAATCG / Reverse complement: GCTAATGCGCAT / GC found at positions: [2, 4, 10]

Worked example

Example 1: GC content by hand

Find the GC content of the sequence GGCATTACGA and write its complement.

  1. Count G's: G, G, G (positions 1, 2 and 9): 3.
  2. Count C's: positions 3 and 8: 2.
  3. GC content = (3 + 2) ÷ 10 = 0.5 = 50%.
  4. Complement (A↔T, C↔G): G→C, G→C, C→G, A→T, T→A, T→A, A→T, C→G, G→C, A→T, giving CCGTAATGCT.

GC content 50%; complement CCGTAATGCT.

Computational linguistics

Computational linguistics studies human language with computers. Its tools are in your phone: spell-checkers, autocomplete, speech recognition, translation apps and AI chatbots. Researchers start with a corpus, a large collection of texts, and count things: which words are common, which words appear together, how sentences are built. These counts become the training data for language models (see the lesson Artificial Intelligence, Machine Learning and Data Mining).

Researchers also work on tools for languages that have little digital text. In Canada, this includes work with First Nations, Métis and Inuit communities on keyboards, dictionaries and learning apps for Indigenous languages, led or guided by the communities and speakers themselves.

text = "the snow fell and the wind blew and the snow kept falling"
counts = {}
for word in text.split():
counts[word] = counts.get(word, 0) + 1
top = sorted(counts.items(), key=lambda kv: (-kv[1], kv[0]))[:3]
print(top)

Word frequencies: the first step in many computational linguistics tools. Ties are broken alphabetically. Output: [('the', 3), ('and', 2), ('snow', 2)]

More interdisciplinary fields

  • Health informatics: electronic health records, systems that flag dangerous drug combinations, and computer analysis of medical images.
  • Climatology: climate models divide the atmosphere and oceans into a 3D grid and simulate how heat, air and water move, running on supercomputers (parallel computing again).
  • Geology: seismometers record ground motion; software locates earthquakes and helps model what is underground.
  • Economics: models and simulations of markets; analysis of huge financial data sets.
  • Sociology: social network analysis studies who is connected to whom, for example how information spreads online.
  • Art: generative art made by algorithms, computer animation and visual effects, and computer imaging that helps restore and study damaged paintings.

Why both experts are needed

A programmer who knows no biology might write a fast program that answers the wrong question. A biologist who can't program can't handle billions of bases. Interdisciplinary teams succeed because each member brings what the other lacks, and many people now train in both (for example in bioinformatics or computational linguistics programs).

Just for fun

Bioinformaticians have a reputation for very short jokes.

They only use four letters: A, C, G and T. (Luckily, four letters were enough to write the whole human genome: about 3 billion base pairs.)

Hands-on activity

Mini research lab: your own corpus

You need: a computer with Python and some text you are allowed to use: for example, a few pages of your own writing, song lyrics you write out, or a public-domain book chapter.

  1. Paste the text into a Python string (use triple quotes for several lines). Make it lowercase with .lower() and remove punctuation with .replace(",", "") and similar.
  2. Use the word-frequency program to list the 10 most common words.
  3. Remove very common words such as "the", "and", "a" (called stop words) and list the top 10 again. What do the new top words tell you about the text?
  4. Compare two texts (for example, two different authors). Which words are common in one but not the other?
  5. Write a paragraph: how could a historian, a teacher or a marketer use this kind of tool? What could it get wrong?

What to look for: working code, a sensible stop-word list, and a thoughtful paragraph that recognizes counting words is not the same as understanding meaning.

Your turn

1

What is interdisciplinary research?

2

Write the complement of ATTGCA.

3

Find the GC content of CCGA.

4

What does "GATTACA".count("A") return?

5

Give two everyday tools that come from computational linguistics.

6

How do climate models use computer science?

7

Why does an interdisciplinary team need experts from both fields?

More practice: warm-up

1

What four letters are used to write DNA?

2

In DNA, what pairs with C?

3

What is bioinformatics?

4

What is a corpus?

5

Name one way computers are used in art.

More practice: on your own

1

What is the reverse complement of GATC? What is special about it?

2

Using the word-frequency program, what would counts["wind"] be?

3

Find all positions of "AT" in ATGCGCATTAGC (start counting at 0).

4

A hospital wants software that warns doctors about dangerous drug combinations. Which two fields must work together, and what does each contribute?

5

Explain how social network analysis could help a public health team.

Challenge

1

Write a Python function gc_content(dna) that returns the GC percentage rounded to one decimal place and works for lowercase input too. What does gc_content("aaccg") return?

2

Modify the word-frequency program to count bigrams (pairs of neighbouring words). Which bigrams are most common in the sample text, and how many times do they appear?

3

Choose one field from this lesson and describe a research question that needs both that field and computer science. Name the data, the computing method and one difficulty.

Check your understanding

Quiz

1.

Which is an example of interdisciplinary research?

2.

What is the complement of the DNA sequence ACGT?

3.

What is the GC content of GGAT?

4.

Computational linguistics is most closely connected to:

5.

About how many base pairs are in the human genome?

6.

Why are experts from both fields needed in health informatics?

For parents and teachers

Big idea: Expectation D2.2 asks students to demonstrate an understanding of interdisciplinary research that combines computer science with fields such as bioinformatics, geology, economics, linguistics, health informatics, climatology, sociology and art.

How to help: Ask your teen how computing is used in your own work or a field they enjoy (sports statistics, music, medicine). Try the word-frequency program on a favourite book chapter or speech together.

Common difficulties:

  • Mixing up complement (swap each base) and reverse complement (swap, then reverse the order).
  • Python string positions start at 0.
  • Thinking computing replaces the other field's experts. It works alongside them.