forked from compomics/ThermoRawFileParser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ParseInput.cs
80 lines (68 loc) · 2.37 KB
/
ParseInput.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
using System.IO;
namespace ThermoRawFileParser
{
public class ParseInput
{
/// <summary>
/// The RAW file path.
/// </summary>
public string RawFilePath { get; }
/// <summary>
/// The output directory.
/// </summary>
public string OutputDirectory { get; }
/// <summary>
/// The output format.
/// </summary>
public OutputFormat OutputFormat { get; }
/// <summary>
/// Gzip the output file.
/// </summary>
public bool Gzip { get; }
/// <summary>
/// Output the metadata.
/// </summary>
public MetadataFormat OutputMetadata { get; }
/// <summary>
/// Exclude the MS2 spectra in profile mode.
/// </summary>
public bool ExcludeProfileData { get; }
/// <summary>
/// The data collection identifier.
/// </summary>
public string Collection { get; }
/// <summary>
/// Mass spectrometry run name.
/// </summary>
public string MsRun { get; }
/// <summary>
/// This property is used disambiguate instances where the same collection
/// has two or more msRuns with the same name.
/// </summary>
public string SubFolder { get; }
/// <summary>
/// The raw file name.
/// </summary>
public string RawFileName { get; }
/// <summary>
/// The RAW file name without extension.
/// </summary>
public string RawFileNameWithoutExtension { get; }
public ParseInput(string rawFilePath, string outputDirectory, OutputFormat outputFormat, bool gzip,
MetadataFormat outputMetadata, bool excludeProfileData, string collection, string msRun, string subFolder)
{
RawFilePath = rawFilePath;
var splittedPath = RawFilePath.Split('/');
RawFileName = splittedPath[splittedPath.Length - 1];
RawFileNameWithoutExtension = Path.GetFileNameWithoutExtension(RawFileName);
OutputDirectory = outputDirectory;
OutputFormat = outputFormat;
Gzip = gzip;
OutputMetadata = outputMetadata;
ExcludeProfileData = excludeProfileData;
Collection = collection;
MsRun = msRun;
SubFolder = subFolder;
}
}
}