从NETCDF文件中读取质谱数据
mzCDFStruct
= mzcdfread(文件
)mzCDFStruct
= mzcdfread(文件
, ...'时间范围',TimeRangeValue
,……)mzCDFStruct
= mzcdfread(文件
,……”ScanIndices',ScanindicesValue
,……)mzCDFStruct
= mzcdfread(文件
,...'冗长',VerboseValue
,……)
文件 |
Character vector or string containing a file name, or a path and file name, of a netCDF file that contains mass spectrometry data and conforms to the ANDI/MS or the ASTM E2077-00 (2005) standard specification or earlier specifications. If you specify only a file name, that file must be on the MATLAB®search path or in the current folder. |
TimeRangeValue |
两元素数字阵列 Tip 时间单元在NETCDF全局属性中指示。有关NetCDF文件中时间范围的摘要信息,请使用 Note If you specify a |
ScanindicesValue |
Positive integer, vector of integers, or a two-element numeric array Tip 有关NetCDF文件中扫描索引的信息,请检查 Note If you specify a |
VerboseValue |
Controls the display of the progress of the reading of |
mzCDFStruct |
MATLAB结构包含来自NetCDF文件的质谱信息。它的字段对应于NetCDF文件中的变量和全局属性。如果NETCDF变量包含本地属性,则创建了一个附加字段,该字段的名称是附加的变量名称 |
读取NetCDF文件,mzCDFStruct
= mzcdfread(文件
)文件
, and then creates a MATLAB structure,mzCDFStruct
。
文件
is a character vector or string containing a file name, or a path and file name, of a netCDF file that contains mass spectrometry data. The file must conform to the ANDI/MS or the ASTM E2077-00 (2005) standard specification or earlier specifications.
mzCDFStruct
contains fields that correspond to the variables and global attributes in a netCDF file. If a netCDF variable contains local attributes, an additional field is created, with the name of the field being the variable name appended with_属性
。The number and names of the fields will vary, depending on the mass spectrometer software, but typically there aremass_values
和intense_values
fields.
Tip
LC/MS数据分析需要操作系统的大量内存。
如果收到与内存有关的错误,请尝试以下内容:
Increase the virtual memory (swap space) for your operating system as described inResolve “Out of Memory” Errors。
If you receive errors related to Java®堆空间,增加爪哇堆空间:
If you have MATLAB version 7.10 (R2010a) or later, seeJava Heap内存首选项。
If you have MATLAB version 7.9 (R2009b) or earlier, see//www.tatmou.com/support/solutions/en/data/1-18I2C/。
callsmzCDFStruct
= mzcdfread(文件
,……”PropertyName
',PropertyValue
,……)mzcdfread
with optional properties that use property name/property value pairs. You can specify one or more properties in any order. EachPropertyName
must be enclosed in single quotation marks and is case insensitive. These property name/property value pairs are as follows:
specifies the range of time inmzCDFStruct
= mzcdfread(文件
, ...'时间范围',TimeRangeValue
,……)文件
读书。TimeRangeValue
是两个元素数字阵列[Start End]
。Default is to read spectra from all times[0 Inf]
。
Tip
时间单元在NETCDF全局属性中指示。有关NetCDF文件中时间范围的摘要信息,请使用mzcdfinfo
function.
Note
If you specify aTimeRangeValue
, you cannot specifyScanindicesValue
。
指定扫描,多次扫描或扫描范围mzCDFStruct
= mzcdfread(文件
,……”ScanIndices',ScanindicesValue
,……)文件
读书。ScanindicesValue
is a positive integer, vector of integers, or a two-element numeric array[start_ind end_ind]
。Start_Ind
和End_Ind
are each positive integers indicating a scan index number.Start_Ind
must be less thanEnd_Ind
。默认是阅读所有扫描。
Tip
有关NetCDF文件中扫描索引的信息,请检查NumberOfScans
field in the structure returned by themzcdfinfo
function.
Note
If you specify aScanindicesValue
, you cannot specify aTimeRangeValue
。
controls the progress display when readingmzCDFStruct
= mzcdfread(文件
,...'冗长',VerboseValue
,……)文件
。Choices are真的
(default) orfalse
。
在下面的示例中,文件results.cdf
未提供。
将NETCDF文件读取到MATLAB软件中作为结构。
out = mzcdfread('results.cdf');
View the second scan in the netCDF file by creating separate variables containing the intensity and m/z values, and then plotting these values. Add a title andx- 和y-axis labels using fields in the output structure.
idx1 = out.scan_index(2)+1; idx2 = out.scan_index(3); y = out.intensity_values(idx1:idx2); z = out.mass_values(idx1:idx2); stem(z,y,'marker','none') title(sprintf('Time: %f',out.scan_acquisition_time(2))) xlabel(out.mass_axis_units) ylabel(out.intensity_axis_units)