ISpectrumFileReader.Open

Opens an MS data file and reads its scan information.


Remarks

A reader from SpectrumFileReaderFactory.GetReader is already open. Open switches it to another file of the same format.


Syntax

SyntaxDescription
Open(string fileName)Open data file and hold new scan information.

Parameters

NameTypeDescription
fileNamestringPath to the data file.

Returns

TypeDescription
booltrue if the file opened and is ready to read.

Example

1
2
3
4
5
6
7
8
9
10
using Nova.Io.Read;

ISpectrumFileReader reader = SpectrumFileReaderFactory.GetReader("Run1.mzML", MSFilter.MS2);
Console.WriteLine("Run1: " + reader.ScanCount + " spectra");

if (reader.Open("Run2.mzML"))
{
  Console.WriteLine("Run2: " + reader.ScanCount + " spectra");
}
reader.Close();
This post is licensed under CC BY 4.0 by the author.

Trending Tags