getQuality
Retrieve sequence quality information from object
Description
Examples
Retrieve Sequence Quality Information
Store read data from a SAM-formatted file in a BioRead object.
br = BioRead('ex1.sam')
br = BioRead with properties: Quality: [1501x1 File indexed property] Sequence: [1501x1 File indexed property] Header: [1501x1 File indexed property] NSeqs: 1501 Name: ''
Retrieve sequence quality information.
seqQuals = getQuality(br);
Retrieve sequence quality information from the first and third elements in the object.
seqQuals2 = getQuality(br,[1 3])
seqQuals2 = 2x1 cell
{'<<<<<<<<<<<<<<<;<<<<<<<<<5<<<<<;:<;7'}
{'<<<<<<<<<<<7;71<<;<;;<7;<<3;);3*8/5' }
Use a logical vector to get the same information.
seqQuals3 = getQuality(br,[true false true])
seqQuals3 = 2x1 cell
{'<<<<<<<<<<<<<<<;<<<<<<<<<5<<<<<;:<;7'}
{'<<<<<<<<<<<7;71<<;<;;<7;<<3;);3*8/5' }
You can use a header to get the quality of the corresponding sequence with that header. If multiple sequences have the same header, the function returns the quality information of all those sequences.
Get the quality information of the sequences with the header B7_591:4:96:693:509.
seqQuals4 = getQuality(br,{'B7_591:4:96:693:509'})
seqQuals4 = 1x1 cell array
{'<<<<<<<<<<<<<<<;<<<<<<<<<5<<<<<;:<;7'}
Access each property of the object using the dot notation.
seqQuals = br.Quality; seqQuals2 = br.Quality([1 3])
seqQuals2 = 2x1 cell
{'<<<<<<<<<<<<<<<;<<<<<<<<<5<<<<<;:<;7'}
{'<<<<<<<<<<<7;71<<;<;;<7;<<3;);3*8/5' }
Input Arguments
subset
— Subset of elements in object
vector of positive integers | logical vector | string vector | cell array of character vectors
Subset of elements in the object, specified as a vector of positive integers, logical vector, string vector, or cell array of character vectors containing valid sequence headers.
Example: [1 3]
Tip
When you use a sequence header (or a cell array of headers) for subset
, a
repeated header specifies all elements with that header.
Output Arguments
quality
— Sequence quality information
cell array of character vectors
Sequence quality information, returned as a cell array of character vectors. Each character is an ASCII-encoded value of the log probability of a base being incorrect.
subsetQuality
— Sequence quality information for subset of elements
cell array of character vectors
Sequence quality information for a subset of elements from the object, returned as a cell array of character vectors.
Version History
Introduced in R2010a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)