Skip to content

Commit cfa9ae9

Browse files
multiple sources: making output file a required argument
1 parent c00622c commit cfa9ae9

File tree

11 files changed

+11
-19
lines changed

11 files changed

+11
-19
lines changed

src/amrfinder/allelicmeth.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,7 @@ computes probability of allele-specific methylation at each tuple of CpGs
234234
/****************** COMMAND LINE OPTIONS ********************/
235235
OptionParser opt_parse(argv[0], // NOLINT(*-pointer-arithmetic)
236236
description, "<epireads>");
237-
opt_parse.add_opt("output", 'o', "output file name (default: stdout)",
238-
false, outfile);
237+
opt_parse.add_opt("output", 'o', "output file name", true, outfile);
239238
opt_parse.add_opt("chrom", 'c', "genome sequence file/directory", true,
240239
chroms_dir);
241240
opt_parse.add_opt("verbose", 'v', "print more run info", false, VERBOSE);

src/amrfinder/amrtester.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ main_amrtester(int argc, char *argv[]) { // NOLINT(*-avoid-c-arrays)
193193
OptionParser opt_parse(argv[0], // NOLINT(*-pointer-arithmetic)
194194
"resolve epi-alleles",
195195
"<bed-regions> <mapped-reads>");
196-
opt_parse.add_opt("output", 'o', "output file", false, outfile);
196+
opt_parse.add_opt("output", 'o', "output file", true, outfile);
197197
opt_parse.add_opt("chrom", 'c', "reference genome fasta file", true,
198198
chrom_file);
199199
opt_parse.add_opt("itr", 'i', "max iterations", false, max_itr);

src/analysis/cpgbins.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,7 @@ Columns (beyond the first 6) in the BED format output:
195195
OptionParser opt_parse(argv[0], // NOLINT(*-pointer-arithmetic)
196196
description, "<chrom-sizes> <xsym-file>");
197197
opt_parse.set_show_defaults();
198-
opt_parse.add_opt("output", 'o', "name of output file (default: stdout)",
199-
true, outfile);
198+
opt_parse.add_opt("output", 'o', "name of output file", true, outfile);
200199
opt_parse.add_opt("bin", 'b', "bin size in base pairs", false, bin_size);
201200
opt_parse.add_opt("threads", 't', "number of threads", false, n_threads);
202201
opt_parse.add_opt("level", 'l',

src/analysis/hmr-rep.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,7 @@ main_hmr_rep(int argc, char *argv[]) { // NOLINT(*-avoid-c-arrays)
348348
OptionParser opt_parse(argv[0], // NOLINT(*-pointer-arithmetic)
349349
description,
350350
"<methcount-file-1> <methcount-file-2> ...");
351-
opt_parse.add_opt("out", 'o', "output file (default: stdout)", false,
352-
outfile);
351+
opt_parse.add_opt("out", 'o', "output file", true, outfile);
353352
opt_parse.add_opt("desert", 'd', "max dist btwn cpgs with reads in HMR",
354353
false, desert_size);
355354
opt_parse.add_opt("itr", 'i', "max iterations", false, max_iterations);

src/analysis/hypermr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ main_hypermr(int argc, char *argv[]) { // NOLINT(*-avoid-c-arrays)
243243
/****************** COMMAND LINE OPTIONS ********************/
244244
OptionParser opt_parse(argv[0], // NOLINT(*-pointer-arithmetic)
245245
about, "<counts-file>");
246-
opt_parse.add_opt("out", 'o', "output file (BED format)", false, outfile);
246+
opt_parse.add_opt("out", 'o', "output file", true, outfile);
247247
opt_parse.add_opt("scores", 's', "output file for posterior scores", false,
248248
scores_file);
249249
opt_parse.add_opt("tolerance", 't', "numerical tolerance", false,

src/analysis/metagene.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ correctly.
112112
/****************** GET COMMAND LINE ARGUMENTS ***************************/
113113
OptionParser opt_parse(argv[0], // NOLINT(*-pointer-arithmetic)
114114
description, "<features-bed> <counts>");
115-
opt_parse.add_opt("output", 'o', "output file (default: terminal)", false,
116-
outfile);
115+
opt_parse.add_opt("output", 'o', "output file", true, outfile);
117116
opt_parse.add_opt("size", 's', "analyze this size in both directions",
118117
false, region_size);
119118
opt_parse.add_opt("bin", 'b', "bin size", false, bin_size);

src/analysis/multimethstat.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,7 @@ main_multimethstat(int argc, char *argv[]) { // NOLINT(*-avoid-c-arrays)
510510
"methylation in each of a set of genomic intervals",
511511
"<intervals-bed> <methylation-file>");
512512
opt_parse.set_show_defaults();
513-
opt_parse.add_opt("output", 'o', "Name of output file (default: stdout)",
514-
false, outfile);
513+
opt_parse.add_opt("output", 'o', "output file", true, outfile);
515514
opt_parse.add_opt("numeric", 'N', "print numeric values only (not NAs)",
516515
false, print_numeric_only);
517516
opt_parse.add_opt("preload", 'L', "Load all CpG sites", false,

src/analysis/pmd.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,8 +1135,7 @@ main_pmd(int argc, char *argv[]) { // NOLINT(*-avoid-c-arrays)
11351135
/****************** COMMAND LINE OPTIONS ********************/
11361136
OptionParser opt_parse(argv[0], // NOLINT(*-pointer-arithmetic)
11371137
description, "<methcount-files>");
1138-
opt_parse.add_opt("out", 'o', "output file (default: stdout)", false,
1139-
outfile);
1138+
opt_parse.add_opt("out", 'o', "output file", true, outfile);
11401139
opt_parse.add_opt("desert", 'd', "max dist between bins with data in PMD",
11411140
false, desert_size);
11421141
opt_parse.add_opt("fixedbin", 'f', "Fixed bin size", false, fixed_bin_size);

src/analysis/roimethstat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ Columns (beyond the first 6) in the BED format output:
421421
OptionParser opt_parse(argv[0], // NOLINT(*-pointer-arithmetic)
422422
description, "<intervals-bed> <methylation-file>");
423423
opt_parse.set_show_defaults();
424-
opt_parse.add_opt("output", 'o', "Name of output file", true, outfile);
424+
opt_parse.add_opt("output", 'o', "output file", true, outfile);
425425
opt_parse.add_opt("numeric", 'N', "print numeric values only (not NAs)",
426426
false, print_numeric_only);
427427
opt_parse.add_opt("preload", 'L', "load all site sites", false, preload);

src/radmeth/radmeth-merge.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,7 @@ main_radmeth_merge(int argc, char *argv[]) { // NOLINT(*-avoid-c-arrays)
143143
" methylated CpGs into DMRs",
144144
"<bed-file-in-radmeth-format>");
145145
opt_parse.set_show_defaults();
146-
opt_parse.add_opt("output", 'o', "output file (default: stdout)", false,
147-
outfile);
146+
opt_parse.add_opt("output", 'o', "output file", true, outfile);
148147
opt_parse.add_opt("cutoff", 'p', "p-value cutoff", false, cutoff);
149148
std::vector<std::string> leftover_args;
150149
opt_parse.parse(argc, argv, leftover_args);

0 commit comments

Comments
 (0)