MGHome page

GWAS course

Course map

0 of 64 steps done

Start with step 0.1Install R

Saved in this browser only.

Step 1.6

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

1.6Problems born in the laboratory

Commands tested on Windows

In short

We check that the sample sheet includes plate, well, sample and repeat-measurement labels, then display its first rows. These labels help us investigate laboratory problems during later checks.

Do this

You should see: The table has the information that you need to study batch membership and labelled replicates.

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.

1stopifnot(all(c("Plate", "Well", "Sample_ID", "Replicate_of") %in% names(sheet)))2head(sheet)
  1. Note 1: Check that the sheet contains the required laboratory labels.
  2. Note 2: Show the first rows to inspect the laboratory labels.

You need

The sample sheet and the score examples from steps 1.4 and 1.5.

What we do

Link laboratory problems to the quality-control checks of later modules.

Why

Little DNA in a well can cause many no-calls. Contamination, which means a mix with foreign DNA, can increase the number of heterozygous calls. A sample swap can make the recorded sex differ from the sex seen in the genotypes. It can also create duplicate samples with conflicting information.

A processing batch can affect many samples together. One pattern alone does not prove its cause. Keep the logs and ask the laboratory to confirm before you change any sample identity.

QC (opens in a new tab) means quality control. It is a set of checks that remove avoidable errors before the statistical tests.

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 table has the information that you need to study batch membership and labelled replicates. No person is removed in module 1.

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

If many samples from one plate have low call rates, what shared cause should you investigate before attributing the pattern to disease?

Show the answer

A processing or batch problem. A plate pattern suggests a shared laboratory cause, but it does not prove one.

Files created

None.