Class: BioRead

Retrieve sequence quality scores from object


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


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

Quality = getQuality(BioObj, Subset) returns quality strings 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 strings containing valid sequence headers

    Note:   If you use a cell array of header strings 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 strings 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 strings containing sequence headers.

Was this topic helpful?