diff --git a/README.md b/README.md index f5a280a..7ccd387 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,8 @@ EMERALD defines two kinds of sequences: the singular `representative sequence` a ### Command line options ##### The basic options are the following -- ```-f, --file {FILE}``` Path to FASTA file, **mandatory argument**. +- ```-f, --file {FILE}``` Path to input FASTA file, **mandatory argument**. +- ```-o, -output {FILE}``` Path to output file, **mandatory argument**. - ```-a, --alpha {value}``` $\alpha$ value for safety, $0.5 < \alpha \leq 1$, by default: 0.75. The safety windows will be partial alignments contained in an $\alpha$ proportion of all alignments. If $\alpha$ is chosen outside this range, a warning will be displayed. EMERALD will keep running but it can crash. - ```-d, --delta {value}``` $\Delta$ value for the size of the suboptimal space, any positive integer, by default: 0. If $\Delta$ is larger, more alignments will be considered suboptimal, which will decrease the number and lengths of the safety windows. - ```-i, --threads {value}``` How many threads to use. By default 1 thread is used. @@ -77,6 +78,7 @@ EMERALD defines two kinds of sequences: the singular `representative sequence` a - ```-s, --special {value}``` is an integer assigned to the score of aligned amino acids in which one of the two is not included in the list above. - ```-g, --gapcost {value}``` and ```-e, --startgap {value}``` Defines the affine-linear gap score function, by default -1 and -11, respectively. - ```-m, --windowmerge``` In addition to printing out the calculated safety windows, EMERALD merges them and prints additional lines with the merged safety windows. Safety windows get merged if they are intersecting or adjacent to each other. +- ```-w, --drawgraph {dir}``` **Experimental**: Writes dot graph files into the given directory plotting the suboptimal alignment graph. By default, EMERALD uses the [BLOSUM62](https://en.wikipedia.org/wiki/BLOSUM) substitution matrix for its cost assignments. @@ -114,7 +116,7 @@ MSFLKKKFDSL ``` Output: ``` -$ ./emerald -f examples/ex1.fasta -a 0.75 -d 8 +$ ./emerald -f examples/ex1.fasta -o examples/ex1.out -a 0.75 -d 8 >Representative sequence MSFDLKSKFLG 5 diff --git a/examples/ex1.out b/examples/ex1.out new file mode 100644 index 0000000..46a27d8 --- /dev/null +++ b/examples/ex1.out @@ -0,0 +1,24 @@ +>Representative sequence +MSFDLKSKFLG +5 +>Cluster member 1 +MSKLKDFLFKS +3 +0 2 0 2 +4 6 3 5 +8 11 8 11 +>Cluster member 2 +MSLGSFKDKFL +2 +0 3 0 3 +4 9 5 10 +>Cluster member 3 +MSLKDKKFLKS +2 +0 2 0 2 +7 10 6 9 +>Cluster member 4 +MSFLKKKFDSL +2 +0 3 0 3 +5 9 4 8 diff --git a/src/main.cpp b/src/main.cpp index a185a11..90b11ed 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -315,7 +315,7 @@ int main(int argc, char **argv) { if (drawgraph && !fs::exists(fs::path(drawgraph_dir))) { std::cerr << "Error: directory " << drawgraph_dir << " does not exist.\n"; - return 1; + return 2; } // Welcome message @@ -367,8 +367,8 @@ int main(int argc, char **argv) { int64_t PS = (int64_t) proteins.size(); if (PS == 0) { - std::cout << "Protein sequence list is empty.\n"; - return 2; + std::cerr << "Error: Protein sequence list is empty.\n"; + return 3; } // find reference protein