コード例 #1
0
 /// <summary>
 /// Prepare to populate and then generate an MZID file
 /// </summary>
 /// <param name="identifier">Identifier for the file data, often the name of the dataset or the analysis software. Unique in the scope.</param>
 /// <param name="name">Name of the file. Can be the name of the dataset or analysis software</param>
 public IdentDataCreator(string identifier, string name)
 {
     identData = new IdentDataObj()
     {
         Id   = identifier,
         Name = name,
         AnalysisProtocolCollection = new AnalysisProtocolCollectionObj(),
         DataCollection             = new DataCollectionObj()
         {
             AnalysisData = new AnalysisDataObj(),
         },
         AnalysisCollection = new AnalysisCollectionObj(),
         SequenceCollection = new SequenceCollectionObj(),
     };
 }
コード例 #2
0
 /// <summary>
 /// Write the provided data to the file
 /// </summary>
 /// <param name="identData"></param>
 /// <param name="filePath">Path to file to be written, with extension of .mzid[.gz]</param>
 /// <param name="bufferSize">File stream buffer size</param>
 public static void Write(IdentDataObj identData, string filePath, int bufferSize = 65536)
 {
     MzIdentMlReaderWriter.Write(new MzIdentMLType(identData), filePath, bufferSize);
 }