Quality statistics from a short-read sequence file
BioReadQualityStatistics class contains
quality statistics data from short-read sequences and provides a standard
set of quality control plots for such data.
from short-read sequence data stored in FASTQ, SAM, or BAM files.
Perform data quality analyses using the object's methods to
generate several quality control plots regarding average quality
score for each base position, average quality score distribution,
read count percentage for each base position, percentage of GC nucleotides
for each base position, GC content distribution, and all nucleotide
distribution. The object lets you parse a sequence file without creating
BioRead object and interact with the quality
data in order to compare different data sets or filtering options
and create customized plots.
QSObj = BioReadQualityStatistics(
BioReadQualityStatistics object, from the data
File, a FASTQ-, SAM-, or BAM-formatted
QSObj = BioReadQualityStatistics(___,
using options specified by one or more name-value pair arguments.
Once created, you cannot modify the properties of
Character vector specifying a FASTQ file. You can also include the path or folder location of the file.
Specify optional comma-separated pairs of
Name is the argument
Value is the corresponding
Name must appear
inside single quotes (
You can specify several name and value pair
arguments in any order as
'Encoding'— Encoding format
Encoding format, specified as
'Solexa'. It is the format that is used for
characters encoding sequence information and quality scores in a FASTQ
'FilterLength'— Number of characters
(default) | positive integer
Number of characters, specified as a positive integer, from each read to be used. No filtering is applied if you use an empty array, which is the default value.
'QualityScoreThreshold'— Average quality threshold
-Inf(default) | real number
Average quality threshold, specified as a real number. Any read with an average score of less than the specified threshold is ignored.
Name of a file used to create
Type of file from which a
Character vector specifying the format of the character encoding
sequence information and quality scores in the file. Supported formats
Integer specifying ASCII code where the quality score begins for a sequence.
Integer representing the number of short-read sequences
Integer representing maximum length of a short-read sequence
among all sequences of
Integer specifying minimum Phred quality score  among
all short-read sequences of a
Integer specifying maximum Phred quality score among all short-read
sequences of a
Integer specifying the number of Phred scores that are not considered in the quality score range.
Vector of integers representing average quality distribution per sequence.
s-by-p matrix of integers that represent quality scores (s) per base positions (p).
Vector of integers representing the distribution of GC nucleotides per sequence.
n-by-p matrix of integers that represents distribution of all nucleotides (n = 5) per base position (p).
Character vector describing the user-defined name for the object.
Integer representing maximum sequence quality score among all scores.
Integer representing minimum sequence quality score among all scores.
Positive integer specifying the length of each read used in quality analysis.
Scalar value specifying minimum average quality threshold for
a read. Any read with an average score of less than the specified
threshold is ignored. The default value is
Vector of integers specifying the index for subset of information from the original sequence data used in analysis.
|plotPerPositionCountByQuality||Plot fractions of reads with Phred scores in ranges|
|plotPerPositionGC||Plot percentages of G or C nucleotides at each base position|
|plotPerPositionQuality||Plot Phred score distributions|
|plotPerSequenceGC||Plot G or C nucleotide distribution|
|plotPerSequenceQuality||Plot distribution of average quality scores|
|plotSummary||Plot summary statistics of a BioReadQualityStatistics object|
|plotTotalGC||Plot distribution of all nucleotides of short-read sequences|
This example shows how to create a BioReadQualityStatistics object and plot summary statistics of it.
Create a BioReadQualityStatistics object from a FASTQ file using only the first 40 characters of each read with a minimum average quality score of 5.
QSObj = BioReadQualityStatistics('SRR005164_1_50.fastq', 'FilterLength',... 40, 'QualityScoreThreshold', 5)
QSObj = BioReadQualityStatistics with properties: FileName: '/mathworks/devel/bat/Bdoc16b/build/matlab/t...' FileType: 'FASTQ' Encoding: 'Illumina18' CharOffset: 33 NumberOfReads: 50 MaxReadLength: 40 MinEncodingPhred: 0 MaxEncodingPhred: 62 SkipPhred:  PerSeqAverageQualityDist: [1×62 double] PerPosQualities: [63×40 double] PerSeqGCDist: [0 0 0 0 3 3 8 5 9 7 6 5 2 2 0 0 0 0 0 0] PerPosBaseDist: [5×40 double] Name: '' MaxScore: 34 MinScore: 1 FilterLength: 40 QualityScoreThreshold: 5 Subset: NaN
Plot the summary statistics of the object.
ans = 0.0013 1.0013 2.0013 3.0013 4.0013 5.0013
 Wikipedia. (2012). Phred quality score, http://en.wikipedia.org/wiki/Phred_quality_score