Skip to content

Commit

Permalink
Update README and error messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Grigorjew committed Sep 1, 2023
1 parent 1513347 commit d2b27be
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ EMERALD defines two kinds of sequences: the singular `representative sequence` a
<a name="sec3.2"></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.
Expand All @@ -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.

Expand Down Expand Up @@ -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
Expand Down
24 changes: 24 additions & 0 deletions examples/ex1.out
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d2b27be

Please sign in to comment.