1 of 25

Lecture 4

QUALITY CONTROL

2 of 25

https://usegalaxy.eu/

https://usegalaxy.org.au/

  1. Creating a new history

Click the new-history icon at the top of the history panel.

If the new-history is missing:

Click on the galaxy-gear icon (History options) on the top of the history panel

Select the option Create New from the menu

  1. Renaming a history

Click on galaxy-pencil (Edit) next to the history name (which by default is “Unnamed history”)

Type the new name

Click on Save

If you do not have the galaxy-pencil (Edit) next to the history name:

Click on Unnamed history (or the current name of the history) (Click to rename history) at the top of your history panel

Type the new name

Press Enter

3 of 25

Import 

1. Select genome solexa.fasta, illumina.fastq, solexa.fastq and import them into

your current history.

With the respectively type of data fasta , fastqIllumina and fastqsolexa

2. https://zenodo.org/record/3977236/files/female_oral2.fastq-4143.gz

Copy the link location

Click galaxy-upload Upload Data at the top of the tool panel

Select galaxy-wf-edit Paste/Fetch Data

Paste the link(s) into the text field

Press Start

Close the window

4 of 25

Import data from a data library

Go into Shared data (top panel) then Data libraries

Navigate to the correct folder as indicated by your instructor.

On most Galaxies tutorial data will be provided in a folder named GTN - Material –> Topic Name -> Tutorial Name.

Select the desired files

Click on Add to History galaxy-dropdown near the top and select as Datasets from the dropdown menu

In the pop-up window, choose

“Select history”: the history you want to import the data to (or create a new one)

Click on Import

5 of 25

A FASTQ file has four line-separated fields per sequence:

  • Field 1 begins with a '@' character and is followed by a sequence identifier and an optional description (like a FASTA title line).
  • Field 2 is the raw sequence letters.
  • Field 3 begins with a '+' character and is optionally followed by the same sequence identifier (and any description) again.
  • Field 4 encodes the quality values for the sequence in Field 2, and must contain the same number of symbols as letters in the sequence.

A FASTQ file containing a single sequence might look like this:

6 of 25

@SEQ_ID

GATTTGGGGTTCAAAGCAGTATCGATCAAATAGTAAATCCATTTGTTCAACTCACAGTTT

+

!''*((((***+))%%%++)(%%%%).1***-+*''))**55CCF>>>>>>CCCCCCC65

It means that the fragment named @SEQ_ID corresponds to the DNA sequence

GATTTGGGGTTCAAAGCAGTATCGATCAAATAGTAAATCCATTTGTTCAACTCACAGTTT

with a quality

!''*((((***+))%%%++)(%%%%).1***-+*''))**55CCF>>>>>>CCCCCCC65

7 of 25

To save space, the sequencer records an ASCII character to represent scores

0-42. For example 10 corresponds to “+” and 40 corresponds to “I”.

FastQC knows how to translate this. This is often called “Phred” scoring.

8 of 25

So there is an ASCII character associated with each nucleotide, representing its 

Phred quality score, the probability of an incorrect base call:

Phred Quality Score

Probability of incorrect base call

Base call accuracy

10

1 in 10

90%

20

1 in 100

99%

30

1 in 1000

99.9%

40

1 in 10,000

99.99%

50

1 in 100,000

99.999%

60

1 in 1,000,000

99.9999%

9 of 25

FastQC

Load the FastQC tool (section : NGS: QC and manipulation)

-> FastQC: Read Quality reports

Choose illumina.fastq file as input and execute.

http://www.bioinformatics.babraham.ac.uk/projects/

10 of 25

The tool produces a basic text and a HTML output file that contain all of the results, including the following:

  • Basic Statistics
  • Per base sequence quality
  • Per sequence quality scores
  • Per base sequence content
  • Per base GC content
  • Per sequence GC content
  • Per base N content
  • Sequence Length Distribution
  • Sequence Duplication Levels
  • Overrepresented sequences
  • Kmer Content

11 of 25

Basic Statistics

    • Sequence length: will be important in setting maximum k-mer size value for assembly.
    • Encoding: The quality encoding type is important for quality trimming software.
    • % GC: high GC organisms don’t tend to assemble well and may have an uneven read coverage distribution.
    • Total sequences: Total number of reads: gives you an idea of coverage.

12 of 25

Per base sequence quality

For each position, a boxplot is drawn with:

  • the median value, represented by the central red line
  • the inter-quartile range (25-75%), represented by the yellow box
  • the 10% and 90% values in the upper and lower whiskers
  • the mean quality, represented by the blue line

13 of 25

Per tile sequence quality

14 of 25

Per sequence quality scores

15 of 25

Per base sequence content

16 of 25

Per sequence GC content

17 of 25

Sequence length distribution

18 of 25

Sequence Duplication Levels

19 of 25

Over-represented sequences

20 of 25

Homework

get acquainted with the description of sequences of good and bad quality on the site http://www.bioinformatics.babraham.ac.uk/projects/fastqc/

21 of 25

Download data from the "Training Materials" folder, as shown in the lecture.

Download data from the link https://zenodo.org/record/3977236/files/female_oral2.fastq-4143.gz, as shown in the lecture.

Load data from the library, as shown in the lecture.

22 of 25

A. In what format should the data be uploaded for analysis in FastqC?

1. fasta

2. sam

3. fastq

4. Bed

B. In basic statistics we get information about the quality of reads

  1. Yes
  2. No

C. What is shown in the “Per tile sequence quality” window

  1. the inter-quartile range (25-75%)
  2. average hourly readsmedian reading quality
  3. loss of quality associated with only one part of the flow cell
  4. median reading quality

23 of 25

E. The average quality score of Illumina sequencers decreases in the first:

  1. first 1-2 bases
  2. first 5-7 bases
  3. first 1-10 bases
  4. last 5 bases
  5. last 10 bases

F. Which graph shows the average quality score over the entire length of all reads?

1. Per sequence quality scores

2. Per tile sequence quality

3. Sequence length distribution

4. Over-represented sequences

J. In which window can you trace possible contamination of the sample?

  1. Basic statistics
  2. Sequence Duplication Levels
  3. Per sequence GC content
  4. Sequence length distribution

24 of 25

K. What is shown in the window “Over-represented sequences”?

  1. that a single sequence is very over-represented
  2. degree of duplication for every sequence in a library
  3. GC content for all reads

L. The result of the analysis of work in the program is presented

1. one file

  1. two files
  2. HTML files
  3. Row data

25 of 25

Homework

Analyze the downloaded data using the program and describe the results obtained