fastqread
Read data from FASTQ file
Syntax
FASTQStruct
= fastqread(File
)
[Header
, Sequence
]
= fastqread(File
)
[Header
, Sequence
, Qual
]
= fastqread(File
)
fastqread(..., 'Blockread', BlockreadValue
,
...)
fastqread(..., 'HeaderOnly', HeaderOnlyValue
,
...)
fastqread(..., 'TrimHeaders', TrimHeadersValue
,
...)
Description
reads
a FASTQ-formatted file and returns the data in a MATLAB® array
of structures.FASTQStruct
= fastqread(File
)
[
returns only
the header and sequence data in two separate variables.Header
, Sequence
]
= fastqread(File
)
[
returns the
data in three separate variables.Header
, Sequence
, Qual
]
= fastqread(File
)
fastqread(..., '
calls PropertyName
', PropertyValue
,
...)fastqread
with optional properties
that use property name/property value pairs. You can specify one or
more properties in any order. Enclose each PropertyName
in
single quotation marks. Each PropertyName
is
case insensitive. These property name/property value pairs are as
follows:
fastqread(..., 'Blockread',
reads a single sequence entry or block of sequence
entries from a FASTQ-formatted file containing multiple sequences. BlockreadValue
,
...)
fastqread(..., 'HeaderOnly',
specifies whether to return only the header information. HeaderOnlyValue
,
...)
fastqread(..., 'TrimHeaders',
specifies whether to trim the header to the first
white space. TrimHeadersValue
,
...)
Input Arguments
|
Either of the following:
|
|
Scalar or vector that controls the reading of a single sequence
entry or block of sequence entries from a FASTQ-formatted file containing
multiple sequences. Enter a scalar |
|
Specifies whether to return only the header information. Choices
are |
|
Specifies whether to trim the header after the first white space
character. White space characters include a space (char(32)) and a
tab (char(9)). Choices are |
Output Arguments
|
Array of structures containing information from a FASTQ-formatted file. There is one structure for each sequence read or entry in the file. Each structure contains the following fields.
| ||||||||
|
Variable containing header information or, if the FASTQ-formatted file contains multiple sequences, a cell array containing header information. | ||||||||
|
Variable containing sequence information or, if the FASTQ-formatted file contains multiple sequences, a cell array containing sequence information. | ||||||||
|
Variable containing quality information or, if the FASTQ-formatted file contains multiple sequences, a cell array containing quality information. |
Examples
Read a FASTQ file into an array of structures:
% Read the contents of a FASTQ-formatted file into % an array of structures reads = fastqread('SRR005164_1_50.fastq') reads = 1x50 struct array with fields: Header Sequence Quality
Read a FASTQ file into three separate variables:
% Read the contents of a FASTQ-formatted file into % three separate variables [headers,seqs,quals] = fastqread('SRR005164_1_50.fastq');
Read a block of entries from a FASTQ file:
% Read the contents of reads 5 through 10 into % an array of structures reads_5_10 = fastqread('SRR005164_1_50.fastq', 'blockread', [5 10]) 1x6 struct array with fields: Header Sequence Quality
More About
Version History
Introduced in R2009b
See Also
fastqinfo
| fastqwrite
| fastainfo
| fastaread
| fastawrite
| sffinfo
| sffread
| saminfo
| samread
| BioIndexedFile
| BioRead