MGHome page

GWAS course

Course map

0 of 64 steps done

Start with step 0.1Install R

Saved in this browser only.

Step 1.5

Module 1 · From DNA to array data · step 5 of 11

1.5Calling genotypes

Commands tested on Windows

In short

We read the data section of a laboratory report and display its first rows. We summarise the GC scores, which describe the quality of recorded DNA results, to see what information the report provides.

Do this

You should see: The columns are SNP Name, Sample ID, GC Score, Allele1 - Plus and Allele2 - Plus.

Command

Module setup, needed before this step

R: module setup

source("R/guided.R")cfg <- guided_init()

R command

Type or paste into the RStudio console.

1lines <- readLines(reports[1], warn = FALSE)start <- match("[Data]", lines)2example <- read.table(text = lines[(start + 1L):length(lines)], sep = ";", header = TRUE, quote = "", check.names = FALSE, colClasses = "character")3head(example)summary(as.numeric(example[["GC Score"]]))
  1. Note 1: Read the report and find where its data section begins.
  2. Note 2: Read the data as a table with semicolons separating its columns.
  3. Note 3: Show the first rows and summarise the quality scores as numbers.

You need

The example final reports from step 1.2.

What we do

Read the call and score columns, and do not treat the score as certainty.

Why

The calling algorithm compares the measured intensities with the expected clusters. The GC score (opens in a new tab) measures the quality of one call. It is not the probability that an association is true. It is not a p-value (opens in a new tab) either.

A no-call (opens in a new tab) is a site where the algorithm gave no genotype. It can come from a weak signal or from unclear clusters.

The example files use semicolons between columns and decimal points in numbers. This is on purpose. A character that separates columns is called a delimiter (opens in a new tab). Check the delimiter in the file. Do not change the language of your computer.

PLINK terminal equivalent. Optional: you do not need it for the course.

Not applicable: this step needs no PLINK command. The R chunk is the complete command.

R reads or calculates the displayed values without changing the genotype files.

Expected result

Show the expected result

The columns are SNP Name, Sample ID, GC Score, Allele1 - Plus and Allele2 - Plus. The examples are short excerpts of reports. They are not the full table of 299,523 sites for every person.

The tested PLINK version is defined in config.R and recorded in software_versions.txt. Validation: executable chunks passed on Windows with the supplied simulated dataset.

If something goes wrong

If something goes wrong

Stop at the first error. Check the named input and the previous step. Keep the command and console logs; do not substitute files from a different dataset version. See troubleshooting (opens in a new tab).

Quick check

Does GC Score = 0.9 mean a variant has a 90% chance of causing disease?

Show the answer

No. The score describes the quality of the genotype call. It says nothing about disease or association.

Files created

None.