Skip to content
Snippets Groups Projects
Commit 2c41ed96 authored by Lokat's avatar Lokat
Browse files

Updated help (positional arguments first) and output of hilive-out.

parent 4ccf9af1
No related branches found
No related tags found
No related merge requests found
......@@ -98,6 +98,12 @@ For an overview of additional parameters, type
hilive --help
To prevent errors during argument parsing we recommend to set optional parameters AFTER the positional options:
hilive BC_DIR INDEX CYCLES OUTDIR [options]
However, if unexpected parsing errors occur, please try to specify all parameters with the "--"-syntax (e.g. --BCDIR /path/to/BaseCalls) instead of using positional arguments. This is also necessary when loading (some of the) positional arguments from a settings file instead of using the command line.
---
#### Using hilive-out:
......
......@@ -46,7 +46,7 @@ void BuildIndexArgumentParser::init_help(po::options_description visible_options
help_message << "Copyright (c) 2015-2017, Martin S. Lindner and the HiLive contributors. See CONTRIBUTORS for more info." << std::endl;
help_message << "All rights reserved" << std::endl << std::endl;
help_message << "HiLive is open-source software. Check with --license for details." << std::endl << std::endl;
help_message << "Usage: " << std::endl << " hilive-build [options] INPUT KMER_WEIGHT" << std::endl << std::endl;
help_message << "Usage: " << std::endl << " hilive-build INPUT KMER_WEIGHT [options]" << std::endl << std::endl;
help_message << "Required:" << std::endl;
help_message << " INPUT Reference genomes in (multi-) FASTA format." << std::endl;
help_message << " KMER_WEIGHT Number of non-gap positions in a k-mer (For ungapped k-mers this is the k-mer size)." << std::endl;
......@@ -255,7 +255,7 @@ void HiLiveArgumentParser::init_help(po::options_description visible_options) {
help_message << "All rights reserved" << std::endl << std::endl;
help_message << "HiLive is open-source software. Check with --license for details." << std::endl << std::endl;
help_message << "Usage: " << std::endl << " hilive [options] BC_DIR INDEX CYCLES OUTDIR" << std::endl << std::endl;
help_message << "Usage: " << std::endl << " hilive BC_DIR INDEX CYCLES OUTDIR [options]" << std::endl << std::endl;
help_message << "Required:" << std::endl;
help_message << " BC_DIR Illumina BaseCalls directory of the sequencing run to analyze" << std::endl;
help_message << " INDEX Path to k-mer index file (*.kix)" << std::endl;
......@@ -579,7 +579,7 @@ void HiLiveOutArgumentParser::init_help(po::options_description visible_options)
help_message << "All rights reserved" << std::endl << std::endl;
help_message << "HiLive is open-source software. Check with --license for details." << std::endl << std::endl;
help_message << "Usage: " << std::endl << " hilive-out [options] --settings /path/to/settings/file" << std::endl << std::endl;
help_message << "Usage: " << std::endl << " hilive-out --settings /path/to/settings/file [options]" << std::endl << std::endl;
help_message << "Required:" << std::endl;
help_message << " settings Path to a HiLive settings file (by default, the file is in the temp directory of the respective run)" << std::endl;
help_message << std::endl << "All parameters can be set as for the HiLive main program." << std::endl;
......@@ -590,3 +590,36 @@ void HiLiveOutArgumentParser::init_help(po::options_description visible_options)
help = help_message.str();
}
void HiLiveOutArgumentParser::report() {
if (globalAlignmentSettings.get_temp_dir() != "") {
std::cout << "Temporary directory: " << globalAlignmentSettings.get_temp_dir() << std::endl;
}
if (!globalAlignmentSettings.get_write_bam())
std::cout << "SAM output directory: " << globalAlignmentSettings.get_out_dir() << std::endl;
else
std::cout << "BAM output directory: " << globalAlignmentSettings.get_out_dir() << std::endl;
std::cout << "Lanes: ";
for ( uint16_t ln : globalAlignmentSettings.get_lanes() )
std::cout << ln << " ";
std::cout << std::endl;
std::cout << "K-mer index: " << globalAlignmentSettings.get_index_fname() << std::endl;
std::cout << "Total Read lengths: ";
std::string barcode_suffix;
for ( uint16_t read = 0; read != globalAlignmentSettings.get_seqs().size(); read ++) {
std::cout << globalAlignmentSettings.getSeqById(read).length;
barcode_suffix = globalAlignmentSettings.getSeqById(read).isBarcode() ? "B" : "R";
std::cout << barcode_suffix << " ";
}
std::cout << std::endl;
std::cout << "Mapping error: " << globalAlignmentSettings.get_min_errors() << std::endl;
if (globalAlignmentSettings.get_any_best_hit_mode())
std::cout << "Mapping mode: Any-Best-Hit-Mode" << std::endl;
else if (globalAlignmentSettings.get_all_best_hit_mode())
std::cout << "Mapping mode: All-Best-Hit-Mode" << std::endl;
else if (globalAlignmentSettings.get_all_best_n_scores_mode())
std::cout << "Mapping mode: All-Best-N-Scores-Mode with N=" << globalAlignmentSettings.get_best_n() << std::endl;
else
std::cout << "Mapping mode: All-Hits-Mode" << std::endl;
std::cout << std::endl;
}
......@@ -396,7 +396,7 @@ protected:
*/
bool parseRunInfo(po::variables_map vm);
void report() override;
virtual void report() override;
void init_help(po::options_description visible_options) override;
......@@ -420,6 +420,8 @@ class HiLiveOutArgumentParser : public HiLiveArgumentParser {
void init_help(po::options_description visible_options) override;
void report() override;
void set_required_parameters() override { required_options = {"settings", "INDEX"}; };
};
......
......@@ -19,6 +19,10 @@ AlignmentSettings globalAlignmentSettings;
*/
int main(int argc, const char* argv[]) {
// Program start output
std::cout << std::endl << "------" << std::endl << "HiLive Output Tool v"<< HiLive_VERSION_MAJOR << "." << HiLive_VERSION_MINOR <<
" - Output of Realtime Alignments of Illumina Reads" << std::endl << "------" << std::endl<< std::endl;
// Parse the command line arguments
HiLiveOutArgumentParser argumentParser(argc, argv);
int parser_returnStatus = argumentParser.parseCommandLineArguments();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment