@@ -299,12 +299,14 @@ private void WriteTextMetadata(IRawDataPlus rawFile, int firstScanNumber, int la
299299 // Get the start and end time from the RAW file
300300 var startTime = rawFile . RunHeaderEx . StartTime ;
301301 var endTime = rawFile . RunHeaderEx . EndTime ;
302+ string filePath = rawFile . FileName ;
302303
303304 // File Properties
304305 var output = new List < string >
305306 {
306307 "#FileProperties" ,
307308 "RAW file path=" + rawFile . FileName ,
309+ "RAW file name=" + rawFile . FileName . Substring ( 0 , rawFile . FileName . LastIndexOf ( "." ) ) . Remove ( 0 , rawFile . FileName . LastIndexOf ( "\\ " ) + 1 ) ,
308310 "RAW file version=" + rawFile . FileHeader . Revision ,
309311 "Creation date=" + rawFile . FileHeader . CreationDate
310312 } ;
@@ -415,6 +417,53 @@ private void WriteTextMetadata(IRawDataPlus rawFile, int firstScanNumber, int la
415417 output . Add ( "Sample dilution factor=" + rawFile . SampleInformation . DilutionFactor ) ;
416418 }
417419
420+ if ( rawFile . SampleInformation . IstdAmount != 0 )
421+ {
422+ output . Add ( "Istd Amount=" + rawFile . SampleInformation . IstdAmount ) ;
423+ }
424+
425+ if ( ! rawFile . SampleInformation . CalibrationLevel . IsNullOrEmpty ( ) )
426+ {
427+ output . Add ( "Calibration Level=" + rawFile . SampleInformation . CalibrationLevel ) ;
428+ }
429+
430+ if ( ! rawFile . SampleInformation . InstrumentMethodFile . IsNullOrEmpty ( ) )
431+ {
432+ output . Add ( "Instrument Method=" + rawFile . SampleInformation . InstrumentMethodFile ) ;
433+ }
434+
435+ if ( rawFile . SampleInformation . SampleWeight != 0 )
436+ {
437+ output . Add ( "Sample Weight=" + rawFile . SampleInformation . SampleWeight ) ;
438+ }
439+
440+ if ( ! rawFile . SampleInformation . ProcessingMethodFile . IsNullOrEmpty ( ) )
441+ {
442+ output . Add ( "Processing Method=" + rawFile . SampleInformation . ProcessingMethodFile ) ;
443+ }
444+
445+ if ( ! rawFile . SampleInformation . Path . IsNullOrEmpty ( ) )
446+ {
447+ output . Add ( "Path=" + rawFile . SampleInformation . Path ) ;
448+ }
449+
450+ string [ ] userLabels = rawFile . UserLabel ;
451+ string [ ] userTexts = rawFile . SampleInformation . UserText ;
452+ if ( ! userLabels . IsNullOrEmpty ( ) && ! userTexts . IsNullOrEmpty ( ) )
453+ {
454+ if ( userLabels . Length > userTexts . Length )
455+ {
456+ throw new RawFileParserException ( ) ;
457+ }
458+ for ( int i = 0 ; i < userLabels . Length ; i ++ )
459+ {
460+ if ( ! userTexts [ i ] . IsNullOrEmpty ( ) )
461+ {
462+ output . Add ( userLabels [ i ] + "=" + userTexts [ i ] ) ;
463+ }
464+ }
465+ }
466+
418467 // Write the meta data to file
419468 File . WriteAllLines ( _metadataFileName , output . ToArray ( ) ) ;
420469 }
0 commit comments