This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Class: BioRead

Retrieve sequence quality scores from object


Quality = getQuality(BioObj)
Quality = getQuality(BioObj, Subset)


Quality = getQuality(BioObj) returns Quality, a cell array of character vectors containing the ASCII representations of per-base quality scores for nucleotide sequences from an object.

Quality = getQuality(BioObj, Subset) returns quality information for only object elements specified by Subset.

Input Arguments


Object of the BioRead or BioMap class.


One of the following to specify a subset of the elements in BioObj:

  • Vector of positive integers

  • Logical vector

  • Cell array of character vectors containing valid sequence headers


If you use a cell array of headers to specify Subset, be aware that a repeated header specifies all elements with that header.

Output Arguments


Quality property of a subset of elements in BioObj. Quality is a cell array of character vectors containing the quality scores for sequences specified by Subset.


Retrieve the quality scores from different elements of a BioRead object:

% Construct a BioRead object from a FASTQ file 
BRObj = BioRead('SRR005164_1_50.fastq');
% Retrieve the Quality value of the second element in the object
getQuality(BRObj, 2);
getQuality(BRObj, [false true false]);
% Retrieve the Quality values of the first and third elements
% in the object
getQuality(BRObj, [1 3]);
getQuality(BRObj, [true false true]);
% Retrieve the Quality value of all the elements in the object
getQuality(BRObj, 1:50);


An alternative to using the getQuality method is to use dot indexing with the Quality property:


In the previous syntax, Indices is a vector of positive integers or a logical vector. Indices cannot be a cell array of character vectors containing sequence headers.

Was this topic helpful?