Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
telatin committed Sep 19, 2024
1 parent 6d8cd87 commit 3e70d7b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test_n50.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
sudo apt-get install -y gcc make zlib1g-dev
- name: Build N50 Calculator
run: make
run: make clean && make

- name: Run tests
run: make test
Expand Down
Binary file removed bin/n50
Binary file not shown.
6 changes: 6 additions & 0 deletions src/gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ long long calculate_n50(const int *lengths, int num_seqs, long long *total_lengt
}

int *generate_contigs(int N50, int SUM_LEN, int TOT_SEQS) {
/*
* Generate a list of contig lengths with N50 statistic
* N50: The length N such that 50% of the total sequence length is contained in contigs of length >= N
* SUM_LEN: Total length of all contigs
* TOT_SEQS: Total number of contigs
*/
if (N50 > SUM_LEN || TOT_SEQS < 1) {
fprintf(stderr, "Invalid input: N50 must be <= SUM_LEN and TOT_SEQS >= 1\n");
return NULL;
Expand Down

0 comments on commit 3e70d7b

Please sign in to comment.