Documentation Center

  • Trial Software
  • Product Updates

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

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

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.

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 strings containing sequence headers.

See Also

| |

How To

Related Links

Was this topic helpful?