Skip to content

Commit

Permalink
change -s to -m (default two line)
Browse files Browse the repository at this point in the history
  • Loading branch information
abentu0101 committed Aug 28, 2018
1 parent 41211b6 commit d2d3ea1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
10 changes: 4 additions & 6 deletions README.md
Expand Up @@ -56,18 +56,16 @@ Switches LinearFold-C (by default) to LinearFold-V.

> -v --verbose
Prints out energy of each loop in the structure . (default False)
Prints out energy of each loop in the structure. (default False)

> -s --simpleprint
> -m --multiline
The simplest output (two lines: sequence and structure) only. Can be used for pipe. (default False)
Output in the CONTRAfold multiline format. (default False)

For example:
#### Example Run
```
cat ../testseq | ./linearfold
echo "GGGCUCGUAGAUCAGCGGUAGAUCGCUUCCUUCGCAAGGAAGAGGCCCUGGGUUCAAAUCCCAGCGAGUCCACCA" | ./linearfold -b 20 -Vv
echo "GGGCUCGUAGAUCAGCGGUAGAUCGCUUCCUUCGCAAGGAAGAGGCCCUGGGUUCAAAUCCCAGCGAGUCCACCA" | ./linearfold -s
echo "GGGCUCGUAGAUCAGCGGUAGAUCGCUUCCUUCGCAAGGAAGAGGCCCUGGGUUCAAAUCCCAGCGAGUCCACCA" | ./linearfold -b 20 -Vvm
```
8 changes: 4 additions & 4 deletions beamckypar.cpp
Expand Up @@ -883,7 +883,7 @@ int main(int argc, char** argv){
bool is_candidate_list = true;
bool sharpturn = false;
bool is_verbose = false;
bool regularprint = true;
bool regularprint = false;
string seq_file_name;

cxxopts::Options options(argv[0], "Left-to-right CKY parser with beam");
Expand All @@ -902,7 +902,7 @@ int main(int argc, char** argv){
cxxopts::value<bool>())
("v,verbose", "print out energy of each loop in the structure (default false)",
cxxopts::value<bool>())
("s,simpleprint", "print out sequence and structure only (default false)",
("m,multiline", "output in the CONTRAfold multiline format (default false)",
cxxopts::value<bool>())
;

Expand All @@ -914,7 +914,7 @@ int main(int argc, char** argv){
is_cube_pruning = !options["no_cp"].as<bool>();
sharpturn = options["sharpturn"].as<bool>();
is_verbose = options["verbose"].as<bool>();
regularprint = !options["simpleprint"].as<bool>();
regularprint = options["multiline"].as<bool>();
// seq_file_name = options["f"].as<string>();

} catch (const cxxopts::OptionException& e) {
Expand Down Expand Up @@ -968,7 +968,7 @@ int main(int argc, char** argv){
printf("Energy(kcal/mol): %.2f\n", result.score / -100.0);
else
printf("Viterbi score: %f\n", result.score);
printf("Time: %f len: %d score %f",
printf("Time: %f len: %d score %f\n",
result.time, int(seq.length()), result.score );

printf(">structure\n%s\n\n", result.structure.c_str());
Expand Down

0 comments on commit d2d3ea1

Please sign in to comment.