Skip to content

Commit 9f69fe4

Browse files
added std out parameter to the query parameters class
1 parent 63490e5 commit 9f69fe4

3 files changed

Lines changed: 40 additions & 10 deletions

File tree

MainClass.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ private static void SpectrumQueryParametersParsing(string[] args)
243243
},
244244
{
245245
"s=|scans=",
246-
"The scan numbers. e.g. '1-5,20,25-30'",
246+
"The scan numbers. e.g. \"1-5, 20, 25-30\"",
247247
v => parameters.scans = v
248248
},
249249
{
@@ -255,6 +255,11 @@ private static void SpectrumQueryParametersParsing(string[] args)
255255
"p|noPeakPicking",
256256
"Don't use the peak picking provided by the native Thermo library. By default peak picking is enabled.",
257257
v => parameters.noPeakPicking = v != null
258+
},
259+
{
260+
"s|stdout",
261+
"Pipes the output into standard output. Logging is being turned off",
262+
v => parameters.stdout = v != null
258263
}
259264
};
260265

@@ -756,4 +761,4 @@ private static void ShowHelp(string message, OptionException optionException, Op
756761
Environment.Exit(-1);
757762
}
758763
}
759-
}
764+
}

Query/QueryParameters.cs

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,30 @@ public class QueryParameters
1212
public string outputFile { get; set; }
1313
public bool noPeakPicking { get; set; }
1414
public HashSet<int> scanNumbers { get; set; }
15+
public bool stdout { get; set; }
16+
17+
18+
public QueryParameters()
19+
{
20+
help = false;
21+
rawFilePath = "";
22+
scans = "";
23+
outputFile = "";
24+
noPeakPicking = false;
25+
scanNumbers = new HashSet<int>();
26+
stdout = false;
27+
}
28+
29+
public QueryParameters(QueryParameters copy)
30+
{
31+
help = copy.help;
32+
rawFilePath = copy.rawFilePath;
33+
scans = copy.scans;
34+
outputFile = copy.outputFile;
35+
noPeakPicking = copy.noPeakPicking;
36+
scanNumbers = new HashSet<int>();
37+
foreach (int s in copy.scanNumbers) scanNumbers.Add(s);
38+
stdout = copy.stdout;
39+
}
1540
}
16-
}
41+
}
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[
22
{
33
"mz":488.5384,
4-
"tolerance":10,
5-
"tolerance_unit":"ppm"
4+
"tolerance": 2,
5+
"tolerance_unit":"da"
66
},
77
{
8-
"mz":575.2413,
9-
"tolerance":10,
8+
"mz":570.2413,
9+
"tolerance":1000,
1010
"tolerance_unit":"ppm"
1111
},
1212
{
1313
"mz_start":749.7860,
14-
"mz_end":749.8093,
15-
"rt_start":10.5,
16-
"rt_end":11
14+
"mz_end":752.8093,
15+
"rt_start":20,
16+
"rt_end":80
1717
}
1818
]

0 commit comments

Comments
 (0)