Skip to content

Commit a6f8e37

Browse files
json pretty print and other small fixes
1 parent 89136bd commit a6f8e37

9 files changed

Lines changed: 280 additions & 314 deletions

MainClass.cs

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ private static void XicParametersParsing(string[] args)
107107

108108
if (parameters.help)
109109
{
110-
ShowHelp("usage is (use -option=value for the optional arguments):", null,
110+
ShowHelp("usage is:", null,
111111
optionSet);
112112
return;
113113
}
@@ -184,19 +184,19 @@ private static void XicParametersParsing(string[] args)
184184
}
185185
catch (OptionException optionException)
186186
{
187-
ShowHelp("Error - usage is (use -option=value for the optional arguments):", optionException,
187+
ShowHelp("Error - usage is:", optionException,
188188
optionSet);
189189
}
190190
catch (ArgumentNullException)
191191
{
192192
if (parameters.help)
193193
{
194-
ShowHelp("usage is (use -option=value for the optional arguments):", null,
194+
ShowHelp("usage is:", null,
195195
optionSet);
196196
}
197197
else
198198
{
199-
ShowHelp("Error - usage is (use -option=value for the optional arguments):", null,
199+
ShowHelp("Error - usage is:", null,
200200
optionSet);
201201
}
202202
}
@@ -274,7 +274,7 @@ private static void SpectrumQueryParametersParsing(string[] args)
274274

275275
if (parameters.help)
276276
{
277-
ShowHelp("usage is (use -option=value for the optional arguments):", null,
277+
ShowHelp("usage is:", null,
278278
optionSet);
279279
return;
280280
}
@@ -302,19 +302,19 @@ private static void SpectrumQueryParametersParsing(string[] args)
302302
}
303303
catch (OptionException optionException)
304304
{
305-
ShowHelp("Error - usage is (use -option=value for the optional arguments):", optionException,
305+
ShowHelp("Error - usage is:", optionException,
306306
optionSet);
307307
}
308308
catch (ArgumentNullException)
309309
{
310310
if (parameters.help)
311311
{
312-
ShowHelp("usage is (use -option=value for the optional arguments):", null,
312+
ShowHelp("usage is:", null,
313313
optionSet);
314314
}
315315
else
316316
{
317-
ShowHelp("Error - usage is (use -option=value for the optional arguments):", null,
317+
ShowHelp("Error - usage is:", null,
318318
optionSet);
319319
}
320320
}
@@ -451,10 +451,9 @@ private static void RegularParametersParsing(string[] args)
451451

452452
if (help)
453453
{
454-
string helpmessage = String.Format("usage is {0} [subcommand] [options]\nsubcommand is xic|query\n",
455-
Assembly.GetExecutingAssembly().GetName().Name);
456-
ShowHelp(helpmessage +
457-
"(use -option=value for the optional arguments):", null,
454+
var helpMessage =
455+
$"usage is {Assembly.GetExecutingAssembly().GetName().Name}.exe [subcommand] [options]\noptional subcommands are xic|query (use [subcommand] -h for more info]):";
456+
ShowHelp(helpMessage, null,
458457
optionSet);
459458
return;
460459
}
@@ -660,19 +659,19 @@ private static void RegularParametersParsing(string[] args)
660659
}
661660
catch (OptionException optionException)
662661
{
663-
ShowHelp("Error - usage is (use -option=value for the optional arguments):", optionException,
662+
ShowHelp("Error - usage is:", optionException,
664663
optionSet);
665664
}
666665
catch (ArgumentNullException)
667666
{
668667
if (help)
669668
{
670-
ShowHelp("usage is (use -option=value for the optional arguments):", null,
669+
ShowHelp("usage is:", null,
671670
optionSet);
672671
}
673672
else
674673
{
675-
ShowHelp("Error - usage is (use -option=value for the optional arguments):", null,
674+
ShowHelp("Error - usage is:", null,
676675
optionSet);
677676
}
678677
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@
77

88
namespace ThermoRawFileParser.Query
99
{
10-
public class PROXISpectrum
10+
public class ProxiSpectrum
1111
{
1212
public List<double> mzs { get; set; }
1313
public List<double> intensities { get; set; }
14-
public List<PROXICVTerm> attributes { get; set; }
14+
public List<ProxiCvTerm> attributes { get; set; }
1515

16-
public PROXISpectrum()
16+
public ProxiSpectrum()
1717
{
1818
mzs = new List<double>();
1919
intensities = new List<double>();
20-
attributes = new List<PROXICVTerm>();
20+
attributes = new List<ProxiCvTerm>();
2121
}
2222

2323
public void AddAttribute(string accession=null, string cvGroup=null, string name=null, string value=null, string valueAccession=null)
2424
{
25-
attributes.Add(new PROXICVTerm(accession, cvGroup, name, value, valueAccession));
25+
attributes.Add(new ProxiCvTerm(accession, cvGroup, name, value, valueAccession));
2626
}
2727

2828
public void AddMz(IList<double> mzList)

0 commit comments

Comments
 (0)