ChromatCount gives the number of chromatograms in the open file. Formats that carry none report 0.
Syntax
| Syntax | Description |
|---|
| GetChromatogram(int chromatIndex = -1) | Reads a chromatogram from the currently open MS data file. |
Parameters
| Name | Type | Description |
|---|
| chromatIndex | int | Optional chromatogram index (zero based) to read. If omitted (or negative), the next chromatogram in the file is read. |
Returns
| Type | Description |
|---|
| Chromatogram | Chromatogram object. |
Example
1
2
3
4
5
6
7
8
9
10
| using Nova.Data;
using Nova.Io.Read;
ISpectrumFileReader reader = SpectrumFileReaderFactory.GetReader("DDA.mzML", MSFilter.MS1);
for (int i = 0; i < reader.ChromatCount; i++)
{
Chromatogram chromat = reader.GetChromatogram(i);
Console.WriteLine(chromat.ID + ": " + chromat.Count + " points");
}
reader.Close();
|