Documentation

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.

getQuality

Class: BioRead

Retrieve sequence quality scores from object

Syntax

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

Description

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

BioObj

Object of the BioRead or BioMap class.

Subset

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

    Note:   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

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.

Examples

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);

Alternatives

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

BioObj.Quality(Indices)

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?