Skip to content

Commit 42131e5

Browse files
committed
"No output" explained
Update to readme and internal help to include no output (None) option for file and metadata format (#172)
1 parent 4972024 commit 42131e5

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

MainClass.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -526,11 +526,11 @@ private static void RegularParametersParsing(string[] args)
526526
},
527527
{
528528
"f=|format=",
529-
"The spectra output format: 0 for MGF, 1 for mzML, 2 for indexed mzML, 3 for Parquet; both numeric and text (case insensitive) value recognized. Defaults to indexed mzML if no format is specified.",
529+
"The spectra output format: 0 for MGF, 1 for mzML, 2 for indexed mzML, 3 for Parquet, 4 for None (no output); both numeric and text (case insensitive) value recognized. Defaults to indexed mzML if no format is specified.",
530530
v => outputFormatString = v
531531
},
532532
{
533-
"m=|metadata=", "The metadata output format: 0 for JSON, 1 for TXT; both numeric and text (case insensitive) value recognized",
533+
"m=|metadata=", "The metadata output format: 0 for JSON, 1 for TXT, 2 for None (no output); both numeric and text (case insensitive) value recognized. Defaults to None",
534534
v => metadataFormatString = v
535535
},
536536
{
@@ -740,7 +740,7 @@ private static void RegularParametersParsing(string[] args)
740740
"-c, --metadata_output_file");
741741
}
742742

743-
if (parseInput.MetadataOutputFile != null && parseInput.MetadataFormat == MetadataFormat.NONE)
743+
if (parseInput.MetadataOutputFile != null && parseInput.MetadataFormat == MetadataFormat.None)
744744
{
745745
throw new OptionException("specify a metadata format (0 for JSON, 1 for TXT)",
746746
"-m, --metadata");

OutputFormat.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ public enum OutputFormat
66
MzML,
77
IndexMzML,
88
Parquet,
9-
NONE
9+
None
1010
}
1111

1212
public enum MetadataFormat
1313
{
1414
JSON,
1515
TXT,
16-
NONE
16+
None
1717
}
1818
}

ParseInput.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ public int Warnings
121121

122122
public ParseInput()
123123
{
124-
MetadataFormat = MetadataFormat.NONE;
125-
OutputFormat = OutputFormat.NONE;
124+
MetadataFormat = MetadataFormat.None;
125+
OutputFormat = OutputFormat.None;
126126
Gzip = false;
127127
NoPeakPicking = new HashSet<int>();
128128
NoZlibCompression = false;

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,9 @@ or
4747
mono ThermoRawFileParser.exe -d=/home/user/data_input/
4848
```
4949

50-
For running on Windows, omit `mono`. The optional parameters only work in the -option=value format. The tool can output some RAW file metadata `-m=0|1` (0 for JSON, 1 for TXT) and the spectra file `-f=0|1|2|3` (0 for MGF, 1 for mzML, 2 for indexed mzML, 3 for Parquet) or both. Use the `-p` flag to disable the thermo native peak picking.
50+
For running on Windows, omit `mono`. The optional parameters only work in the -option=value format. The tool can output some RAW file metadata `-m=0|1` (0 for JSON, 1 for TXT) and the spectra file `-f=0|1|2|3|4` (0 for MGF, 1 for mzML, 2 for indexed mzML, 3 for Parquet, 4 for no output) or both. Use the `-p` flag to disable the thermo native peak picking.
5151

5252
```
53-
ThermoRawFileParser.exe --help
5453
Usage is ThermoRawFileParser.exe [subcommand] [options]
5554
optional subcommands are xic|query (use [subcommand] -h for more info]):
5655
-h, --help Prints out the options.
@@ -70,13 +69,14 @@ optional subcommands are xic|query (use [subcommand] -h for more info]):
7069
file or directory output. Implies silent logging,
7170
i.e. logging level 0
7271
-f, --format=VALUE The spectra output format: 0 for MGF, 1 for mzML,
73-
2 for indexed mzML, 3 for Parquet; both numeric
74-
and text (case insensitive) value recognized.
75-
Defaults to indexed mzML if no format is
76-
specified.
77-
-m, --metadata=VALUE The metadata output format: 0 for JSON, 1 for TXT;
78-
both numeric and text (case insensitive) value
79-
recognized
72+
2 for indexed mzML, 3 for Parquet, 4 for None (
73+
no output); both numeric and text (case
74+
insensitive) value recognized. Defaults to
75+
indexed mzML if no format is specified.
76+
-m, --metadata=VALUE The metadata output format: 0 for JSON, 1 for TXT,
77+
2 for None (no output); both numeric and text (
78+
case insensitive) value recognized. Defaults to
79+
None
8080
-c, --metadata_output_file=VALUE
8181
The metadata output file. By default the metadata
8282
file is written to the output directory.

RawFileParser.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,13 @@ private static void ProcessFile(ParseInput parseInput)
155155
}
156156
}
157157

158-
if (parseInput.MetadataFormat != MetadataFormat.NONE)
158+
if (parseInput.MetadataFormat != MetadataFormat.None)
159159
{
160160
MetadataWriter metadataWriter = new MetadataWriter(parseInput);
161161
metadataWriter.WriteMetadata(rawFile, firstScanNumber, lastScanNumber);
162162
}
163163

164-
if (parseInput.OutputFormat != OutputFormat.NONE)
164+
if (parseInput.OutputFormat != OutputFormat.None)
165165
{
166166
SpectrumWriter spectrumWriter;
167167
switch (parseInput.OutputFormat)

0 commit comments

Comments
 (0)