| Contents | Index |
InfoStruct = saminfo(File)
InfoStruct = saminfo(File,Name,Value)
InfoStruct = saminfo(File) returns a MATLAB structure containing summary information about a SAM-formatted file.
InfoStruct = saminfo(File,Name,Value) returns a MATLAB structure with additional options specified by one or more Name,Value pair arguments.
| Use saminfo to investigate the size and content of a SAM file before using the samread function to read the file contents into a MATLAB structure. |
File |
String specifying a file name or path and file name of a SAM-formatted file. If you specify only a file name, that file must be on the MATLAB search path or in the Current Folder. |
Optional comma-separated pairs of Name,Value arguments, where Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (''). You can specify several name-value pair arguments in any order as Name1,Value1,…,NameN,ValueN.
Return information about the ex1.sam file included with Bioinformatics Toolbox:
info = saminfo('ex1.sam')info =
Filename: 'ex1.sam'
FilePath: [1x89 char]
FileSize: 254270
FileModDate: '12-May-2011 14:23:25'
Header: [1x1 struct]
SequenceDictionary: [1x1 struct]
ReadGroup: [1x2 struct]
NumReads: []
ScannedDictionary: {0x1 cell}
ScannedDictionaryCount: [0x1 uint64]Return information about the ex1.sam file including the number of sequence reads:
info = saminfo('ex1.sam','numofreads', true)info =
Filename: 'ex1.sam'
FilePath: [1x89 char]
FileSize: 254270
FileModDate: '12-May-2011 14:23:25'
Header: [1x1 struct]
SequenceDictionary: [1x1 struct]
ReadGroup: [1x2 struct]
NumReads: 1501
ScannedDictionary: {0x1 cell}
ScannedDictionaryCount: [0x1 uint64][1] Li, H., Handsaker, B., Wysoker, A., Fennell, T., Ruan, J., Homer, N., Marth, G., Goncalo, A., and Durbin, R. (2009). The Sequence Alignment/Map format and SAMtools. Bioinformatics 25, 16, 2078–2079.
BioIndexedFile | BioMap | fastainfo | fastaread | fastawrite | fastqinfo | fastqread | fastqwrite | samread | sffinfo | sffread

See how to analyze, visualize, and model biological data and systems using MathWorks products.
Get free kit| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |